Skip to main content
17-Peridot
April 27, 2012
Question

Reject on 1st Reject Vote.pptx

  • April 27, 2012
  • 6 replies
  • 5220 views

Examaple of using a synch robot to Reject the 1st time a Reject vote is selected

6 replies

1-Visitor
August 1, 2012

Some of the images seem to be corrupted when I try to open this pptx.  Can you repost?

Thanks.

1-Visitor
August 2, 2012

This would really improve our working procedures.

1-Visitor
June 13, 2013

This somehow doesn't work as mentioned.

I put this expression in the Transition for 'Vote' activity, but it fails to initiate the activity. Is there something else do I need to do or am I missing something??

// On the start transition of the voting activity in the workflow, initialize a process variable,

// say theActivity to the current activity as shown.

theActivity=(wt.workflow.work.WfAssignedActivity)self.getObject();


I have already created a global variable theActivity, as mentioned.

Thanks,

Wasim

1-Visitor
September 15, 2014

what are the entries in the routing tab of vote activity???

slapha
15-Moonstone
December 15, 2014

One of the issues I ran into when trying to implement a similar workflow in 10.2 M010/M020 is global variables that are copied to/copied from an activity variable, are not copied out into the global until after the activity completes. I had to make is a separate expression robot that runs after the activity is started (Ref: CS161854). 

I also got invalidtargetexception errors when using result=wt.workflow.work.WfTally.any(objRef, "Rejected", "") it would work but would throw an error if the vote wasn't "Rejected". We ended up adding a refire loop if the secondary option was picked. Still isn't working 100% but we're getting there.

17-Peridot
June 9, 2021

Just for anyone which searches for this topic. This solution is out of date. Since Windchill 11.0 there is a workflow task transition called "Complete Task". This code will start the rework as soon one of the Change Admins votes for rework.

 

if (wt.workflow.work.WfTally.count(self, "Rework") > 0) {
 wt.workflow.work.WorkflowHelper.service.completeActivity(self, "Rework");
}

Screenshot 2021-06-09 at 21.56.18.png