IT Process Automation

Expand all | Collapse all

Passing parameter

  • 1.  Passing parameter

    Posted Apr 09, 2014 08:26 AM

    Hi,

    We are using  two soap operator and trying to pass the value from one operator to other operator but we stucked to parse the value  from the response message.

    I am getting the output from the first operator like   "__o_251_1045160_1 __o_251_1051573_1" but i can't pass the whole value to second operator ,need to split value.

     For this i have written a java script and used the split function like (var i; var j = process.soap operator.varaible name var k = j.split (" ",1)) so that it will give us only one value "__o_251_1045160_1 " but not able to see the post execution result ,not sure post execution giving us the correct value.

    Please guide me.

     

    Thanks,

    Manish



  • 2.  RE: [PAM - General Discussion] Passing parameter

    Broadcom Employee
    Posted Apr 09, 2014 08:40 AM
    For testing purposes, instead of using “var k” and assigning the value to k, try pre-defining a process level variable and then assigning it to that variable.

    So instead of:

    var k = j.split (" ",1))

    Process.k= j.split (" ",1))

    Now you can view the variable “k” in your process dataset and the contents of that variable at runtime.

    Andy Thompson
    CA Technologies
    Sr Support Engineer
    Tel: 1-877-584-7267
    Andrew.Thompson@ca.com<mailto:Andrew.Thompson@ca.com>
    support.ca.com

    <mailto:Andrew.Thompson@ca.com>[CA_Cert_Pro_ProcessAutomation_r4x]

    From: CA Process Automation Global User CommunityMessage Boards [mailto:CommunityAdmin@communities-mail.ca.com]
    Sent: Wednesday, April 09, 2014 8:26 AM
    To: mb_message.11871426.112812973@myca-email.ca.com
    Subject: [PAM - General Discussion] Passing parameter


    Hi,

    We are using two soap operator and trying to pass the value from one operator to other operator but we stucked to parse the value from the response message.

    I am getting the output from the first operator like "__o_251_1045160_1 __o_251_1051573_1" but i can't pass the whole value to second operator ,need to split value.

    For this i have written a java script and used the split function like (var i; var j = process.soap operator.varaible name var k = j.split (" ",1)) so that it will give us only one value "__o_251_1045160_1 " but not able to see the post execution result ,not sure post execution giving us the correct value.

    Please guide me.



    Thanks,

    Manish
    Posted by:manish9jul
    --
    CA Communities Message Boards
    112815513
    mb_message.11871426.112812973@myca-email.ca.com<mailto:mb_message.11871426.112812973@myca-email.ca.com>
    https://communities.ca.com


  • 3.  RE: [PAM - General Discussion] Passing parameter

    Posted Apr 09, 2014 10:47 AM

    Thanks for your response,

    I have defined a process variable and was able to see the value and passed that value into third operator to get the result and it is working.

     



  • 4.  RE: [PAM - General Discussion] Passing parameter

    Posted Apr 09, 2014 10:57 AM

    Hi,

    Now i have one more challange here,have split only one value from the complete response body but if i have to pick one value at a time then second value next time and so on .

    Like Response = __o_251_1045160_1 __o_251_1051573_1__o_251_1045160_2 __o_251_1051573_3__o_251_1045160_4 __o_251_1051573_5__o_251_1045160_6.

    As per my process ,it will split the whole string and pass the one value "__o_251_1045160_1" now i want to implement a loop here so that first it will pick one value then again loop will run and pass the second value and so on.

    Please guide me how could i achieve this.

     

    Thanks,

    Manish



  • 5.  RE: [PAM - General Discussion] Passing parameter

    Posted Apr 09, 2014 11:21 AM

    Hi Manish,

    I would use the post-execution of the first operator to create the array of values using the split function.  Then I would loop the second operator using the Repeat Count field under Execution Settings.  You can set that to the length of the array.  And then you can use the built in CurrentLoopIteration variable that's part of the operator dataset as an index into your array.

    Thanks,
    Tom



  • 6.  RE: [PAM - General Discussion] Passing parameter

    Posted Apr 15, 2014 06:31 AM

    Hi,

    Thanks for your valuable input,my bad luck it is not working.

    I had created a dataset variable to store the value  now modified this variable as array "checked the array option and selected single from array dimension in dataset variable page".

    And modified the split function 'split (" ",16)' now could see all the 16 values store in the array varaible in the result of 1st operator.

    In the second operator defined the repeat count as 16 but in the dynamic parameter of the second operator not sure what to define previously was testing only for value so defined like 'Process.k[0]' but now have to pass all the 16 value ,please guide me what to define in the dynamic operator so that one by one value it will pick and provide the result.

    Pls put some light on how to use the loopiteration and array index have not tried these option.

    Thanks,

    Manish

     



  • 7.  RE: [PAM - General Discussion] Passing parameter

    Posted Apr 16, 2014 06:19 AM

    Hi,

    Any idea how  to use the loopiterator and indexing here.

     

    Thanks,

    Manish



  • 8.  RE: [PAM - General Discussion] Passing parameter

    Posted Apr 16, 2014 03:54 PM
    manish9jul:

    Hi,

    Thanks for your valuable input,my bad luck it is not working.

    I had created a dataset variable to store the value  now modified this variable as array "checked the array option and selected single from array dimension in dataset variable page".

    And modified the split function 'split (" ",16)' now could see all the 16 values store in the array varaible in the result of 1st operator.

    In the second operator defined the repeat count as 16 but in the dynamic parameter of the second operator not sure what to define previously was testing only for value so defined like 'Process.k[0]' but now have to pass all the 16 value ,please guide me what to define in the dynamic operator so that one by one value it will pick and provide the result.

    Pls put some light on how to use the loopiteration and array index have not tried these option.

    Thanks,

    Manish

     


    Do you hardcode the repeat count to 16?  If so, you should set it to the length of your array instead in case that length changes.

    And then to reference each index in the array, you don't want to hardcode to 0 but want to use a loop index.  Process[OpName].currentLoopIteration automatically keeps that for you, so you can use it in place of 0.



  • 9.  RE: [PAM - General Discussion] Passing parameter

    Posted Apr 24, 2014 03:53 AM

    Hi,

    My bad luck it is not working ,i guess i am missing something.
    Let me rephrase the complete process i have used the four operator here.
    1. first operator calling the third party API and getting the object id value(__o_251_1045160_1).
    2.In the second operator passing the object id value append with string TrailCustomerCircuit and getting the output in this format (__o_251_1045160_1 __o_251_1051573_1 __o_251_1051624_1 __o_251_1052352_1 __o_251_1053257_1).
    And i have defined a dataset varaible as a operational result with array and added the index value in the variable with the same array legthlike k[0],k[1] etc...And in the post execution of this operator i have used the 'split' function and hard coded the delimeter like Process.k = i .split (" ",16); now i am getting the output like k[0]=__o_251_1051573_1,k[1]=__o_251_1051624_1 and so on.
    Now i have to pass the k[0] and k[1] values one by one into third operator to get the response.
    3.In the third operator i have checked the repeat count and hard coded the value like 5 and in the dynamic operator of the third operator (Process.operator.CurrentLoopIteration).

    I am not sure do we need to initialize the array index value using the java script operator (Process.k.CurrentIndex=0;) between the second and third operator and also need to define the incremental value in the post execution of java operator and then define the dynamic value in the third operator like (Process.Run_JavaScript_1.CurrentLoopIteration).

    Please guide me.

    Thanks,

    Manish



  • 10.  RE: [PAM - General Discussion] Passing parameter

    Posted Apr 25, 2014 09:33 PM

    Which version of PAM are you using?  I'll create an example for you but want to make sure I don't do it in a later version of PAM than you have.



  • 11.  RE: [PAM - General Discussion] Passing parameter

    Posted Apr 28, 2014 01:46 AM

    Hi Tom,

    Thank you for assisting me to built this process.

    I am currently using 4.2 version.

     

    Thanks,

    Manish

     



  • 12.  RE: [PAM - General Discussion] Passing parameter

    Posted Apr 29, 2014 01:29 PM
      |   view attached

    Here you go Manish

    Attachment(s)

    zip
    Loop Example.zip   7 KB 1 version