This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to manipulate output parameter

Hi folks,

We are using Identity Manager 8.0.1. 

I have a process orchestration which involves process steps of ScriptComponent --> MailComponent - SendRichMail --> MailComponent - SendRichMail. I would like to get the output of the scriptcomponent and manipulate it (i.e. split the string) and pass one half to one mailcomponent and the other one to the other mailcomponent.

How we have configured so far are as follows:

The ParamOut for ScriptComponent is a fixed length string.

On the MailComponent process step, which one sits on top of the 2nd mailcomponent, we set a ParamName1 and ParamValue1 on both components to take in the return String of the ScriptComponent.

By setting Value = "&OUT(returnString)&" , we are able to get the full String, but we want to only some characters.

So, I tried something like Value ="&OUT(returnString)&".toString().SubString(0,4) but it will give me the literal string.

On the other hand, I've tried to return an array String in the ScriptComponent so that both MailComponents are able to access by "&OUT(returnString)&"[0] and "&OUT(returnString)&"[1] respectively, but the results turn out to be the same as the previous. 

Appreciate and seeking suggestions on how we should go about to do this. 

Thank you ! 

- Dhin 

Parents
  • Code in job parameters, generating condition and pre-script for generating are evaluated at the time the process instance is generated.The &OUT... is really just a placeholder for a string replacement. At generation time the value &OUT... hasn't yet been replaced so that's why you get the literal value. 

    To extract a value from an out parameter you could do either of the following, in order of preference, highest first:

    1 - Call the script from the process' pre-script for generating and store the value in the Values object for later use. This way you avoid using an out-parameter, but I'm guessing that there's a reason why can't do this and that's why you're using a script component + out parameter.

    2 - Pass the out parameter into another script to extract your value. Convoluted, but it will work.

    3 - Split the process into two. One for the script, the other for sending the mails. The first process generates the out parameter, and fires the event for the second process, passing in the out parameter as a process parameter. The second process can then manipulate the value passed in via the process parameter using option 1. 

  • *not 2nd parameter in IUnitOfWork.Generate method

    but the first parameter in the dictionary htParameters, I would prefer if I can put a better naming convention. 

Reply Children
No Data