It's all about the answers!

Ask a question

Run method not triggering for delivery operation


Girish Jangame (1118) | asked May 30 '17, 9:25 a.m.
edited May 30 '17, 4:34 p.m. by Ralph Schoon (63.1k33646)

  Hi,

I was trying to run delivery operation plugin using operation participant and operation id is
"com.ibm.team.scm.server.deliver" .

But it's not triggering run method while debugging the code.
please check below implementation


public class ImplClass extends AbstractScmService implements

            IOperationParticipant {

 
public void run(AdvisableOperation operation,
            IProcessConfigurationElement participantConfig,
            IParticipantInfoCollector collector, IProgressMonitor monitor)
            throws TeamRepositoryException {
        System.out.println("In run method");
       
        Object operationData = operation.getOperationData();
        if (!(operationData instanceof DeliverOperationData)) {
            return;
        }
        DeliverOperationData data = (DeliverOperationData) operationData;
}

please provide some valuable suggestions.

Thanks,
Girish

Accepted answer


permanent link
Ralph Schoon (63.1k33646) | answered May 30 '17, 4:38 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

If you had done the extensions workshop and as a summary https://rsjazz.wordpress.com/2015/09/30/learning-to-fly-getting-started-with-the-rtc-java-apis/ you would have learned that there are XML deployment descriptors involved.

The code you wrote, never gets called? then likely your deployment descriptors like META.INF and plugin.xml are wrong. The information you provided is never going to be even called, if this is the case.

Ralph Schoon selected this answer as the correct answer

Comments
Princi Verma commented May 31 '17, 3:14 a.m. | edited Nov 11 '17, 5:35 p.m.

 Hi Ralph,


Yes our code never gets called. Below are the dependencies used in META-INF -

org.eclipse.core.runtime
com.ibm.team.repository.common
com.ibm.team.repository.service
com.ibm.team.scm.service
com.ibm.team.scm.common
com.ibm.team.process.common
com.ibm.team.process.service
com.ibm.team.workitem.common
com.ibm.team.workitem.service


Operation id defined in Extensions -
com.ibm.team.scm.server.deliver


Prerequisites are as follows defined in plugin.xml -
<prerequisites>
             <requiredService
             interface= "com.ibm.team.repository.service.IRepositoryItemService"/>
             <requiredService
             interface= "com.ibm.team.workitem.common.IWorkItemCommon"/>
             <requiredService
                  interface="com.ibm.team.workitem.service.IWorkItemServer"/>
</prerequisites>


Please guide us.

Thanks and Regards,
Princi Verma





Princi Verma commented Jun 02 '17, 9:41 a.m.

 Hi,


Can anyone provide some help regarding the above problem, as we have tried with both, operation advisor and participant, but still code is not going in debugging mode when testing?

We have used 'com.ibm.team.scm.server.deliver' as operationId for delievery operation in scm.

Your solutions are really valuable for us.

Thanks and Regards,
Princi Verma


Ralph Schoon commented Jun 02 '17, 12:25 p.m. | edited Jun 02 '17, 12:28 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

The information provided is not nearly enough and I don't know anyone  who would be able to provide informed help based on it.

I'd suggest you run the workshop mentioned in the link. https://rsjazz.wordpress.com/2015/09/30/learning-to-fly-getting-started-with-the-rtc-java-apis/. If you had done the extensions workshop and as a summary you would have learned that there are XML deployment descriptors involved. And you can work with Jetty. The new version of the workshop has added content around deployment.

There are also additional downloadable examples on that blog that work. If this is valuable enough for you, I would suggest you do the workshop. The example should deploy and work with Jetty. With some examples you can compare the manifest and plugin files.

If the extensions don't show up in the configuration or don't fire it is usually some ID issue (e.g. typo) or some dependency issue.

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.