2 Replies Latest reply: Dec 1, 2012 11:14 AM by user12304177 RSS

    Human Task : assign task to user at runtime based on some conditions

    user12304177
      HI ,


      I have a requirement that is, Assign task to users/ groups at runtime for approval based on material qty. please help me in design approach to achieve the same.

      thanks in advance.
      Guru
        • 1. Re: Human Task : assign task to user at runtime based on some conditions
          Ravi Jegga
          Hi Guru
          You can achieve this with and without business rules. I am assuming you have a payload with element like "qty". In task details page or somehow, this gets filled. Now later on you can have like this:

          1. Without Business Rules:
          a) Lets assume you have human tasks like ApproverDefault, Approver100, Approver200, ApproverAll etc.
          b) After your first Task, add a XOR Gateway. Default path of XOR goes to ApproverDefault. Then you have like 3 more paths with Conditions like qty between 0 and 100 goes to Approver100. Qty between 100 and 200 goes to Approver200. Qty more than 200 goes to ApproverAll.
          Quantity
          No conditions (Default) -> ApproverDefault
          qty < 100 -> Approver100
          qty > 100 and qty < 200 -> Approver200
          qty > 300 -> ApproverAll.

          2. With Business Rules
          a) This needs some learning. Please do refer detailed online docs. I am just giving brief steps. Create extra fields of type Boolean in payload like AutoApproved, NeedApproval100, NeedApproval200, NeedApprovalAny etc. Have more meaningful names as per your requirement and human task though.
          b) You need to drag and drop Business Rules component and edit it in JDeveloper.
          c) First create a Bucket set with Range of Values for Qty field like -infinity to 0, 0 to 100, 100 to 200, 200 to infinity. You just enter rows like 0, 100, 200, and rest is taken care to add these Ranges.
          d) Now create Decision Rules. For each range, create a action and set the flag(s) appropriately.
          e) See hello world example for exact steps and full understanding.
          http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/obpm/11g/r1/firstProcess/firstprocess_obpm11g.htm

          Pros & Cons:
          a) Without Business Rules is very simple and straight forward. Quick and easy to develop and test. But if you want to control the range of values for qty, you need to modify the process and redeploy. Its kind of tight.
          b) Business Rules gives more flexible. You can change qty at run time, provided you use BPM Composer. But takes some learing and needs some debug if it fails like that.
          There are many differences and pros and cons. But above are the main ones.

          If you are a beginner, go with First Approach for now.

          Thanks
          Ravi Jegga