Hi, charles chen.
I think what you can't do it in "on entry actions", because UserTask is only asynchronous workItem with special WorkItemHandler.
jBPM execute UserTask in sequence
1 on entry Action
2 create WorkItem
3 create UserTask On Task Server
4 complete User Task On Task Server
5 complete workItem
6 on exit Action
So, nothing terminate when you catch "On Entry Action"
But you can add TaskEventListener and try skip UsetTask in TaskCreateEvent.
Sorry, for my poor english.
Dear Sergey Kornilov,
Many thanks to your enthusiastic reply.
I could not find a way to "add TaskEventListener and try skip UsetTask in TaskCreateEvent" to User Task in jbpm6-console
with KIE workbench for my B/S architecture after my investigation yesterday evening.
So, I am puzzled again.
Otherwise, would I have to make 2nd-development to jbpm6-console?
Thanks in advance!
why not make use of gateway that decides if the task should be created or not? If a flag is set then you won't even go to the user task so no need for any special and what's worse hidden decision points. Simply use process variable to keep the flag value and the define conditions on the outgoing sequence flows of the gateway depending on the flag value.
Dear Maciej Swiderski,
Sorry for my reply so late!!!
Could you please give me an opportunity to explain the reason why I have not use the gateway?
In the beginning, I used gateway in embedded sub-process in JBPM6 console.
But after a while, I found that the embedded sub-process cannot been collapsed
due to it was not same as operation hint as it in eclipse with JBPM6 designer plugin
(I mentioned in the first post).
So, I have to think another way to replace the sub-process, and then I investigated
the User Task.
I think that the key point of this issue is not the usage of gateway, do you think so?
I hope you have understood my explanation above.
Does any other valuable clue exist?
Thanks in advance!
Charles, don't really understand what subprocess has to do with the actual process design? Regardless if you use gateway or just user task subprocess is not required. Moreover the subprocess collapse feature is "just" visualization feature and does not have any impact on the execution. If you need collapsed version you can always mode that as two processes and then use call activity to use the subprocess as reusable from within the top level process.
Relying on on entry action makes your process definition dependent to jbpm specific constructs and hides the business knowledge. So I still would model it with explicit decision point meaning gateway.