cancel
Showing results for 
Search instead for 
Did you mean: 

Multi level approve task probem

gnevzmaja
Champ in-the-making
Champ in-the-making
[img]https://lh4.googleusercontent.com/-m2LQMp2zZrk/TsJPnYhXUpI/AAAAAAAAEUw/jziJlzE4Fr0/s846/Capture.PNG[/img]

The idea is as follows:
1. user makes a request
2. at the same time both Level 1  and boss should be able to see the approval task
3. when Level 1approves boss should get the mail that he is on the move

I cut out all other branching for the simplicity of it, since the problems are flollowing:

Problem1.
Inside L1 approval there is form with property L1comment because of which Exception is thrown, which was expected at first since once L1 approval was skipped, no L1comment has been defined. Then I tried to create "take" listener to make definition  of variable L1comment
but with no success, Im getting same exception
com.vaadin.event.ListenerMethod$MethodException
Cause: com.vaadin.event.ListenerMethod$MethodException
Cause: org.activiti.engine.ActivitiException: Unknown property used in expression
So at the end workaround was to create start form with L1comment variable but that is rather dirty and unwanted, so my question is: What is the right expression  to define initial variable inside listener?


After dirty workaround mentioned second problem poped out:
Problem2.
Now when process starts and L1 approval is completed there are two tasks for Boss approval.
Is there a way that instance of boss approval created by request task gets destroyed when L1 approval task gets completed and new (more recent) instance of boss approval task appears?
Also, in case boss approves first L1 approval task should be destroyed. Is this possible?
3 REPLIES 3

gnevzmaja
Champ in-the-making
Champ in-the-making
Is there a way to define process variable through listener or any way other than manually through form?

gnevzmaja
Champ in-the-making
Champ in-the-making
Up, please.
Or is this question too trivial to be answered, maybe?

trademak
Star Contributor
Star Contributor
Hi,

No I think the description is a little bit difficult to understand and it would also be better if you include the BPMN 2.0 XML file and the unit test that you are using to run it.

Best regards,