IT Process Automation

Expand all | Collapse all

Ways to abort/cancel/suppress the operator execution

Jump to Best Answer
  • 1.  Ways to abort/cancel/suppress the operator execution

    Posted 04-13-2016 01:08 PM

    Hi guys,

    I’ve a question:

     

    Is possible abort/cancel/suppress the operator execution by your own PRE-EXECUTION CODE?

    If don’t possible, we have others ways to abort an operator?

     

    Thank you in advance!



  • 2.  Re: Ways to abort/cancel/suppress the operator execution

    Posted 04-13-2016 01:45 PM

    I am not sure about in pre-execution code, but you can set a timeout and control what happens after that timeout limit is reached, including aborting the operator.

     



  • 3.  Re: Ways to abort/cancel/suppress the operator execution

    Posted 04-13-2016 03:04 PM

    Thank you MWNiebuhr by response, your recomendation works, but my situation is that a operator already running I need stop/erase/abort it's if other change been ocurred.

     

    In CA WORKFLOW you can configure "Exception" in a node and it's activated by another Flag node...you know that?.

    Then, i imagine a similar way in PAM

     

    Best regards



  • 4.  Re: Ways to abort/cancel/suppress the operator execution

    Posted 04-13-2016 03:31 PM

    So you need to stop an operator if another operator has completes or some other conditions are met?    

    You may simply need to use the Evaluate Expression operator, possibly in conjunction with the Or operator, to allow PAM to progress forward if one of a set of conditions would be met. 



  • 5.  Re: Ways to abort/cancel/suppress the operator execution

    Posted 04-14-2016 10:49 AM

    You are right MWNiebuhr

     

    But, to explain my question I will try to use a scenario:

    • Suppose that an process launches two different operators: the "A" operator and the B" operator.
    • These operators (A & B) are running and waiting to be completed by users/group assigned to these.
      • The users/group member for "A" operator could see your own task in PAM Tasklist
      • The users/group member for "B" operator could see your own task in PAM Tasklist
    • Then the "B" operator was completed by some your own members.
    • Therefore, in this moment I need kill the executing task by "A" operator.
      • When doing the kill the task for "A" operator, this task must disapear in the PAM Tasklist for "A" users/group member .

     

    So, i need know about how implement a code o way to kill an operator.



  • 6.  Re: Ways to abort/cancel/suppress the operator execution

    Posted 04-14-2016 11:29 AM

    The OR operator will accomplish this for you.

     

    When you complete one of the two forms, it will cancel the entire other path:

     

     

     

    Both tasks will disappear from the task list after a couple of minutes.



  • 7.  Re: Ways to abort/cancel/suppress the operator execution

    Posted 04-14-2016 12:03 PM

    Hi Eduardo,

     

    Rather than 'killing' the operator I would suggest that you could easily reply to the task (using the REST API) once you have a reply from either one of the Tasks. 

    It would disappear from their task list soon after the process is completed, if you really wanted to hide the task immediately, you could also transfer the task to a 'fake' user, and then mark it as completed. 

    I believe that would make the task disappear from their task list immediately.

     

    For example, you start up two user tasks, one has Task ID 1153871, and the other Task ID 1153872.

     

    If the first user completed his task (# 1153871), you could then use the CA PA REST API to send a ReplyTask, or a TransferTask for Task ID 1153872.

    That task would then be marked as completed/cancelled and would disappear from the task list.

     

    Using the REST sample from the Web Services Reference Guide, here is a little example of not approving TaskID 1153872 and marking is as Status = "Was completed by User 1"

     

    <ReplyTaskRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    xsi:type="p1:ReplyTaskRequest"

    xmlns:p1="http://ns.ca.com/2011/09/pam-ops" >

    <TaskID>1153872</TaskID>

    <IsApproved>false</IsApproved>

    <Arguments>

    <Argument>

    <Name>Status</Name>

    <Value>Was completed by User 1</Value>

    </Argument>

    </Arguments>

    </ReplyTaskRequest>

     

    Hope this helps you!

    Ian



  • 8.  Re: Ways to abort/cancel/suppress the operator execution
    Best Answer

    Posted 04-20-2016 03:26 PM

    Thank you IanRich

    I can't find the "ReplyTaskRequest" method, but instead I found the "executePendingInteraction" method that let to me "Reject" a task.

     

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:itp="http://www.ca.com/itpam">

       <soapenv:Header/>

       <soapenv:Body>

          <itp:executePendingInteraction>

             <itp:auth>

                <!--You have a CHOICE of the next 2 items at this level-->

                <itp:token>?</itp:token>

                <itp:user>user</itp:user>

                <itp:password>password</itp:password>

             </itp:auth>

             <!--Optional:-->

             <itp:params>

                <!--1 or more repetitions:-->

                <itp:param name="?">?</itp:param>

             </itp:params>

             <itp:userInteractionID>2481</itp:userInteractionID>

             <!--Optional:-->

             <itp:isApprove>false</itp:isApprove>

          </itp:executePendingInteraction>

       </soapenv:Body>

    </soapenv:Envelope>

     

    Thank you!



  • 9.  Re: Ways to abort/cancel/suppress the operator execution

    Posted 04-20-2016 04:20 PM

    Hi Eduardo,

     

    Sorry, my example was for the REST API, not the SOAP API.

     

    You are correct, executePendingInteraction is the SOAP equivalent.

     

    Glad it helped you out.

    Ian