How to exclude the requester from offered profiles in a user task, using a UserTask extension.

How to exclude the requester from offered profiles in a user task, using a UserTask extension.

book

Article ID: KB0073465

calendar_today

Updated On:

Products Versions
TIBCO EBX All supported versions.

Description

This article shows an example of UserTask extension that allows to dynamically offer/allocate a user task.

Requirement

Consider a workflow that has two steps: a requester step and an approver step.
In the requester step, a user has to do some creations/updates/deletions. 
Then, in the approver step, a user needs to approve these modifications. 
What we want here is to exclude the requester from approving his own modifications, by excluding him from offered profiles in the approver step.

This can be achieved by implementing a user task extension, which we will apply on the approver user task.

Issue/Introduction

How to exclude the requester from offered profiles in a user task, using a UserTask extension. How to dynamically offer/allocate a user task.

Resolution

You will find the ExcludeRequesterFromOffering user task extension implementation in the attachments of this article.

Configuration

First, your module has to be specified in the workflow model configuration.
This class has an input parameter: requesterStepId.
You can find the requester step id by opening the requester step in the workflow model.
Its value has to be specified in the approver user task extension configuration.
See example configuration:

User-added image

Results

In our example, the requester step was completed by 'admin' user.
We decided to offer the approver step to [all profiles] (built-in "Everyone" role):

User-added image
We can see that the approver work item was successfully offered to all users except 'admin':

User-added image
 

Additional Information

https://docs.tibco.com/pub/ebx/5.9.13/doc/html/en/Java_API/com/orchestranetworks/workflow/UserTask.html

Attachments

How to exclude the requester from offered profiles in a user task, using a UserTask extension. get_app