Quantcast
Channel: PTC Community: Message List - Windchill
Viewing all articles
Browse latest Browse all 8876

Re: How to get "Synchronize" component in the workflow in the javacode

$
0
0

Hi Shreyas,

Thanks for ur reply.

 

Hope u have remembered my earlier post  "workflow tasks to get in the code" for which u have provided me a solution.

In the same way, can u please let me know is there any way to find these SyncRobots using "WorkflowCommands.getRouteStatus(nmOid);"

For ur reference PFB.

 

WfProcess process = (WfProcess) processes.nextElement();

NmOid nmOid = new NmOid(process);

QueryResult status = WorkflowCommands.getRouteStatus(nmOid);

 

while(status.hasMoreElements())

{

Object obj = status.nextElement();

if(obj instanceof WorkItem)

{

WorkItem workitem = (WorkItem) obj; 

if(!(workitem.getStatus().equals(WfAssignmentState.COMPLETED)))

{

System.out.println("The ICN is stuck at "+workitem.getIdentity()+"in the"+process.getIdentity());

}

}

if(obj instanceof WfSynchRobot)

{

WfSynchRobot sync=(WfSynchRobot)obj;

System.out.println("SyncRobot"+sync.getDisplayIdentity());

}

}

 

 

But it is entering in to the second if condition , even though the ICN is stuck in the "Sync Robot" in the workflow   Please let me know if I am doing anything wrong.

 

 

Thanks in advance.

Regards,

Archana


Viewing all articles
Browse latest Browse all 8876

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>