IT Process Automation

  • 1.  Issue returning dataset variables to the parent process

    Posted Jul 10, 2017 09:28 AM

    PAM 4.3.1

     

    I need to loop through all the Configuration Items attached to a SDM change order and then assign an approval task if the CI has specific contact fields populated on the CI. Based on the results of the approval, I may need to reset the entire parent approval loop (and not just for the CI owners)

     

    From my parent process (ChangeManagement), I have one child process (LoopCIs) that pulls all the CIs from the change order and their contacts.  This then loops through each CI to check the values of the CI contacts.  If it matches the rule, then this calls another child process (AssignApproval) that assigns the approval task, emails the contact(s), and waits for the results( variable:  ApprovalCode).

     

    When the AssignApproval task is completed, the LoopCI process evaluates the results and determine if we break out of the loop or continue with the next CI.  It is correctly pulling the results from the child AssignApproval process and continuing or breaking as needed. When it completes, control is returned to ChangeManagement.

     

    My problem is that I can't capture the child dataset from the parent ChangeManagment.  I am using the same format as when AssignApproval returns to LoopCI, but the assignment to the parent variable is always 'undefined'.

     

    Here is my syntax from the operator in the ChangeManagement process after the LoopCI process completes:

     

    Process.CIapprovalCode = Process.LoopCI.ApprovalCode;

     

    I also tried pulling back from the grandchild directly from the parent:

     

    Process.CIapprovalCode = Process.AssignApproval.ApprovalCode;

     

    with the same results.

     

    I have verified by looking at the processes' datasets in operations that the grandchild and child variables are populated correctly.

     

    TIA,

     

    J.W.



  • 2.  Re: Issue returning dataset variables to the parent process

    Posted Jul 10, 2017 11:15 AM
    // The dataset variables from a sub-process are available by calling the operator that started the sub-process
    Process.fromSubProcessVar = Process.Start_Process_1.subProcessVar;

    Here 'Process.Start_Process_1' is the name of the start Process operator. 

     

    Process.CIapprovalCode = Process.LoopCI.ApprovalCode;

    The syntax is perfect , pls check the name of the start_process_1 operators,

    I'm suspecting you're using the Child process name instead of 'start Process operator' name

     

     

    Thank you,

    Venkat



  • 3.  Re: Issue returning dataset variables to the parent process

    Posted Jul 10, 2017 11:45 AM

    Thanks, but I am using the syntax from the example PAM_PreDefinedContent library.  I am using the name of the Start Process operator and not the name of the process as it is shown in the library.  I've triple checked the syntax, especially since it works from the grandchild back up to the child.

     

    J.W.



  • 4.  Re: Issue returning dataset variables to the parent process

    Posted Jul 10, 2017 01:36 PM

    please share the start process operator settings and sub process data set, I will try in my dev instane.

     

    Thank you,

    Venkat



  • 5.  Re: Issue returning dataset variables to the parent process

    Posted Jul 10, 2017 09:24 PM

    Thank you.

     

    The parent process workflow is in the middle of a loop for checking approvals based on the change order type when the child process is called.

     

    The Start Process operator settings are:

    Process Name:  <path to child process>

    Process Dataset Initialization Code: <various parent variable from the initiating change order, plus the global variable for the SDM WSDL to use between PAM/SDM environments>

    Mode:  Attached

    Inherent Lane Change Handler from parent process:  Not checked

    Start Date:  Process.Date

    Start Time:  Process.Time

    All other values are default/blank.

     

    The child process variables I am returning are from an approval task IRF

    Process.ApprovalCode: This is either APP, REF, or RFI

    Process.ApprovalComments: blank or user character string

     

    I am using the SDM custom operator "Update Status and Comment" in the parent process immediately after control is returned. 

    The Pre-execution Code is the code I commented above.

     

    The workflow never moves beyond the Pre-execution Code.

     

    If you do not have the SDM custom operator, you can use the Run Javascript operator from the Utilities library.

     

    J.W.



  • 6.  Re: Issue returning dataset variables to the parent process
    Best Answer

    Posted Jul 11, 2017 10:27 AM

    I ended up deleteing and recreating the parent Update Status and Comment operator and this resolved the issue.  Note that this also resolved it if I used the Run JavaScript operator, so I don't think it was custom operator specific.  Perhaps the fact that I had updated the child process at some point was causing some issue with the parent operator - I've seen weird things happen when you call sub-process while already inside a loop - the PAM UI has some lag issues when trying to manipulate objects inside a loop.

     

    Thanks for the extra set of eyes on this.

     

    J.W