cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johan Stuyts <jo...@hippo.nl>
Subject Re: Experience with workflow at Hippo Webworks
Date Tue, 09 Mar 2004 10:49:47 GMT
On Sun, 07 Mar 2004 18:06:17 -0500, Stefano Mazzocchi <stefano@apache.org> 
wrote:

> Sylvain Wallez wrote:
>
>> Stefano Mazzocchi wrote:
>>
>>> Guido Casper wrote:
>>>
>>>> Stefano Mazzocchi wrote:
>>>
>>>
>>>
>>>>> If FSM work bad for flow, why would they work any better for 
>>>>> workflow?
>>>>
>>>>
>>>>
>>>> After thinking again about ways to use continuations with workflow I
>>>> came to the conclusion this might well be possible. But it looks 
>>>> awkward
>>>> to me.
>>>>
>>>> Each document attached to workflow would need a workflow instance as
>>>> long as the document lives (from creation to deletion). This would 
>>>> mean
>>>> the continuation stack of every document needs to be persisted to - 
>>>> well
>>>> - to a database if you don't want to limit your clustering options. 
>>>> The
>>>> document has a property holding the continuation ID.
>>>
>>>
>>>
>>> You have a point here, Guido. It is true that continuations in a
>>> distributed environment would need to be made custer-friendly and
>>> replicated. This would probably impact the overall performance... but
>>> keep in mind that continuations are just another way to save state.
>>> That kind of state transformation (think REST) will have to be done
>>> anyway.
>>

I thought about this too and think that the current workflow should be 
accessible without the user holding a special token. If I have a tree of 
documents I should be able to invoke any active command on a document in 
that tree.

>>
>>
>> The lifetime of a workflow instance also makes a big difference
>> regarding business process changes. I experienced in a previous job in a
>> large company some workflows (e.g. purchase orders) who changed several
>> times a year, depending on structural changes in the company's
>> organization. And already running instances had to adapt to the new
>> worflow from the state they were in at the date of workflow change.
>>
>> This makes continuations technically not suitable for this, as once a
>> continuation has been created, it's tied to the program's structure
>> where it was created, and it cannot be "rerouted" to a location in
>> another version of the same program.
>>

This won't be easy in state machines either, but I think it is possible if 
you store state paths. When the workflow instance is read by a new 
workflow definition, the definition matches the paths to his states.

>> Furthermore, there exists what is called "ad-hoc" worklows, where a
>> user, depending on its rights, can modify the workflow for a particular
>> instance. An example of this is when a document has to be published that
>> contains highly technical material. The editor may want to add an
>> additional step in the workflow for the document to be validated by a
>> technical expert, which doesn't happen in normal cases.
>>
>> In that situation, asking a user to write a new version of a program for
>> that specific need doesn't seem a good solution to me ;-)
>
> Wait a second: to you think that guy would be more confortable in
> writing a FSM code?
>

I think the option to request review by a technical expert should be 
programmed explicitly by the developers too. Instead of just 'publish' and 
'disapprove', the editor can also invoke 'request technical review'.

> Let's compare apples to apples here: we are not discussing how the
> workflows should be edited, but how they are going to impact our system
> and how we are going to build them.
>
> there are several solution on the table and at least two architecturally
> orthogonal questions:
>
>   1) should the workflow engine have direct data control?

For me the data should reside in the document/object to which the workflow 
instance :) is attached. The only information stored in a workflow 
instance is (possibly) an identifier which can be used to locate the 
document/object.

The actual implementation of the conditions and the actions that get 
executed on certain events should not be in the workflow definition, but 
should be separate. The workflow definition only references these separate 
implementations. The implementations get passed the identifier of the 
document/object when invoked, so they can retrieve the document/object to 
do their work.

>   2) should the workflow engine deal with procedural scripts or finite
> state machines directly?
>

State machine junkie talking: state machines. I see state machines as a 
different way of programming than procedural, and think that coding them 
using procedural code will be more difficult. The conditions and actions 
which connect the workflow instance to the environment it is running in 
are procedural, and that's why I program these in Java (in our demo).

> my take would be
>
>   1) no, it should be saparate, sort of a process knowledge base that
> the flow logic interrogates when it need to
>
>   2) procedural scripts: they are always easier to program
>
> but, there are valid and solid arguments to make me change my mind on 2)
> so I think it's better to explore whatever solution makes more sense
> right now and expand for that, instead of spending too much time on the
> whiteboard without getting anything out of the door.
>

-- 
Johan Stuyts

Mime
View raw message