Subscribe

Using Command Parameter in ROW condition

HI 

 

If i create parameter using Add-WfaWorkflowParameter in a command within a Workflow, is there a way to use that parameter as a ROW condition? For example, if that parameter is true or false in a row condition.

 

I am capturing a CLI output in a WFA command and setting the value of a Add-WfaWorkflowParameter based on the cli output. I would like to use that parameter value to decide whether or not to run other commands within the workflow. 

 

Any suggestions?

 

Thanks

Raj

Re: Using Command Parameter in ROW condition

[ Edited ]

A WFA workflow goes through a planning phase where all the command inputs are resolved . This is followed by an execution phase in which the all commands code is executed.

 

Add-WfaWorkflowParameter happens during the execution phase of the workflow . This is when your CLI is executed.  While row coditions are evaluated before during the planning phase. So what you are asking is not possible.

 

But this can be achieved by writing code like this in the beginning of your command.

 

$executeCommand = Get-WfaWorkflowParameter -Name executeCommand

if (!$executeCommand) {
    return;
}