It's all about the answers!

Ask a question

Issue in deliver Operation


Princi Verma (28224) | asked Jun 06 '17, 10:02 a.m.
edited Jun 06 '17, 10:05 a.m.

Hi,


I created new plugin for deliver operation in RTC and added the following dependencies -
org.eclipse.core.runtime;bundle-version="3.6.0",
 com.ibm.team.process.common;bundle-version="1.2.1200",
 com.ibm.team.process.service;bundle-version="1.2.1200",
 com.ibm.team.repository.common;bundle-version="1.3.1200",
 com.ibm.team.repository.service;bundle-version="1.2.1200",
 com.ibm.team.build.common;bundle-version="3.1.200",
 com.ibm.team.build.service;bundle-version="3.1.200",
 com.ibm.team.scm.common;bundle-version="3.1.200",
 com.ibm.team.scm.service;bundle-version="3.1.400",

plugin.xml is as follows -

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
   <extension
         point="com.ibm.team.process.service.operationParticipants">
      <operationParticipant
            class="net.atos.ssc.delivery.service.ImplClass"
            id="net.atos.ssc.delivery.extnid"
            name="Delivery Operation Participant"
            operationId="com.ibm.team.scm.server.deliver">
         <extensionService
               componentId="net.atos.ssc.delivery.compid"
               implementationClass="net.atos.ssc.delivery.service.ImplClass">
            <prerequisites>
             <requiredService
                  interface="com.ibm.team.repository.service.IRepositoryItemService"/>
               <requiredService
                  interface="com.ibm.team.build.internal.common.ITeamBuildService"/>
               <requiredService
                  interface="com.ibm.team.build.internal.common.ITeamBuildRequestService"/>
                  <requiredService
                  interface="com.ibm.team.process.service.IProcessServerService"/>
            </prerequisites>
         </extensionService>
         <description>
            This plugin will automatically send the notification mail after delivery operation to the server.
         </description>
      </operationParticipant>
   </extension>

</plugin>


I have extended AbstractService class 

Implementation class is as follows -

public class ImplClass extends AbstractService implements IOperationParticipant {

public ImplClass() {
System.out.println("Inside ImplClass constructor ");
}

@Override
public void run(AdvisableOperation operation,
IProcessConfigurationElement participantConfig,
IParticipantInfoCollector collector, IProgressMonitor monitor)
throws TeamRepositoryException {
System.out.println("Inside run method ");
Object data = operation.getOperationData();
        System.out.println("data ----->>> "+data);
        if (!(data instanceof IScmDeltaSource)) {
            return;
        }  
    IScmDeltaSource sourceData = (IScmDeltaSource) data;
    System.out.println("source data ---->>> "+sourceData);
}

}

After that it went in debugging mode and when I tried to replace the 'IScmDeltaSource' with 'LegacyDeliverOperationData' then it didn't go again in debugging mode. Even I tried after reverting the changes but it didn't work.

And when I am trying to create new plugin still its not debugging.

Please provide some guidance.

Thanks and regards,
Princi Verma

One answer



permanent link
Ralph Schoon (63.4k33646) | answered Jun 07 '17, 3:49 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

You likely want to extend AbstractScmService as this is for deliver and the extension point asks for it.

Besides that you want to make sure to run an additional client as shown in the extensions workshop so that you have independent debug sessions for the server and the client debug it is unclear why debug should not work. It always worked for me on Jetty.


Comments
Princi Verma commented Jun 08 '17, 2:36 a.m. | edited Jun 08 '17, 3:07 a.m.

 Hi Ralph,


Thanks for your reply.
As you said I tried after extending AbstractScmService class but its going in debug mode when baseline is delivered. And the data coming is of type 'LegacyDeliverOperationData' and using getChangeSetHandles() method I am getting empty 'IChangeSetHandle' List. 

How can I find the work item asociated with this change set as for email notification I need owner and work item.

This is the implementation

LegacyDeliverOperationData sourceData = (LegacyDeliverOperationData) data;
List<IChangeSetHandle> changeSetHandles = sourceData.getChangeSetHandles();


Please suggest.

Thanks & Regards,
Princi Verma




Princi Verma commented Jun 08 '17, 5:01 a.m.

 yes I tried this, and it was not going in debug mode when deliver operation is performed for new change set after associating with work item.


In local host ui I was able to see the change set delivered in link tab, but code didn't get in debug mode.



Ralph Schoon commented Jun 08 '17, 5:15 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
If the operation is configured and deployed on Jetty, this has always worked for me.

With this minimal amount of information given there is no way to help you. Good luck.

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.