0 Replies Latest reply: Sep 5, 2011 1:03 AM by user335369 - oracle RSS

    Custom Escalation in Human Task in Oracle SOA BPM 11g

    user335369 - oracle
      This is a sample that demonstrates custom escalation in Human Task in Oracle SOA BPM 11g.

      package oracle.bpel.services.workflow.assignment.dynamic.patterns;

      import java.util.Map;

      import oracle.bpel.services.workflow.assignment.dynamic.DynamicAssignmentException;
      import oracle.bpel.services.workflow.assignment.dynamic.IDynamicTaskEscalationFunction;
      import oracle.bpel.services.workflow.task.impl.WorkflowUtil;
      import oracle.bpel.services.workflow.task.model.Task;

      import oracle.tip.pc.services.identity.LocalIdentityService;


      public class CustomEscalation implements IDynamicTaskEscalationFunction {
      public CustomEscalation() {
      super();
      }

      public String getTaskEscalationUser(Task task) throws DynamicAssignmentException {
      String currentAssignee;
      try
      {
      currentAssignee = WorkflowUtil.getCurrentAssignee(task);
      return getTaskEscalationUser(currentAssignee);
      } catch (Exception e) {
      throw new DynamicAssignmentException(e);
      }
      }

      public String getTaskEscalationUser(String user) throws DynamicAssignmentException {
      try
      {
      if (user == null)
      return null;

      String manager = null;
                /**
                * Replace below code with your acutal logic.
                */
      // if( user.equalsIgnoreCase("john")){
      // manager="jcooper" ;
      // }
      return manager;
      } catch (Exception e) {
      throw new DynamicAssignmentException(e);
      }
      }

      public void setInitParams(Map map) {
      }

      public String getFunctionName() {
      return "CUSTOM_ESCALATION";
      }

      public String getDescription() {
      return "Custom Escalation";
      }
      }

      Please refer below link to register above custom escalation class on SOA Server.
      http://download.oracle.com/docs/cd/E14571_01/integration.1111/e10224/bp_hwfmodel.htm

      regards.