Automic Continuous Delivery Automation

Expand all | Collapse all

Passing UNIX shell output from one action/object to another

  • 1.  Passing UNIX shell output from one action/object to another

    Posted 05-23-2017 12:55 PM
    Hi,
    I have two UNIX action, in first action am running some unix script and get a string as output in SHELL variable, later I assigned that SHELL variable to ARA variable as below in first action Process Tab.
    SHELL_VAR=`UNIX COMMAND` :DEFINE &ARA_VAR, string
    :REGISTER_VARIABLE "ARA_VAR", $SHELL_VAR
    In first action even i printed this ARA_VAR using PRINT function in ARA, which is working.

    Now the problem starts, I am trying to access above ARA_VAR in the second action's Process Tab example as below.
    :PRINT &ARA_VAR
    Which is not working, I have tried PSET in the first actions Post-Process or Publish with TASK or WORKFLOW, nothing helps, Please help me here, I spent 2 weeks on this problem, but no luck. Please provide solution with example if possible.

    Note: ARA Variable name in First action and Second can be different also , end of the day , I need to use first action's SHELL command value in second action.


  • 2.  Passing UNIX shell output from one action/object to another

    Posted 07-21-2017 04:54 AM
    Hi, 
     are those real actions or just job objects? The difference is that within an action, the job object is wrapped by an JOBP (workflow) object. 

    If real actions:
    - Use PSET in the PostProcess of the first job
    - Then use a postcondition on the action (JOBP) in your workflow to publish the variable you set with PSET
    - Best practice would be that the second action, takes the value as input through a promptset

    If just job object:
    - Make sure that the generation time is set to "Runtime" not "Activation Time". In case of runtime, all variables are calculated, when the job is started. In case of activation time, all variable values are calculated when the workflow starts (job is activate). Then it is clear, that it cannot have a value which is calculated just in the previous step. 

    Best regards,
    Robert