Dot walking in an input of a REST step or PowerShell step on mid server causes the flow to remain in Waiting state indefinitely


Description

Dot walking in an input of a REST step or PowerShell step on mid server causes the flow to remain in Waiting state indefinitely

Steps to Reproduce

1. Create an action
2. Add a step that looks up a record (sys_user for example)
3. Add a REST step and add a query parameter with name "test" and value is dot walk to a field inside record looked up on step 2 (sys_user.first_name for example)
4. Check the "Use Mid" checkbox.
5. Click Test. Observe that the execution remains in state "Waiting".

Workaround

Instead of dot walking on the REST or PowerShell input, create a script step above the REST or PowerShell step and do the dot walking in that script step.  Specify "Instance" as the "Required Runtime" for the script step.  Create an input to the script step for each record you need to dot walk on.  Create an output on the script step for each dot walked value.  Add a script similar to the following:

(function execute(inputs, outputs) {
  if (inputs.user) {
    outputs.name = inputs.user.name;
    outputs.email = inputs.user.email;
  }
})(inputs, outputs);

Use the outputs of the script step as the inputs to your REST or PowerShell script where you previously dot walked.


Alternative workaround that does not require a script step--

Instead of dot walking on the REST or PowerShell input, do the dot walking outside the customer action and pass in the final values into the action as inputs.  Then use those action inputs directly for the REST or PowerShell step.


Related Problem: PRB1486598