This content has been marked as final.
Show 2 replies
-
1. Re: how to get/set process variables in java code?
kukeltje May 2, 2006 6:06 PM (in response to lethrech)There are several options:
- look at the examples/testcases
- look at the user documentation
- search this forum
- look at the api docs
- ask santa
hth -
2. Re: how to get/set process variables in java code?
lfaggioli May 2, 2006 6:10 PM (in response to lethrech)You can do it in an Action: override the execute() method, for example like this
import org.jbpm.graph.def.Action; import org.jbpm.graph.exe.ExecutionContext; public class MyAction extends Action { public void execute(ExecutionContext executionContext) throws Exception { String aVariable = (String) executionContext.getVariable("aVariable"); //do something executionContext.leaveNode(); } }
The ExecutionContext class has a setVariable() method too.
bye
luca