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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Assigned Activity: how to get comments and who completed

VasiliyRepecki
1-Newbie

Assigned Activity: how to get comments and who completed

Hi.

I have Assigned Activity in workflow.

How can i get who completed this assigned activity and comments?

I need some java code to init my workflow variables by these values.

Where should i put this code in Workflow editor?

Thanks.

1 REPLY 1
AL_ANDERSON
5-Regular Member
(To:VasiliyRepecki)

Define a

wt.org.WTUser taskComplete

variable at the workflow process template level.

In your activity template, go to the "Variables" tab to copy that variable into and out of your task.

Next, go to the activity template "Transitions" tab, select the transition you are interested in (or use the "Complete" transition if you want to check this for all transitions no matter what on completion), and add this code.

taskComplete = (wt.org.WTUser)wt.session.SessionMgr.getPrincipal();

This will copy the current user who clicked task complete causing that transition to fire from the transition to the activity and from the activity up to the process where you can use it as a process variable in later robots.

Try it.

Top Tags