Wiki News Projects Sources Tasks New Task Reports
WorkflowWithTaskAssignment
Page Info Get as PDF

Workflow With Task Assignment

Previous Article demonstrated how to start task and assign specified step to the owner of task - person who created it.

But that about a little bit more complex case? If during task processing we need to make decision about assigning task to somebody else (example is ToDoProcess build-in into EmForge)?

To do it with EmForge and jBPM you can use special variable AssignTo. In step, there you need to make decision, who will be 'Assignee' for this task you need to add this variable into task controller

To Assign required step to person, specified in AssignTo variable you will need to edit Workflow Sources. To do it need to switch to 'Source' view of workflow and find the task-node with task you need to assign to 'Assignee'. To say jBPM to use AssignTo variable for assignment you need to use EmForge defined assignToUser bean:


<task-node name="Accept ToDo">
    <task description="You may accept todo for working on it, request reassign it to somebody else or ask any additional information">
        <assignment config-type="bean" class="org.springmodules.workflow.jbpm31.JbpmHandler">
            <beanName>assignToUser</beanName>
	    <factoryKey>jbpmConfiguration</factoryKey>
        </assignment>
    </task>
...
</task-node>

Not so easy, but it demonstrate good integration of of jBPM with Spring Framework with using Spring-jBPM31 Module. You can define any logic as Spring Beans, and easily inject it into jBPM process - as assigner, as action, as event.

Then you will try to execute such process in EmForge, on 'Assign ToDo' step ou will able to choose the user. Later, this used will be assigned for 'Accept ToDo' step.

Please, note, not all users, available in the system will be displayed in combobox (since there may be many users registered in the system) - but only users, assigned to any Role in the Task's Project.

Assigning Steps to the users with some role in the project is much more easy - how to do it is described in next article.

Last Modified by akakunin 8 months ago
Comments (0)
Login to add comment
Attachments (2)