In the Bean Shell Form Binder of a form that is in a workflow, how do you assign a value to a workflow variable?

Confluence User - 16 Nov, 2015

In the Bean Shell Form Binder of a form that is in a workflow, how do you assign a value to a workflow variable?

 

This doesn't work, it gives an error at "workflowAssignment" in the third statement below.

PluginManager pluginManager = (PluginManager) AppUtil.getApplicationContext().getBean("pluginManager");
WorkflowManager wm = (WorkflowManager) pluginManager.getBean("workflowManager");
wm.activityVariable(workflowAssignment.getActivityId(),"wf_status", "Approved");

forms;workflow

2


17 Nov, 2015
confluenceUser
1
confluenceUser

Hello there,

Try using:

ApplicationContext ac = AppUtil.getApplicationContext();
WorkflowManager wm = (WorkflowManager) ac.getBean("workflowManager");
wm.activityVariable("#assignment.activityId#", "wf_status", "Approved");

Hope this helps!

 

Thanks,

Ashutosh

17 Nov, 2015
confluenceUser
confluenceUser

Thanks Ashutosh. That worked.

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print