processi

about processes and engines

<loop> and <cursor>

OpenWFE process definition language is nicknamed POOL, for Process Oriented OpenWFE Lisp | Language.

The most used expressions in OpenWFE are <sequence> and <participant> as in

    <sequence>
        <participant ref="customer" />
        <participant ref="delivery_service" />
        <participant ref="invoicing_service" />
    </sequence>

It is very demanded to be able to go back and forth within a sequence, thus the <cursor> expression got created :

    <cursor>
        <participant ref="writer" />
        <participant ref="reviewer" />
        <participant ref="editor" />
    </cursor>

The <cursor> command is driven by the field named __cursor_command__, which can take the value back (among other) and make the cursor go back one step.

Initially, the <loop> expression was ‘standalone’, after a bit of reflection, it was turned into an extension of <cursor>. It’s now a cursor who loops until a ‘break’ / ‘exit’ __cursor_command__ is flagged.

One could say that the <sequence> expression is doomed. Well not exactly : this old expression links its children expression as an optimization, the cursor doesn’t do it (and is not meant for such a ‘flattening’), it has to be able to redo its backward segment.

You might also be interested in the expression set : <do>, <redo> and <undo>.

Written by John Mettraux

March 14, 2006 at 7:21 pm

Posted in openwfe, workflow

%d bloggers like this: