ITPAM "Run Script" Operator Parameters fed into .PS1 script
search cancel

ITPAM "Run Script" Operator Parameters fed into .PS1 script

book

Article ID: 224641

calendar_today

Updated On:

Products

CA Process Automation Base

Issue/Introduction

We are passing Process.bearer_token and Process.federated_id into the "Run Script" operators -> Parameter 0 and Parameter 1, respectively. We then assign them to local powershell variables using:

$bearer_token = $args[0]

$feder_id = $args[1]

However, when using these values in a call it is not working. 

Environment

Release : 4.3

Component : Process Automation

Resolution

During our webex we found that the args array were separating strings with spaces in them. For example, the Process.bearer_token variable has a value of "Bearer <bearer token id>". The args array processes this by adding "Bearer" to arg[0] and the <bearer token id> to arg[1] or arg[2]. In order to maintain the full value we found that the following can be added into the parameter value field: "'" +Process.bearer_token +"'"

That adds a single quote character before and after the Process variable - which maintains the full string value in the args array.