It's all about the answers!

Ask a question

API for Removing Flow Target from Specific Stream


jyoti mishra (45138) | asked Oct 17 '19, 3:32 a.m.

 Hello Everyone,


I wanted to fetch Flow target of Particular Stream using Server Side API and need to remove that Flow targets.Kindly Provide the API for Removing flow Targets from particular Stream using Server Side API.

Regards,
Jyoti 

One answer



permanent link
jyoti mishra (45138) | answered Nov 21 '19, 7:50 a.m.

   Hello Everyone,


I have written the code for removing flow target ,but it is not working.Please find my code below for removing flow target-
         IFlowEntry flowEntry=getService(IFlowEntry.class);
 IFlowTable flowTable=getService(IFlowTable.class);
IFlowEntry[] targets = (IFlowEntry[]) flowTable.deliverTargets().toArray(new IFlowEntry[flowTable.deliverTargets().size()]);
System.out.println("IFlowentry targets :"+targets);
//Remove flow target
for(IFlowEntry target:targets)
flowTable.removeAll(newWorkspaceHandle);
// get the node 
IFlowEntry newnode = flowTable.getDeliverFlow(newWorkspaceHandle); 
System.out.println("Flow node"+newnode);
}

Note:- 
newWorkspaceHandle is a stream .

Error Message:- 

Internal Error:- Unable to instantiate participant.The operation participant cannot be created(CRJAZ6011E).The "com.ibm.team.scm.common.IFlowEntry" is not registered.

Someone please guide me,what is the solution for these error.What we need to write inside plugin.xml for "IFlowTable and IFlowEntry".Please help me.

Regards,
Jyoti



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.