cancel
Showing results for 
Search instead for 
Did you mean: 

Process variables.

vigneshwer
Champ in-the-making
Champ in-the-making
I am relatively new to Java and the company I'm interning at requires me to build a workflow for their client, so pardon my ignorance. Thanks!

Suppose my workflow begins with a user task, the resulting form data can be retrieved from a following service task using
DelegateExecution.getVariable("formid")

Is my understanding of this correct?

Additionally, the Result Variable of a Service Task can be the return value of a
static
method such as
getResult()
of any type, is that right? Can result variables of a Service Task can be retrieved the same way that process variables are?

Thanks for your help. I tried going over the User Guide multiple times in search for the answers, but with no luck.
1 REPLY 1

trademak
Star Contributor
Star Contributor
You can get all task form values individually using DelegateExecution.getVariable("variableName").
So suppose you have a form property with an id "name" you will get a variable with the name "name".
The result variable can only be used with the expression attribute. Then the invoked method can return a object that will be set as a variable in the process context. When using the class attribute you just have to use DelegateExecution.setVariable("variableName")

Best regards,