Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Run method not triggering for delivery operation

  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

0 votes


Accepted answer

Permanent link

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

0 votes

Comments

 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




 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

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 log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: May 30 '17, 9:25 a.m.

Question was seen: 1,483 times

Last updated: Nov 11 '17, 5:35 p.m.

Confirmation Cancel Confirm