cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.

sync robot not working

rjacobsen
1-Newbie

sync robot not working

Hello all,
Problem 1: I have a change notice workflow that has 2 sync robots listening at the vote activity. One for the amend vote and one for the reject vote.
I cannot get the sync robot working when it hears one "amend" vote. The "reject" vote path, built the same way, does work.
[cid:image005.png@01CE73EB.1AF31490]


Problem 2: When I do hit all of the votes to amend, it proceeds, but looks like it starts another (second) process:

On the ECN:
[cid:image001.png@01CE73EA.734471D0]

One process is sitting at "Analyze Change Notice" and the other back to "Submit Change Notice":
[cid:image002.png@01CE73EA.734471D0]

[cid:image003.png@01CE73EB.1AF31490]

[cid:image004.png@01CE73EB.1AF31490]

[cid:image006.png@01CE73EB.490EF970]

Does anyone have any thoughts of what the issues are?

Thanks,
Russ Jacobsen
YAKIMA Products Inc.

7 REPLIES 7

Anything in your terminate transition? Any reason you are using sync for
this? You can tally in the activity take action elsewhere in the workflow?
Any roles incomplete, any errors in log file? Just feel like some info is
missing as to what the system actually did. Terminate may somehow be
forcing it to kill one process and start another?






A new process is started because you are setting the object state back to Open, (I'm assuming that is the first state in the lifecycle, and has a workflow tied to that state).

In one of our lifecycles, there is an Under Review state that the object goes to after creation, so Open is only used on Create, and never revisited.

This has to be it. The open state is definitely the state where the object has its LC tied to it and hence its kicking off a new one.

This sync robot comes from the code that Zemsky had sent out a year ago when a WF needs to immediately reject upon a single vote but also wait for all of the approve votes.

Is there a more efficient method for this now?


[cid:image001.gif@01CE769B.913AC780]

Steve Vinyard
Senior Solution Architect




Root cause for your problem 1 might be variables initialized in start transition are not getting initialized (vote activity in your case ). SPR for this issue is already filed https://www.ptc.com/appserver/cs/view/spr.jsp?n=2171548


For problem 1instead of directly initializing variables you can use below code to initialize variablesand check it it works

wt.workflow.engine.WfProcess parent = activity.getParentProcess();

wt.workflow.work.WfAssignment assignment_obj = null;
for (int i=0; (assignmentList!=null && assignmentList.hasMoreElements()); i++){


}if(assignment_obj!=null){




parent.getContext().getVariable("workActivity").setValue(assignment_obj);


else{

wt.fc.PersistenceHelper.manager.save(parent);




Hope this helps


Thanks,

Shreyas

Thanks all.

Shreyas,
Bear with me, I'm a rookie at this stuff. Would I put this code in place of the current code in the start transition (theActivity=(wt.workflow.work.WfAssignedActivity)self.getObject();)?

I'm assuming that "workActivity" in the code below is the variable where I would exchange for "theActivity"?

Thanks again.


Russ Jacobsen
YAKIMA Products Inc.

Yes..you can change "workActivity" with"theActivity"



Thanks,


Shreyas

Hello,


I am still having trouble getting this to work.No matter what I try, I cannot get rid of the following error in the synchronize robot. Anyone have any ideas?



Target variable was not initialized workActivity
(wt.workflow.robots.robotsResource/7) wt.workflow.WfException: Target variable was not initialized workActivity
at wt.workflow.robots.WfSynchRobot.subscribeToObjectEvent(WfSynchRobot.java:876)
at wt.workflow.robots.WfSynchRobot.run(WfSynchRobot.java:212)
at wt.workflow.engine.StandardWfEngineService.runRobot(StandardWfEngineService.java:918)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at wt.queue.QueueEntry.execute(QueueEntry.java:232)
at wt.queue.QueueRunnable.run(QueueRunnable.java:186)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:662)

Announcements


Top Tags