How to pass parameters to a custom script from a custom process step?

Hello

I am new to One Identity manager, and am basically setting up a custom process.

I have created a process via the process Orchestration in designer tool and I want this process to execute a custom script stored in the Script library of One Identity manager

I have developed the custom script, and I want the process step to pass some parameter values to this custom script, but I am not sure on how to do that.

I have defined the parameters  in the process step ( parameterValue0: Value = $firstname$) , parameterValue1: value= $Lastname$  etc)

so how can I pass these parameters to my process step?

for eg I want my code to execute as shown below:

Dim firstName As String = (ParameterValue0 from the parameter I have set in the process step)
Dim lastName As String = (ParameterValue1 from the parameter I have set in the process step)

Can someone help me with correcting my code to have the parameters read from the process step?

Thank you

Parents
  • Hi,

    You need to declare the parameters at the start of the script, as a function, e.g.:

    Public Function SomeName(ByVal centralaccount As String, ByVal fullname As String, ByVal uidPerson As String) As String...

    Those are the parameters defined in your process step (as well as the script itself).

    And then and parameters internal to the function would be declared using the Dim...

    There are lots of examples of this in the product already.

    HTH

    Trevor

  • Thanks for your answer, really appreciate it !

    I have adapted my script as you have suggested and the compilations looks all good,

    But when I actually execute the process step I am getting the following error when the process step for the actual execution of the custom script runs:

    [829005] The script 'CCC_CUSTOM_SCRIPTNAME' does not exist.
    at StdioProcessor.StdioProcessor._Execute(Job job)
    at VI.JobService.JobComponents.ScriptComponent.Activate(String task)
    at VI.JobService.JobComponents.ScriptComponent._TaskScriptExec()

    However I have checked and verified that the script name I have defined in the 'ScriptName' Parameter in the process step and the actual script is exactly  the same, and in fact  when I open the custom script I can see that the script shows a link to the Parameter(1) script name , and I can navigate to the actual process step by clicking on it, 
    so I am really confused and clueless on why the process step on execution says the script doesn't exist,

     could you please give any tips on that?

    FYI I have made sure that the : Islocked is not enabled on the custom script, its unchecked.

    Thank you

Reply
  • Thanks for your answer, really appreciate it !

    I have adapted my script as you have suggested and the compilations looks all good,

    But when I actually execute the process step I am getting the following error when the process step for the actual execution of the custom script runs:

    [829005] The script 'CCC_CUSTOM_SCRIPTNAME' does not exist.
    at StdioProcessor.StdioProcessor._Execute(Job job)
    at VI.JobService.JobComponents.ScriptComponent.Activate(String task)
    at VI.JobService.JobComponents.ScriptComponent._TaskScriptExec()

    However I have checked and verified that the script name I have defined in the 'ScriptName' Parameter in the process step and the actual script is exactly  the same, and in fact  when I open the custom script I can see that the script shows a link to the Parameter(1) script name , and I can navigate to the actual process step by clicking on it, 
    so I am really confused and clueless on why the process step on execution says the script doesn't exist,

     could you please give any tips on that?

    FYI I have made sure that the : Islocked is not enabled on the custom script, its unchecked.

    Thank you

Children
No Data