It's all about the answers!

Ask a question

Having problems while deploying a RTC Plugin on server side (Operation Participant)

Harsh Vardhan Singh (32210) | asked Mar 14 '16, 3:27 p.m.
edited Mar 14 '16, 3:29 p.m.
Hi Team,

I am new to creating plug-ins in RTC. I have created the following code using different examples:

public class SendDatatoSlack implements IOperationParticipant {

    public void run(AdvisableOperation operation,
            IProcessConfigurationElement participantConfig,
            IParticipantInfoCollector collector, IProgressMonitor monitor)
            throws TeamRepositoryException {
        // TODO Auto-generated method stub
        Object data = operation.getOperationData();
        ISaveParameter saveParameter = null;
        if (data instanceof ISaveParameter) {
            saveParameter = (ISaveParameter) data;
             * If the state id is new check for Defect with severity Blocker.
            IWorkItem newState = (IWorkItem) saveParameter.getNewState();
            Identifier<IState> newStateId = newState.getState2();
            Identifier<IState> oldStateId = null;
            IWorkItem oldState = (IWorkItem) saveParameter.getOldState();
            String workItemtype= newState.getWorkItemType();
            String summary=newState.getHTMLSummary().getPlainText();
            String description= newState.getHTMLDescription().getPlainText();
            int workItemID= newState.getId();
            List<String> setTags= new ArrayList<String>();
            //String workItemURL= newState.g
                if (oldState != null){
                    // New work item check.
                    oldStateId = oldState.getState2();
                        convertToSlackPayloadandSend(workItemID,summary, description);
                else if ((newStateId != null) && !(newStateId.equals(oldStateId))) {
                     * If the work item is not of the proper type, do not build.
                     * Note that the work item type and state are hard coded, as is
                     * the build definition id. We will change that later. That is
                     * when we will start using the participantConfig parameter.
                        convertToSlackPayloadandSend(workItemID,summary, description);

            private void convertToSlackPayloadandSend(Integer id, String summary, String description ){
                StringBuilder texttobeSentonSlack= new StringBuilder("A new WorkItem has been created Id: ");
                texttobeSentonSlack.append(" Summary: ");
                texttobeSentonSlack.append(" Description : ");
                //System.out.println("Text :" + texttobeSentonSlack);
                String s= String.format("curl -X POST --data-urlencode \"payload={\\\"channel\\\": \\\"#rtc_slack_test\\\", \\\"username\\\": \\\"rtc-incoming-webhook\\\", \\\"text\\\": \\\"%1$s\\\"}\" <<WebhookURL>>",texttobeSentonSlack );
                try {
                } catch (IOException e) {
                    // TODO Auto-generated catch block

Right now, everything is hardcoded like id's for defect and state. If this code works then I would work on parametrization part of this.

When I deploy this plug- in in RTC server side I am not able to see any "Follow- up Actions" added.

This is my folder structure:

and this is the contents for my profile.ini file for this plugin-


Can someone help on this?

One more question how can I get the URL for the WorkItems ? So, that I can use these URLs in the Operation participant operation?


sam detweiler commented Mar 14 '16, 4:19 p.m. | edited Mar 14 '16, 4:21 p.m.

If you are using eclipse, you need to close and reopen eclipse after you restart the server.. many times it will cache the list of plugins and not show you any changes..
and you must FORCE the server to reload, by using the request reset command
https://server:port/ccm/admin/cmd/requestReset, before restarting the server

can u show us your plugin.xml that describes this extension


after you modify the field, you must save the workitem again, but watch out, it will cause your plugin to be called again.. search on saveWorkitem3() here in the forums or Ralphs blog on how to pass info to that next invocation, informing it that it is YOU causing the save.

doesn't slack have an api you can call directly without having to invoke curl?

Donald Nong commented Mar 14 '16, 10:59 p.m.

This is the screenshot in the OP showing the folder structure.

sam detweiler commented Mar 14 '16, 11:37 p.m.

I have all my plugins in a separate folder, o that shouldn't be the problem. Of course we don't know what the ini files look like. 

Harsh Vardhan Singh commented Mar 30 '16, 8:05 a.m.

Thanks, team for your response!

I have used the server reset command as mentioned by you but due to some reason my RTC server on my local machine was not getting up.

So, I restarted my whole JTS server also but RTC was still not working.

I have reinstalled the RTC server and doing testing on a Jetty server.

Accepted answer

permanent link
Ralph Schoon (61.2k33643) | answered Mar 30 '16, 8:27 a.m.
Before even trying to deploy on a real server, follow and setup your environment for debugging with Jetty.

If Jetty works you can try to deploy on a server. The extension workshop tells you how. Also see

If it does not work after deploying :
  • Check the CCM log - what error messages do you see
  • Check your dependencies and make sure not to have any client API referenced
  • You should have a Jazz Component, can you see that in the component status?
  • Did you deploy to CCM (and not accidentally into JTS?)

Unfortunately this step is really tough and the data above is insufficient. There is the site.xml, the feature project and more data that would be needed.

You don't get the URL for the work items. You could construct it however. It depends which URL you want. There are more than one representation.
Harsh Vardhan Singh selected this answer as the correct answer

One other answer

permanent link
Michele Pegoraro (1.8k12114102) | answered Mar 15 '16, 5:24 a.m.
Reasons for advisor/participant to not be seen could be mainly four, from my experience:
 - the plugin has not been properly provided
 - something is wrong with the plugin.xml
 - you've not restarted the eclipse client (as previously mentioned)
 - you've not asked for a server reset (as previously mentioned)

In order to find out if your plugin has been correctly provided you should take a look to the provisioning status:

Here you should search for your update site and see when it has been loaded and if there are problems.

If everything is ok, you should check the plugin.xml, mainly the operation id you have used.

Your answer

Register or to post your answer.