Re: Transactions on Tool Activities

Sasa Bojanic <[email protected]> Thu, 14 Dec 2006 08:41:09 +0100
Newsgroups gmane.comp.java.enhydra.shark
Message-ID <[email protected]>
This is a multi-part message in MIME format...

------------=_1166081923-12797-3
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable

Hi,

new version does support Wf-XML, but the implementation is still too=20
buggy. However, you should be able to use this implementation to=20
upload/download/update  XPDL.
We are currently working to improve the implementation to support all=20
operations.

Greetings,
Sasa.

Ignacio Talavera wrote:
> Hi, does the new relase of shark support notification of events via=20
> WF-XML?,
> because with the older version I could not make it owrk properly. If=20
> it does
> how can I use it , AuditEventNotification.
>
> Thanks.
>
>
> On 12/13/06, Sasa Bojanic <[email protected]> wrote:
>>
>> Hi,
>>
>> shark works just like you expect. When you call complete() on Manual
>> activity, manual activity will be finished and it will execute any
>> subsequent Tool activities in the same method call.
>> In your case, you create and begin user transaction before completing
>> activity A, and you are committing transaction after you call complete()
>> method for this activity. During complete() method call, activity A will
>> be brought to state closed.completed, activity B will be created and
>> started and three tool agents for this activity will be executed,
>> activity B will be finished and brought to state closed.completed, and
>> since there is nothing to do in the process, process will finish and
>> will come to state closed.completed.
>> If anything goes wrong during any of these steps, it will be like
>> nothing happened  (like you never called complete on activity A).
>>
>> Look at shark as to the process state engine, and the states of the
>> process are represented by the manual activities. Automatic activities
>> are executed using the same UserTransaction your client application
>> creates before completing manual activity.
>>
>> In the following scenario:
>>
>>   Start -> A (manual) -> B (tool) -> C (tool) -> D (manual) -> Finish
>>
>> when you say something like:
>> // UserTransaction ut;
>> // WfActivity actA;
>> try {
>>     ut=3DgetUserTransaction();
>>     ut.begin();
>>     actA.complete();
>>     ut.commit();
>> } catch (Exception ex) {
>>     try {
>>         ut.rollback();
>>     } catch (Exception _) {}
>> }
>>
>> activity A is completed, activity B is created, its tool agent is
>> executed and it is completed, activity C is created, its tool agent is
>> executed and it is completed, and finally activity D is created (and
>> also assignments for activity D are created).
>>
>> Greetings,
>> Sasa.
>>
>> [email protected] wrote:
>> > Hi all,
>> >
>> >    I understand that for all handling I do on activities and=20
>> processes I
>> must manually create the UserTransaction and call the begin() and=20
>> commit(),
>> and that's OK. However, what is the behavior for tool activities with
>> automatic start and automatic end? Imagine the following scenario:
>> >
>> >   Start -> Activity A (no implementation) -> Activity B (three mapped
>> tools in a row) -> Finish
>> >
>> >   Suppose that Activity A has manual start and manual end. Suppose=20
>> that
>> the user (through some Shark client application) starts and completes=20
>> the
>> Activity A, calling the transaction.begin() just before doing it and
>> calling the transaction.commit() just after doing that. I suppose now=20
>> that
>> Shark engine is going to invoke the three tool activities, right?=20
>> However,
>> who's going to create the user transaction, call the begin() just before
>> invoking the tools and call the commit() just after that? I mean,=20
>> these must
>> be done or else the start/completion of Activity B will not be=20
>> performed on
>> the Shark engine database, right?
>> >   Also, if it is done somewhere, can you ensure me that the begin() is
>> called before invoking the first tool, and that the commit() is=20
>> called just
>> after invoking successfully the third tool?
>> >   Finally, is there any means to use the Shark engine-created
>> transaction for the tool activity on the invoked tools? I mean, these=20
>> tools
>> will be mapping applications which are in fact Java fa=E7ades to database
>> operations, and I would like to only "complete" the tool activity=20
>> only if
>> these three operations are successful, and vice-versa, only to commit=20
>> the
>> results of the three operations if the Shark engine DB is successfully
>> updated.
>> >
>> > Thanks in advance!
>> >
>> > Regards,
>> >
>> > Fuad Abinader
>> >
>> >
>> >=20
>> ------------------------------------------------------------------------
>> >
>> >
>> > --
>> > You receive this message as a subscriber of the=20
>> [email protected] list.
>> > To unsubscribe: mailto:[email protected]
>> > For general help: mailto:[email protected]?subject=3Dhelp
>> > ObjectWeb mailing lists service home page:=20
>> http://www.objectweb.org/wws
>> >
>>
>>
>>
>>
>>
>> --=20
>> You receive this message as a subscriber of the=20
>> [email protected] list.
>> To unsubscribe: mailto:[email protected]
>> For general help: mailto:[email protected]?subject=3Dhelp
>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>
>>
>>
>
> ------------------------------------------------------------------------
>
>
> --
> You receive this message as a subscriber of the [email protected] maili=
ng list.
> To unsubscribe: mailto:[email protected]
> For general help: mailto:[email protected]?subject=3Dhelp
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>=20=20=20



------------=_1166081923-12797-3
Content-Type: text/plain; name="message-footer.txt"
Content-Disposition: inline; filename="message-footer.txt"
Content-Transfer-Encoding: 8bit


--
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

------------=_1166081923-12797-3--