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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

How to Populate Participlant of Task B based on Who Completed Task A?

BrianSullivan
9-Granite

How to Populate Participlant of Task B based on Who Completed Task A?

Change Activity has Two Tasks
Task A
Task B
 
Task A - is Sent to a Role that is populated by a Group of 4 People.
One of them accepts and completes the Task.
 
Task B - Currently goes to all 4 People again.
 
Would like Task B to go to the Person who completed Task A.
 
My assumption is that we should be able to add Transition Code at the end of Task A that populates a Role for participant for Task B?
 
Brian
2 REPLIES 2

You can use a workflow variable too if you do not want to deal with roles but the UI will look a bit funny. Yes, you can use a transition but make sure you call code in an external method so its possible to patch bugs. This method would get the team of the change activity and update the role member for Task B. Should work well but test, test, test and make sure there is a responsible role in place to catch exceptions.

@BrianSullivan , very doable.

There are APIs you can use to get how complete the task.

 

Run code in complete transition of task A and populate the team role for task B with the user who completed task A all in one shot.

 

I agree with @avillanueva , I’d always use external class. You never know when you might want to use the same code again somewhere else.

Top Tags