Let's make an example of this process:
- start node
- human task#1
- work item
- humkan task#2
- end
In this example there are two safe states (or persistent ones) human task#1 and human
task#2 where the process instance is saved.
If the work item throws an exception and I notify the manager with the abort method
I'm not expecting the creation of the human task#2 (or the execution of any other
steps); the process must continue later again with the completion of human task#1
So IMHO:
1) human task#2 must be not created
2) process "rollback" and human task#1 turns back from "Completed" to
"Reserved"
Hope it's clear
Thanks,
Giovanni
----- Original Message -----
From: "Mauricio Salatino" <salaboy(a)gmail.com>
To: "Giovanni Marigi" <gmarigi(a)redhat.com>
Cc: jbpm-dev(a)lists.jboss.org, jboss-italy(a)redhat.com
Sent: Tuesday, January 24, 2012 10:50:57 PM
Subject: Re: [jbpm-dev] Question about workitems and abort
Hi Giovanni,
My question to you is exactly what do you mean by the previous safe state?
The previous safe state sounds like right after calling the EJB in
your case. Are you doing sync calls before that error? Can you
describe a little bit more about your scenario and how your activities
are being executed?
Cheers
On Tue, Jan 24, 2012 at 6:38 PM, Giovanni Marigi <gmarigi(a)redhat.com> wrote:
Hi all,
my question is about the completion of a custom workitem; my scenario:
- process reaches and executes a custom work item
- work item throws an exception (under the hood it calls an ejb that throws an
exception)
- the exception is catched inside the work item
- inside the catch block the method manager.abortWorkItem is called
In case of abortion of a work item I'm wondering why the nest step inside a process
is anyway called?
In case of abortion of a work item IMHO the process should not go on but "roll
back" to the previous safe state
This is the scenario my customer need.
Actually I'm facing this situation not calling the method manager.abortWorkItem but
throwing inside the work item a
throw new IllegalStateException("****EJBControlWorkItemHandler:ILLEGAL STATE
EXCEPTION!!!****")
Maybe a solution could be an evaluation of the work item status after the completion of
the work item. Anyway how can I handle an automatically rollback to a previous safe
state?
Thanks,
Giovanni
--
Giovanni Marigi
Red Hat - JBoss Consultant -
email: gmarigi(a)redhat.com
Mobile: +39 3423175986
Office: +39 0687502315
Red Hat Italy
Via Andrea Doria 41m
00192 Roma - Italy
www.redhat.com
Prima di stampare, pensa all'ambiente ** Think about the environment before printing
--
Giovanni Marigi
Red Hat - JBoss Consultant -
email: gmarigi(a)redhat.com
Mobile: +39 3423175986
Office: +39 0687502315
Red Hat Italy
Via Andrea Doria 41m
00192 Roma - Italy
www.redhat.com
Prima di stampare, pensa all'ambiente ** Think about the environment before printing
_______________________________________________
jbpm-dev mailing list
jbpm-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jbpm-dev
--
- CTO @
http://www.plugtree.com
- MyJourney @
http://salaboy.wordpress.com
- Co-Founder @
http://www.jugargentina.org
- Co-Founder @
http://www.jbug.com.ar
- Salatino "Salaboy" Mauricio -
--
Giovanni Marigi
Red Hat - JBoss Consultant -
email: gmarigi(a)redhat.com
Mobile: +39 3423175986
Office: +39 0687502315
Red Hat Italy
Via Andrea Doria 41m
00192 Roma - Italy
www.redhat.com
Prima di stampare, pensa all'ambiente ** Think about the environment before printing