[jbpm-dev] Question about workitems and abort

Giovanni Marigi gmarigi at redhat.com
Tue Jan 24 17:40:57 EST 2012


"Aborting the work item have a different meaning, it means that it's
not needed any more and the process can continue."

this clarify me a lot! maybe I misunderstood the meaning of abort method inside work items, now it sounds me much more clear.
This says to me that the workitem itself must be a safe point inside the process and its completion or abortion must be done not inside the work item but inside the component called by the work item (must have a reference of WorkItemManager of course)

Thanks a lot Mauricio!

----- Original Message -----
From: "Mauricio Salatino" <salaboy at gmail.com>
To: "Giovanni Marigi" <gmarigi at redhat.com>
Cc: jbpm-dev at lists.jboss.org, jboss-italy at redhat.com
Sent: Tuesday, January 24, 2012 11:27:48 PM
Subject: Re: [jbpm-dev] Question about workitems and abort

It sounds like your scenario must be sequential not synchronous..
Human Tasks are asynchronous by nature, that means that if you are
planning to retry you work item logic it can be async.
Can you elaborate a little bit more about why do you think that is a
work around?

Aborting the work item have a different meaning, it means that it's
not needed any more and the process can continue.

Cheers

On Tue, Jan 24, 2012 at 7:23 PM, Giovanni Marigi <gmarigi at redhat.com> wrote:
> The problem is if I abort the work item the human task#2 is anyway created;
> thats why I'm wondering what is the meaning of work item abort method if the process anyway goes on!
>
> Make the work item logic async could be a "workaround" but it means to change the logic
> in my scenario:
>  - completion of human task 1
>  - work item execution
>  - creation of human task 2
> must be synch
>
> Thanks,
> Giovanni
>
> ----- Original Message -----
> From: "Mauricio Salatino" <salaboy at gmail.com>
> To: "Giovanni Marigi" <gmarigi at redhat.com>
> Cc: jbpm-dev at lists.jboss.org, jboss-italy at redhat.com
> Sent: Tuesday, January 24, 2012 11:15:46 PM
> Subject: Re: [jbpm-dev] Question about workitems and abort
>
> In my perspective if the Human Task #1 is completed the process will
> move to the work item.The Human Task #2 will not be created if you
> abort the work item.
>
> What you can do is to make the internal work item logic to be async.
> In that way it will work as a safe state, and you can retry only the
> work item logic.
> Does it make sense to you?
> Cheers
>
> On Tue, Jan 24, 2012 at 7:07 PM, Giovanni Marigi <gmarigi at redhat.com> wrote:
>> very similar to https://community.jboss.org/thread/170232
>>
>> ----- Original Message -----
>> From: "Mauricio Salatino" <salaboy at gmail.com>
>> To: "Giovanni Marigi" <gmarigi at redhat.com>
>> Cc: jbpm-dev at lists.jboss.org, jboss-italy at redhat.com
>> Sent: Tuesday, January 24, 2012 10:51:31 PM
>> Subject: Re: [jbpm-dev] Question about workitems and abort
>>
>> by the way.. this question should be asked in the forum.. because it's
>> an user question..
>> Cheers
>>
>> On Tue, Jan 24, 2012 at 6:50 PM, Mauricio Salatino <salaboy at gmail.com> wrote:
>>> 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 at 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 at 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 at 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 at 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 -
>>
>>
>>
>> --
>>  - 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 at 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
>
>
>
> --
>  - 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 at 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



-- 
 - 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 at 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



More information about the jbpm-dev mailing list