It's all about the answers!

Ask a question

RTC 5.0.2 Failed to start a participant "CRJAZ6011E"


Glen Hupe (2112) | asked Mar 03 '15, 11:05 a.m.

Hi

I tried to create a new RTC participant based on the article https://jazz.net/forum/questions/44456/get-custom-attribute-key-and-value-in-server-side-plugin 

The participant failed to load with an internal error I found this error in the log:

10:37:00,184 [1508858351@qtp-917124778-10 @@ 10:36 TestJazzAdmin1 <Jakarta Commons-HttpClient/3.1@127.0.0.1> /jazz/service/com.ibm.team.workitem.common.internal.IWorkItemRepositoryService] ERROR com.ibm.team.process.common                         - CRJAZ6011E The operation participant cannot be created because an exception occurred. For more information, see the exception.
com.ibm.team.repository.common.transport.TeamServiceRegistryException: CRJAZ1094I The service "ca.navcan.jazz.updatenesamr.participant.UpdateNesaMR" failed to be activated because a service it depends on, "com.ibm.team.workitem.service.IWorkItemCommon", has not been acquired and forcing service activation was not requested.

I've added the the ICommon service to my participant plugin xml as shown below

When running my jetty based RTC server/eclipse client, the server throws an internal error when triggering the participant. See image below:

  

Any help would be appreciated.  Thanks

Glen

3 answers



permanent link
sam detweiler (12.5k6195201) | answered Mar 03 '15, 11:28 a.m.
edited Mar 03 '15, 11:30 a.m.
there is no workitem common service.
there IS a workitem common class

it is not referenced in my plugin.xml

            if (auditable instanceof IWorkItem) {

                IAuditableCommon auditableCommon= saveParameter.getSaveOperationParameter().getAuditableCommon();
                IWorkItemCommon workItemCommon= auditableCommon.getPeer(IWorkItemCommon.class);

permanent link
Ralph Schoon (63.7k33647) | answered Mar 05 '15, 2:19 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Mar 05 '15, 8:42 a.m.
Please check the prerequisites in the plugin.xml (see https://rsjazz.wordpress.com/2012/07/31/rtc-update-parent-duration-estimation-and-effort-participant/ image at the end of the post) and check the services you instantiate.

Comments
Glen Hupe commented Mar 05 '15, 8:32 a.m.

Hi Ralph

I can't see the image you are referring to in your link.  Thanks

Glen


Ralph Schoon commented Mar 05 '15, 8:45 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I fixed the link - wrong content in the cut buffer - my bad.

Why do you have an optional service?
Does the extension run on a Jetty Server already?


permanent link
Glen Hupe (2112) | answered Mar 05 '15, 1:45 p.m.

Ralph

Just to be up front my understanding of the plugin process is at a basic level. Also note I am fairly new to the Java language.   I successfully went through the RTC Extension Workshop 5.x.  I have been able to debug my participant using the Jetty Server process that was shown in the workshop.

 

What I am trying to do with my participant is when a user presses the Save button, I would like to get the data from targeted fields (both custom and built-in) on the workitem so I can update an external program with the data.  After searching this forum I realized there are many ways to accomplish this.  I found a piece of code on the fourm (see link above) authored by Hakki Bozkurt  that was marked as an accepted answer and appeared to fit what I was trying to do.

 

After adding the <RequiredService interface="com.ibm.team.workitem.service.IWorkItemCommon"/>  to the plugin.xml on my participant. And running the participant I receive the error you see in my initial post. I noticed after that in Hakki had set the service to be optional.  I changed my plugin.xml to reflect that.

 

When I reran the participant fired and stopped on the breakpoint I set, but when I stepped passed the line “IWorkItemCommon workItemService= (IWorkItemCommon) getService(IWorkItemCommon.class);” I received the exception:

 

The service 'ca.navcan.jazz.updatenesamr.participant.UpdateNesaMR@7e617e61' failed to find the required service 'interface com.ibm.team.workitem.common.IWorkItemCommon'.  Check <prerequisites> in plugin.xml.

 

Hopefully this gives a better explanation of my issue.  I’m sure I am missing something simple in my code, or there may be a more efficient way to accomplish the same thing. I’ve pasted the section of the code below.  Any help would be greatly appreciated.  Thanks

Glen

 

My code:

 

                        Object data = operation.getOperationData();

                        ISaveParameter saveParameter = null;

 

                        if (data instanceof ISaveParameter) {

                                    saveParameter = (ISaveParameter) data;

                                    IAuditable newState = saveParameter.getNewState();

                                    IAuditable oldState = saveParameter.getOldState();

                                    if (newState instanceof IAuditable) {

                                                IWorkItemCommon workItemService = (IWorkItemCommon) getService(IWorkItemCommon.class);// You to add this class in plugin.xml

 

                                                // loop through and get the field data we need

                                                while (i <= 17) {

                                                            IAttribute attribute = workItemService.findAttribute(

                                                                                    operation.getProcessArea().getProjectArea(),

                                                                                    jazzFieldId[i], monitor);

                                                            if (attribute instanceof IWorkItem){

                                                                        IWorkItem sourceWorkItem = (IWorkItem) attribute;

                                                                        workItemFields[i] = sourceWorkItem.getValue(attribute).toString(); // return object type data maybe you want to convert      

                                                            }

                                                }

                                                // see if this a new workitem

                                                if (oldState == null) { // its a new workitem

                                                            action = 0;

                                                } else {

                                                            action = 1;

                                                }

                                    }

                        }

 

 

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.