cancel
Showing results for 
Search instead for 
Did you mean: 

How to define process variables inside a process

kaech
Champ in-the-making
Champ in-the-making
Hi,

what is the easiest way to define process variables inside of the process?
I don't want to inject them from the outside but define them as part of the process.

Maybe using a little Groovy script or a Java service task?
Ideally directly in BPMN. But I can't figure out how it can be done.

What would be the easiest way? Your suggestions would be highly appreciated.
2 REPLIES 2

kaech
Champ in-the-making
Champ in-the-making
I think I found it. Using a script task would be the simplest approach.
I's described in the user guide http://www.activiti.org/userguide/index.html#bpmnScriptTask.

al_lv
Champ in-the-making
Champ in-the-making
I think u can do it with or during Java Service Task also:


public class ServiceTask implements JavaDelegate {
           public void execute(DelegateExecution execution) throws Exception {
                  execution.setVariable(variableName, value);
           }
}


Good luck

Alexej
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.