BPM Human Task activity is configured with outcomes. Based on these outcomes, buttons in ADF UI are constructed allowing user to perform different actions with the task. Auto generated ADF Human Task form contains a set of predefined buttons and this set is controller with rendered flag. My sample application is using different approach, it implements custom tasks table and dynamic ADF UI for the human task input form - Dynamic ADF Form Solution for Oracle BPM Process. Once user selects a task, action buttons are generated dynamically - using a set of outcomes configured for the particular task.
Here you can download complete sample application - adfbpm11gr4.zip. This application implements a method based on BPM API, where a list of outcomes by the currently selected Task ID is fetched from BPM engine:
Each outcome is represented by ActionType. I'm constructing a list of outcomes to be used on ADF UI. There is ADF UI iterator components on the fragment, this component is generating dynamic buttons, based on the constructed set of outcomes. Outcome name is used to set button name and outcome itself is used as attribute value for the generic action listener method:
Generic action listener method is responsible to parse outcome name, initialise a payload if needed, and execute BPM API to submit the outcome for further task processing:
We can check how this works. There is a human task AssignEmployee with SUBMIT outcome, in the sample application:
Task action button is generated accordingly - there is only one Submit action button for the selected task:
The next human task ApproveEmployee is set with two outcomes - APPROVE and REJECT:
Based on the set of the outcomes, two buttons are present now - Approve and Reject:
Here you can download complete sample application - adfbpm11gr4.zip. This application implements a method based on BPM API, where a list of outcomes by the currently selected Task ID is fetched from BPM engine:
Each outcome is represented by ActionType. I'm constructing a list of outcomes to be used on ADF UI. There is ADF UI iterator components on the fragment, this component is generating dynamic buttons, based on the constructed set of outcomes. Outcome name is used to set button name and outcome itself is used as attribute value for the generic action listener method:
Generic action listener method is responsible to parse outcome name, initialise a payload if needed, and execute BPM API to submit the outcome for further task processing:
We can check how this works. There is a human task AssignEmployee with SUBMIT outcome, in the sample application:
Task action button is generated accordingly - there is only one Submit action button for the selected task:
The next human task ApproveEmployee is set with two outcomes - APPROVE and REJECT:
Based on the set of the outcomes, two buttons are present now - Approve and Reject:
Amazing, thanks.
ReplyDeleteHello Can you reupload your example ?
ReplyDeleteYou should be able to download it.
ReplyDeleteAndrejus
Thanks you Andrejus!
ReplyDeleteHuy
I have tested IntegratedBPMWorklistApp on BPM 11.1.1.7 version.
ReplyDeleteIt work with this classpath (all needed jars you can find under jdeveloper\soa\modules)
Hello Andrejus, thx a lot for this blog.
ReplyDeleteA small question: where do you get the BPMContextUtils class from? I'm trying to implement a custom submit button in an ADF Human Task. I want to perform some checks (call to a service) before ending the form. I'm not sure what action I should use to put in my custom submit button.
Thx for your help.
Filip