3 Replies Latest reply: Apr 23, 2012 7:53 AM by 931135 RSS

    Parallel flow


      We have the following requirement. We have a manual task that should be either completed by a user , or if a specified time duration expires it should be automatically completed. We tried using jeopardy notification , but through the jeopardy notification automation we can't use the completeTaskOnExit in order to proceed the task. We also tried using a parallel flow , with the manual task in the first parallel flow and a timer delay on the second parallel flow , but we were not able to complete the manual task in the first parallel flow, when the timer delay expired.
      If you have any experience regarding parallel flows , could you pls help?

        • 1. Re: Parallel flow

          use auttomated task instead of manual task, donot add anything in the automation tab, instead use jeopardy as you are using it in manual task.
          Note* behaviour dont work in autmatted task.

          your second approach is also good but you use join to add two parllel flow with condition as ALL, which is defined at property tab below when you use join.

          I hope this answers your query.

          • 2. Re: Parallel flow
            Hi again,

            I am using the following xquery in the jeopardy tab of the automated task :

            declare namespace oms="urn:com:metasolv:oms:xmlapi:1";
            declare namespace context = "java:com.mslv.oms.automation.TaskContext";
            declare namespace automator = "java:oracle.communications.ordermanagement.automation.plugin.ScriptReceiverContextInvocation";

            declare variable $automator external;
            declare variable $context external;

            let $run :=
            context:completeTaskOnExit($context, "next")


            where (fn:exists($run))

            but i am getting the following error : External object has wrong class (is class com.mslv.oms.automation.OrderNotificationContextBeanLocal, expected interface com.mslv.oms.automation.TaskContext) . If i use the following :
            declare namespace context = "java:com.mslv.oms.automation.OrderNotificationContext"; i cannot use the completeTaskOnExit function in my xquery, and i get the following error :
            Cannot find a matching 2-argument function named {java:com.mslv.oms.automation.OrderNotificationContext}completeTaskOnExit()
            Can you please help?
            • 3. Re: Parallel flow
              Hi, took me a while to figure it out.
              We were confronted with the same task on a past project.
              We finally implemented a custom automator which cast the context object to TaskNotificationContext.
              So that would be one option for you.

              The reason why OSM invokes your automator with OrderNotificationContext is that in case of a multi-instance task, the jeopardy is raised only once at order level thus not connected to a specific task instance. However, there is a way to raise the jeopardy in the context of the current task by checking the "Raise a jeopardy for each branch check box".

              It works, I tested it!!!

              my code:

              declare namespace oms="urn:com:metasolv:oms:xmlapi:1";

              declare namespace context = "java:com.mslv.oms.automation.TaskNotificationContext";

              declare variable $context external;

              let $exitStatus := "next"

                   context:completeTaskOnExit($context, "next")

              You might also want to include some extra logic to skip accepting when the order is already accepted or assign it to the automated user...

              Edited by: viktor.jarolim on 23.4.2012 5:51