Showing posts with label Human task. Show all posts
Showing posts with label Human task. Show all posts

Monday, 23 November 2015

Parallel and Serial assignments in Oracle BPM human tasks

In this post I will discuss on parallel and serial assignments of human tasks in oracle bpm.

Parallel assignment:

  • This option will be used when we need parallel approval for a specific task. 
  • Users jack, rose and andy should need to approve/reject the task in parallel.
  • We can specify the list of users as a comma separated string in human task assignment.
  • We can decide the vote outcome by specifying condition on the percentage of the outcome by the parallel participants.
  • In the below example I am setting the outcome as reject even if one of the users rejects (My requirement is it is considered as approved when all the users approve it, if any one user rejects and the task should be considered as rejected).
Serial assignment:
  • Serial assignment is just the task goes to each mentioned users in sequence for approval.
  • users jack, rose and andy should need to approve/reject the task in sequence.
  • We can configure the serial assignment in such way that if any of the users rejects the task then task will not move to the next users. It will directly by considered as rejected.
  • Click on the pencil icon in the assignment tab of the human task.

Sunday, 5 May 2013

Executing custom logic in BPM human task

Scenario: Excuting a custom logic in BPM human task before calling the action of BPM services. 
Let us think that we want some custom logic to be executed on click of Approve/Reject button in BPM human task. 

Solution:
To achieve this, we need to follow the below two steps,

Step 1: Write a managed bean and a submit method and write your custom code first and then the below code to invoke the BPM services.

public String submit(){
       // Custom Logic goes here.............................

        //Invoking BPM Services
                    Map map =
                        FacesContext.getCurrentInstance().getExternalContext().getRequestMap();
                    oracle.bpel.services.workflow.worklist.adf.InvokeActionBean invokeActionBean =
                        (oracle.bpel.services.workflow.worklist.adf.InvokeActionBean)map.get("invokeActionBean");

                    String result = invokeActionBean.invokeOperation();
                     return result;
    }


Step 2: Configure this method as action method in the jspx for the Approve/Reject/Ok button.

                                               text="#{wf:getResourceValue('OK', 'bindings.customActions')}"
                                               disabled="#{!bindings.OK.enabled}"
                                               action="#{pageFlowScope.managedBean.submit}"
                                               partialSubmit="false"
                                               visible="#{wf:isCustomActionAvailable('OK', 'bindings.customActions')}"
                                               id="ctb1">
                       
                                     value="bindings.OK"/>