about processes and engines

a variation on users and participants

The OpenWFE worklist relies on two main concepts : workitem stores and users. Users are granted access rights to each store. By default a read access right allows to read any workitem in a given store. But you can swap the strategy a store uses to filter workitems presented to each users.
I already blogged about the UserGetStrategy and the ParticipantGetStrategy.

The technique displayed in this blog post uses a new feature requested (and heavily tested) by Sebastian (thanks). This feature permits the usage of regular expressions instead of plain usernames in passwd.xml :

        <grant name="store.u" />
        <grant name="launch.more" />

With this configuration, any user named ‘user-toto’ or ‘user-whatever’. This ‘set’ of users all share the same password (in this example, it’s “user”).

The initial advantage is reduced administration burden. You might reply that having one system user was already minimizing the administration burden, but this ‘generic user’ feature is a variation on that ‘system user’ theme. New participant names may appear in process definitions without any configuration modification.
Read further to see how it could get leveraged along with the ParticipantGetStrategy.

We have to make sure that any workitem for a participant whose name begins with “user-” gets dispatched to our classical worklist (by tweaking participant-map.xml) :

    <participant name="user-.*">

Next, (as could be found in etc/worklist/worklist-configuration.xml), we define a store named “Store.users” which ‘collects’ the workitem for participants whose name starts with “user-” :

            <param-value>admin-.*, user-admin</param-value>

Note the parameter ‘adminUsernames’, the matching users see all the workitems in Store.users, no filtering for those “admins”.

A typical flow would look like :

<process-definition name="demo" revision="0.1">
        <participant ref="user-alfred" />
        <participant ref="user-bernard" />
        <participant ref="user-corwen" />

Finally : no need to add users to the system, any username starting with user- is valid and there’s a corresponding participant name. The ParticipantGetStrategy is here to make sure that “user-toto” only sees workitem dispatched for the participant “user-toto”.
It’s simple and very effective (but may seem non-intuitive to some of OpenWFE ‘consumers’, who won’t understand the “one password for a set of users” thing)

This technique is documented in the OpenWFE manual.

Written by John Mettraux

July 4, 2006 at 8:55 pm

Posted in bpm, openwfe, workflow

%d bloggers like this: