IT Process Automation

  • 1.  WebService Soap response

    Posted Jul 10, 2017 09:06 AM

    Hello Community,

     

    The 'update request' CA SDM operator operation is getting failed with the below error in Process automation workflow.

    how to handle this error message, I would like to continue the loop operation for the rest of the tickets in the array. 

     

    How to make the workflow to avoid this ticket and continue the operation on rest of the tickets till all the tickets iterated successfully.

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
    <soapenv:Fault>
    <faultcode>soapenv:Client</faultcode>
    <faultstring>INVALID AHD03116:Tenancy violation in Request xxxx belonging to tenant *************** - attribute Request Area references pcat Hardware belonging to tenant tenant:*************** @|domsrvr|M_1DAA|1499250547|1</faultstring>
    <faultactor/>
    <detail>
    <ErrorMessage>INVALID AHD03116:Tenancy violation in Request 1292551 belonging to tenant *************** - attribute Request Area references pcat Hardware belonging to tenant tenant:*************** @|domsrvr|M_1DAA|1499250547|1</ErrorMessage>
    <ErrorCode>-1</ErrorCode>
    </detail>
    </soapenv:Fault>
    </soapenv:Body>
    </soapenv:Envelope>

    Thank you,

    Venkat



  • 2.  Re: WebService Soap response

    Posted Jul 10, 2017 01:34 PM

    I have a loop operator which iterates an array of tickets. I'm performing update status operation.

    If any one of the ticket update status is failed, how to continue the operation on the remaining tickets in the array.

     

    defined the logic in Exception handler, however the loop keep iterating the first element and it is not continuing the operating on the remaining tickets in the array.

     

    loop operator Settings:

    Pre-execution code:
    Process.i = 0;

     

    Post- Execution code:
    Process.i ++;

     

    Repeat Count :

    Process.noautoClose__op__  // Process.noautoClose__op__ = Process.autoCloseList.length;

    Update_Request Operator:

     

    Request Number - expression

    Process.autoCloseList[Process.i].ref_num  // Process.autoCloseList is the valuemap which contains all the tickets numbers

     

    Post Execution-
    if (Process[OpName].Result != 1) {

    var j = Process.falied_op__.length++;
    Process.falied_op__[j].ref_num = Process.autoCloseList[Process[OpName].CurrentLoopIteration].ref_num;
    Process.falied_op__[j].reason = Process[OpName].Reason;
    } else {
    var k = Process.sucess__op__.length++;
    Process.sucess__op__[k].ref_num = Process.autoCloseList[Process[OpName].CurrentLoopIteration].ref_num;
    Process.sucess__op__[k].reason = Process[OpName].Reason;
    }

    Update Request operation Inside Loop

     

     

     

    Exception Handler - Definition

     

     

     

    In Java script 2 source code.

     

    Process.exceptionType = "Unidentified Response";
    Process.source = Process.undefinedResponse.source;
    Process.errorMessage = Process[Process.source].Reason;

     

    In java script 3 source code.

     

    Process.resetflag = false;
    if (Process.errorMessage.toLowerCase().indexOf("fault returned") != -1) {
    if (Process.source == "Update_Request_1"){

    if(Process.autoCloseList.length > Process.i)
    Process.resetflag = true;
    }
    }

     

    Reset Operator settings

     

     

    any suggestion how to handle and continue the operation on all the array of ticket numbers?



  • 3.  Re: WebService Soap response

    Posted Jul 10, 2017 01:38 PM

    ElwynnMartin any sugesstions?



  • 4.  Re: WebService Soap response

    Posted Jul 12, 2017 08:03 AM

    Venkat,

     

    Lindsay has a great solution below, you can just add a failure path that leads to the same destination as the success path. The only thing I would add to that is the possibility of a custom exit port, you could set a 'Process.' variable with a 0 or 1 based on success or failure using the same code you already have in the post execution and control logic flow that way.

     

    Elwynn.



  • 5.  Re: WebService Soap response

    Posted Jul 11, 2017 01:08 AM

    It seems to me that you could add a Failed exit path to your Update Request operator following the same path as your Success exit path.



  • 6.  Re: WebService Soap response
    Best Answer

    Posted Jul 12, 2017 12:29 PM

    Thank you Lindsay_Estabrooks ElwynnMartin

    Instead of inner loop, I have enable the operator loop functionality, when the loop gets failed the control to goes to the undefined response exception.

    The loop operator sometimes creates trouble .

     

    Thank you,

    Venkat



  • 7.  Re: WebService Soap response

    Posted Jul 12, 2017 02:57 PM

    Venkat,

     

    The looped operator is less resilient when you encounter errors compared to that same operator inside a loop. The Loop operator is nearly error agnostic in that it iterates the given number of times despite the success or failure of the operators inside. That's the pro to using the loop operator, the con is the overhead you'll incur instantiating another operator potentially thousands of times.

     

    Elwynn.



  • 8.  Re: WebService Soap response

    Posted Jul 12, 2017 04:43 PM

    Elwynn,

     

    Exactly, loop operator gave some hard time to dubug, especially in the process. Thanks for the Information.

     

    Regards,

    Venkat



  • 9.  Re: WebService Soap response

    Posted Jul 13, 2017 08:26 AM

    Venkat,

     

    The way I've figured out to debug a loop is using 'Process.' variables to expose all your values and the delay operator, or if using the loop feature of an operator the delay feature of the operator itself, then you just have to be quick enough to pause the process after the operator has error-ed .

     

    Or using the approach of logging the errors to you can do something like

    Process.errorLog = Process.someVar + '-' + Process.anotherVar + ',' + Process.errorLog;

     

    Neither method is great they're just what I've found that works, maybe someone else has a better method?  

     

    Elwynn.