Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Hi All,
I want to customize PDMLink's Promotion Request Workflow. If the creator chose 3 partipants during promotion process, I want the workflow to wait for the Approvers to complete their activities, but if any of them rejects their task, I want the process to end itself and comeback to the original lifecycle state.
Current workflow process allows only 'All' or 'Any' for the participants. I'm currently working with 'All' and it works fine for 'Approve' but even if any participant rejects, it will wait for others to complete their tasks. I don't want this. I want to end the process as soon as someone Rejects the task.
I need 'All' for Approve and 'Any' for Reject.
What custom code is required which I need to write in this Workflow to get it done?
Thanks,
Wasim
Solved! Go to Solution.
Hi Wasim,
I think this may be what you are looking for:
http://communities.ptc.com/docs/DOC-2732
Regards,
Toby
Hi Wasim,
I think this may be what you are looking for:
http://communities.ptc.com/docs/DOC-2732
Regards,
Toby
Hi Toby,
Thanks for your reply. But somehow it's not wroking.
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
Hi Wasim,
Sorry I haven't actually used the code before, we went in another direction with our process before I got around to it.
I had assumed since PTC had bothered to make a slideshow of it that it would work.
Regards,
Toby
Hi Toby,
Sorry for the earlier confusion. I missed to define the local variable for 'Vote' Activity. We actually needed to define 'theActivity' variable for 'Vote'.