Creating Custom Actions and Attributes for a BPM Task in 5 Easy Steps
As the title suggests, this document will show us how to:
1. Create Custom Attributesfor a Task
2. Create Custom Actions for a Task.
3. How they look in the BPM Inbox.
4. Basic Advantages
Applies to: NetWeaver 7.3 EHP1 (7.31) & above.
1. Double-click on the Human Activity in your BPM Process to open its Properties :
2. In the ‘Task’ property of the Human Activity, click on the ‘Task’ link as shown to open the Task Properties :
3. Now click on the ‘Attributes and Actions’ tab in the Task Properties:
– You will see 2 sections, one for Attributes and Actions each in the new property page:
4. Now, in the Custom Attributes section, click on ‘Add’, edit the name of the attribute (this will be the unique identifier for the attribute), edit the label of the attribute(this is how the attribute will be displayed in the BPM inbox along with the task), define the type (datatype) and the expression (if the attribute is going to have data from the task input):
5. Now, in the Custom Actions section, click on ‘Add’, edit the name of the action* (this will be the unique identifier for the action), edit the label of the action (this is how the Action will be displayed in the BPM Inbox) and enter the description (not mandatory):
The value which is entered in the ‘Name’ property of the Custom Action, this exact value will be captured in the data object mapped with this action in the output mapping of the Human Activity.
Output Mapping of Human Activity:
That’s it ! You’re done !
Build and Deploy your BPM and start a new process.
Let’s see how these things look in the BPM Inbox.
Initially, you would not be able to see the Custom Attributes/Actions :
For this, we have to filter the task according to the description. So, we will click on the Filter button first and then select the desired Task Description:
Once this is done, we will be able to see both, the Custom Action and the Custom Attribute we defined earlier:
When you select the task and click on the Custom Action to act on the particular task, the task will be acted upon without even opening it.
The value in the ‘Name’ property of the custom action which we defined earlier, will be stored in the data object mapped with it (as shown in the output mapping above).
Further decision-making can be done in the process design based on this value in the data object.
Value in the Data Object after clicking onCustom Action to complete a Task:
Advantage of Custom Attribute:
The custom attribute helps the Business User to identify the data in the Task. Hence, he can act upon the task based on the data which he sees in the Inbox along with the task.
Advantage of Custom Action:
The biggest advantage of Custom Action is that the Business user can act upon the corresponding task without even having to open it. When coupled with custom attribute, Custom Actions will be a very powerful tool when it comes to Actions such as Mass Approvals or Mass Rejections.
Hope this document proves useful. Please correct me if I am wrong somewhere.
Excellent Explanation of Custome Attributs & Custome Actions, How to use.
Really help full.
Keep up the good work.
Thanks a lot. Appreciate the feedback. 🙂
simple and straight.. good article.