processi

about processes and engines

getFlowPosition

There’s a question that comes often : “how do I know where I am in my running flow ?” to which I usually reply “you look at your worklist to see which participant has a workitem for that workflow instance”.

I agree, it may become awkward.

So I’ve just added a getFlowPosition(workflowInstanceId) method to the Control system of OpenWFE workflow engine.

The control system is an interface accessible via RMI or via REST which allows some basic engine administration, like stopping a workflow instance or cancelling it.
Until now, it only had one method for looking up expressions currently in the engine, which returned all the expressions composing all the workflow instances.

The method freshly added is named “getFlowPosition”. An example of its usage, let’s say you’ve got this process definition :

<concurrence>
    <sequence>
        <participant ref="a" />
        <participant ref="b" />
    </sequence>
    <participant ref="c" />
</concurrence>

the flow is at participants b and c and the instance id is 54321. A call to getFlowPosition(54321) will yield something like :

 - 54321 flow 1.0 participant 0.0.0.1
 - 54321 flow 1.0 participant 0.0.1

Unfortunately, for now, the participant name is not transmitted. For a flow where it’s determined dynamically (say it’s taken from a field, a function or a variable) that info might be very useful. A feature for later.

getFlowPosition() is part of the current (Tue Dec 26 16:50:33 JST 2006) snapshot release (via Maven2).

Written by John Mettraux

December 26, 2006 at 6:52 am

Posted in openwfe, workflow

2 Responses

Subscribe to comments with RSS.

  1. When will this feature be available on java version?

    Thx

    Thomas

    February 1, 2007 at 4:08 pm

  2. It is already available as stated in the post.

    Best regards,

    John

    John Mettraux

    February 1, 2007 at 11:09 pm


Comments are closed.

%d bloggers like this: