Long running process
search cancel

Long running process

book

Article ID: 8888

calendar_today

Updated On:

Products

CA Release Automation - Release Operations Center (Nolio) CA Release Automation - DataManagement Server (Nolio)

Issue/Introduction

We are running a deployment and when it gets to an action we see that hangs there. If we look at the process in ASAP we can see that the "Process is running" but it sitting on this one action and never getting past it. If we double click on the action it says "Step is running" and clicking the show additional information link shows:

Waiting For Parameters:

  • Parameter 'My Component/jsoutput' from localhost

 

Environment

Release Automation 6.x

Cause

This behavior can be observed when the action that is hanging is using an internal parameter that was previously set by the "Execute JavaScript code" actions output - specifically when setting the output (output1, output2, output3) to null.

For example:

1. I have an "Execute Javascript code" action - we'll call it JSAction1. 

  1. We have a Process. We'll call it TEC1412827.
  2. The process TEC1412827 has an "Execute Javascript code" action. We'll call it JSAction1.
  3. JSAction1 has its Inputs Script field set to: outpu1=null;
  4. JSAction1 has its Outputs Output1 field set to an internal parameter: jsoutput
  5. Process TEC1412827 calls a "Run Command Line" action after JSAction1. We'll call it RCLAction1.
  6. RCLAction1 has its "Command Line String" field set to: echo <jsoutput parameter>

When using this process the problem described above is observed. 

 

Resolution

Change JSAction1 so that its Input Script field is set to: output1="null"; 

The difference is that outpu1=null, while a valid javascript statement, is not something that Release Automation can handle properly. Setting a variable to null (or undefined) in javascript is usually only done when an unexpected condition is met - which can later be tested by a subsequent statement like "if (variable)". If this is true for your use case then this means that either:

  • You shouldn't be setting output1 to null. Instead, you should be continuing to test your variables in the javascript code until you get your expected/final result; or
  • There should probably be some additional logic in your workflow to test whether or not the value is null (unexpected) before moving on an action that uses the output variable with expected data. Since output1=null does not actually set jsoutput to something you can properly test in Release Automation, using output1="null" will set jsoutput to the string "null" which you can then test in your new/next Release Automation action with an action like "Compare Two Strings".