[JBoss jBPM] - Re: Cange swimlane at runtime
by pgros
When i create my process instance i set the var "SWIMLANE" to "Unknown"
i have following nodes
startstate -> node -> tasknode1 -> tasknode2
"node" sets var "swimlane" to "test"
then i overrided the enter() function of tasknode as following
| @Override
| public void enter(ExecutionContext executionContext) {
| // TODO Auto-generated method stub
| super.enter(executionContext);
|
|
|
| for ( TaskInstance ti : (Collection<TaskInstance>)getTaskMgmtInstance(executionContext.getToken()).getTaskInstances()) {
| ti.setActorId(executionContext.getVariable("SWIMLANE").toString());
| System.out.println("Set " + ti.getName() + " actor to " + executionContext.getVariable("SWIMLANE").toString());
| }
| }
|
Output:
Set node1task actor to Unknown
Set node2task actor to Test
but node1task should have been set to test, too...
seems that the variable isn't set fast enough or something like that, how can it be? ... i didn't set any asynchonous nodes
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4193761#4193761
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4193761
17 years, 4 months
[JBoss jBPM] - Cange swimlane at runtime
by pgros
Is it possible to change the swimlane or asignment of a task in a ProcessInstance, when the tasknode is not reached yet?
apparently the asignment is appointed when the process leaves the start-state and can not be changed later
even if i use a process variable:
| <task name="Execute">
| <assignment actor-id="#{SWIMLANE}"></assignment>
| </task>
|
the processvariable seems to be read when the process leaves the start-state so it doeasn't matter if i change it later, the asignment will be to the actor which was set when leaving the start state
any ideas ? the problem is that the point when i want to change the asigned-actor before reaching the task-node so there isn't a taskinstance yet
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4193730#4193730
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4193730
17 years, 4 months