This content has been marked as final. Show 6 replies
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 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.
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.
About Manual Task:
We can complete manual task using java API.
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.This three line of java code will help you to copmlete manual task.
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.