Hi everybody,
I’m new to bonita and while playing around I get stuck when I try to use a process variable inside a (otherwise unmeaningful) powershell script called from script-connector.
Pressing ctrl+space inside the script pane shows the process variables defined. Clicking on the desired one makes it appear as ${myProcessVariable}.
Unfortunately it never gets used in the script, neither with curly brackets nor without…
ps-code goes like this:
$myVar = ${myProcessVariable}
$myOutVar = “#”
for ($i=0; $i -lt $myVar.length; $i++){
$myOutVar += $myVar.Substring($i) + “#”
}
return $myOutVar
Running the process at least gives back ‘#’ but nothing else.
What is the preferred way to access a process variable? What am I missing?
Help is greatly appreciated.
Martin