[Design of JBoss jBPM] - Re: Cancelling a task fires task-end event
by kukeltje
"jbarrez" wrote : (Hijacking the thread again :p)
|
Accepted
"jbarrez" wrote :
| Ronald, is it possible to make a blog post about it or was it for a customer? I'm interested in seeing your approach ... perhaps we can exchange our ideas?
|
working on it, escalating tasks was part of it... not all will be in there since it would become to complex, but it is another nice example that you can do lots of things with jBPM with small amounts of additional code
"jbarrez" wrote :
| eg. we had to create a special actorId 'parser' by using a 'role:assigned_to' string: if the assigned_to it meant that no-one was working on it, else the task is visible to anyone of the role.
Hmm.... we could just use pooled actors (which were group/role names). If you want to discuss this more easily, contact me on aol/msn/skype, is all in my profile
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4180746#4180746
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4180746
16 years, 3 months
[Design of JBoss jBPM] - Re: Cancelling a task fires task-end event
by thomas.diesler@jboss.com
Actually, cancelling needs to be addresses in a much broader and general sense.
The loose term of cancel applies to many scenarios. From what I can see few of which are well defined
* cancelling a process definition
- cascading to process instance or not
- allowing running instances to terminate gracefully or not
* cancelling a process instance
- implicit cancelling through RuntimeException
- explicit cancelling through user exception
- model defined error flow
- model defined compensation flow
* cancelling of single task instance
- general support for multiple task instance
Also, how does an error during signal and message processing affect the process instance i.e. should the process be cancelled or not.
The above is merely a loose collection of related topics without the claim for completeness. The scope of cancel support can be defined for 1-Jan. However, please beware that there are much more basic and urgent topics to be covered.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4180745#4180745
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4180745
16 years, 3 months
[Design of JBoss jBPM] - Re: Cancelling a task fires task-end event
by kukeltje
anonymous wrote : Then you are missing the TASK_END event if the task is cancelled. People for who see 'finishing a task ' (ie. cancelling or completing) as the end of a task (which is conceptually also correct) and now simply use an event handler for the TASK_END event are obliged to use 2 event handlers now.
|
I know, but it should not limit us (and it should not be neccesarilly be in 3.3 (I created my own local patch), or we can even do something like
| if (this.isCancelled {
| task.fireEvent(Event.EVENTTYPE_TASK_CANCEL, executionContext);
| task.fireEvent(Event.EVENTTYPE_TASK_END, executionContext);
| } else {
| task.fireEvent(Event.EVENTTYPE_TASK_END, executionContext);
| }
|
or even
| if (this.isCancelled && jbpm.properties.Task-cancel-event-backwards-compatibility != true) {
| task.fireEvent(Event.EVENTTYPE_TASK_CANCEL, executionContext);
| } else {
| task.fireEvent(Event.EVENTTYPE_TASK_END, executionContext);
| }
|
and make that property by default true.... but that is probably what Tom want's in the task specific config file...
Still.... I get the feeling that extending the 'task handling process' a little is not wrong, but making it really configurable is imo well.. not realy a waste of time, but certainly not high priority... what we have is not that wrong. Putting two eventhandlers on a definition is supported *now*, making it configurable takes a lot of time
anonymous wrote : but I did have a use case in which the states of a task were THE most import thing: cancelled, suspended, ended, assigned but not taken, working on it, etc. all those states were possible for a task. So you can imagine I would have been very happy at that moment if I had some more options ... we had to juggle a bit with task variables to get it all done.
|
Hmm... I did something similar once in a p.o.c. but did not use/need any variables. Maybe because we took another angle on it, but I could deduce all from the methods on the task. Otoh, we did not have to query for them, the number of tasks we that limited that we could use the default tasklist query and filter afterwards.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4180739#4180739
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4180739
16 years, 3 months