Add process variable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2015 03:15 AM
Hi,
I have flow like this:
ServiceTask 1 (return object A have fields A1,A2) -> ServiceTask 2 (need A2).
How can I add A2 to flow ?
I try runtimeService.setVariable(processInstance.getId(), A2,A2Value) but when flow has not yet user task, processInstance is null, so I can't get executionId. I'm apply serviceTask by using expression.
Thanks.
I have flow like this:
ServiceTask 1 (return object A have fields A1,A2) -> ServiceTask 2 (need A2).
How can I add A2 to flow ?
I try runtimeService.setVariable(processInstance.getId(), A2,A2Value) but when flow has not yet user task, processInstance is null, so I can't get executionId. I'm apply serviceTask by using expression.
Thanks.
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2015 05:59 AM
In the service task you have a DelegateExecution, that has a method setVariable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-18-2015 12:00 AM
Hi, thanks for response, but I'm using Expression for service task, not using Java Delegate class, so not having DelegateExecution. Do you have another way to add variable?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2015 08:34 AM
In an expression, you can put 'execution' too, even pass it into methods like that.