Monday, January 13, 2014

#302 Using the Human Workflow Event mechanism

Simple scenario - I want to pick up any re-assignment of tasks made in BPM workspace.

Here is my sample process -

All that is really salient for this example is the human task.

So I need to pick up any reassignments - firstly, I activate workflow events.
Amend the task definition as follows -

In the above, I activate for OnAssigned, OnCompleted and OnUpdated.
For my particular use case I only really require OnAssigned.

Once the task has been re-assigned, an EDN event will be thrown. The event definitions are stored in MDS -

This .edl file contains the XSDs of the OnAssigned etc. messages.

I now add a Mediator to my composite to subscribe to this event - As you can see, I simply write the data to a file.


So let's now look at the mapping for OnTaskAssigned

You see I am filtering on reassigns only.

Now to the mapping -

I have defined the file adapter to use the same message type -


Task is assigned to jcooper

I now reassign to jstein

Output file is generated

All that remains to be done is to pare down this info into something somewhat simpler.

The above message does not contain the actual task payload. 

So what can I do, if, for example, I want to see the orderNr of the reassigned order?

A simple method is to use the workflow flex fields -

I map the incoming order  nr to 

I re-test -

No comments: