You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Andreas Hartmann <an...@apache.org> on 2003/05/30 10:58:29 UTC

[Workflow] How to trigger transactions

Hi Lenya developers,

I'm looking for the best way to integrate the workflow
engine with our existing codebase.

The question is how transactions should be triggered (from
the implementation point of view). IMHO a transaction should
fire only when the corresponding actions are successfully
completed. Otherwise, the transaction would have to be
"reversed", which is AFAIK not a typical or desirable automaton
feature.

The key requirements for a transaction invocation mechanism are:
(a) consideration of success / failure of the executed actions
(b) compatibility with sitemap-based and scheduler-based execution

Workflow action candidates are currently be implemented as

- lenya.cms.task.Tasks
- cocoon.acting.Actions (image upload, ...)
- ... (?)

If we restricted them to Lenya tasks, everything would be very
easy as the workflow increment could be implemented in the
AbstractTask class. This would be compatible with both sitemap and 
scheduler invocation. Otherwise, it will be difficult to implement
a transparent solution that must not be considered explicitely when
implementing a special action.

If we use a cocoon.acting.Action-based solution, it will be hard to
comply (a).

A transformer could comply (a), but this would require the
action (Action / Transformer / Generator, ...) to produce an XML
fragment that is recognizable by the transformer as success / failure
message.

I'm afraid we have to call workflow actions from a Cocoon-independent
Java context that takes care of the transaction invocation. This
would require

(1) a general interface for workflow actions or
(2) a set of invocation context implementations that cover all possible
     workflow action invocations.

Maybe you have better ideas, those are just my first thoughts.
What do you think?

Andreas




---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org