This discussion is archived
6 Replies Latest reply: Oct 9, 2012 12:32 PM by jgallego RSS

Events and Jeopardies problems in manual and automated task

jgallego Newbie
Currently Being Moderated
Hi all,

I have an automated task that has an event in receive state and an internal Xquery automator. The event takes information from de order and send it to a specific queue, then the automator updates the orders to indicate that the information was sent.

I have noticed that sometimes the update automator is executed first that the event so when the event executes can not find information to send to the queue.

If a the event is in receive state, why the automator is running first? what type of automator are accepted for each task state?


Another problem is with Jeopardies in a manual task. In it i have an automator that complete the task to a specific state. The Jeopardy is executed but the task is not completed by the state defined?

are there any restrictions to Jeopardies in manual tasks?

Thanks for the help.
  • 1. Re: Events and Jeopardies problems in manual and automated task
    882807 Explorer
    Currently Being Moderated
    Hi,

    I am not sure whether I understood completely. Lemme try to answer your 2 questions.

    *1) If a the event is in receive state, why the automator is running first? what type of automator are accepted for each task state? So you are saying you have* defined an event when the automated task goes to Receive state ?
    Ans : As you have defined the event on the "Receive" state of an automation task, it will be the event gets executed first. Basically during execution of any order, when you hit submit in the CreationTask, automatically next task will be loaded and its task state will be in Recieve state irrespective of Task type like Automated or Manual. That is why when loading the next task, the task will be in received state and the automator runs first.

    If you want fire the event on different task state like "Accepted" or "Completed" you might have to change the event type.

    *2) i have an automator that complete the task to a specific state. The Jeopardy is executed but the task is not completed by the state defined? Are there any restrictions to Jeopardies in manual tasks?*

    Ans: As you said, Jeopardy is getting executed in the manual task correctly. Also you are expecting that the task should be completed along with jeopardy. But as the task type itself is a Manual Task, one has to manually open the order in worklist and make it proceed to next task. No plugins will make a Manual task to complete. Automation Plugins can be completed using the plugins.

    Thanks
    Naveen Jabade
  • 2. Re: Events and Jeopardies problems in manual and automated task
    jgallego Newbie
    Currently Being Moderated
    Thanks NJabade for you answer.

    Related to the first question, the event has asociated a XQuery Sender and besides the task has another internal automator that updates the order. we have noticed that sometimes the internal automation is running first. this could happen?

    Related to the manual task, it is configured with a specific expected duration time. If it reaches this time and is not executed, the task will be completed with another state. How can I completed a manual task for an specific flow, without open it in the worklist, if it reaches its expected duration time?

    Thanks again for your help.
  • 3. Re: Events and Jeopardies problems in manual and automated task
    882807 Explorer
    Currently Being Moderated
    Hi,

    I understand that sometimes Event gets fired first & sometimes after the automation plugin. It is basically, when OSM reaches that particular task that event gets initiated and stored in DB but OSM polls for any triggers in regular intervals. Once OSM finds any pending actions, it fires the Event triggers. That is how you would see automation plugin getting executed first in some cases.

    Manual Task has to be completed manually. OSM doesn't provide any API, for the same to do it in the background.

    Thanks
    Naveen Jabade
  • 4. Re: Events and Jeopardies problems in manual and automated task
    905535 Newbie
    Currently Being Moderated
    Hi jgallego/Naveen,

    About Manual Task:

    We can complete manual task using java API.
    Soln:
    1.For that manual task define jeopardy in this select check box 'raise ajeopardy when task duration exceeds'.
    2.Give duration as per your requirement.
    3.Create one custom java plugin and associate it with jeopardy automation.
    4.Do following code in in java class.
    If task is in received state assign this task to the user which is responsible for raiseing jeopardy.
    Accept task(call acceptTask() API) by a user which is responsible for raiseing jeopardy (which will be default automation user i.e. oms-automation).
    call completeTaskOnExit metode with appropriate exit status.
    This three line of java code will help you to copmlete manual task.

    Regards,
    UJ
  • 5. Re: Events and Jeopardies problems in manual and automated task
    jgallego Newbie
    Currently Being Moderated
    Thanks UJ for your help.

    Can i implement your solution in a cartridge that not contains orchestration? I only have processes.

    Regardless of that, I will apply the solution

    Thanks again.

    Edited by: jgallego on 09-oct-2012 12:11
  • 6. Re: Events and Jeopardies problems in manual and automated task
    jgallego Newbie
    Currently Being Moderated
    Thanks NJ for your help.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points