KBEC-00365 - Precondition Examples & Use cases

Article ID:360032826152
1 minute readKnowledge base
On this page


This article outlines some uses of preconditions.


Whereas a Runcondition will check a specified logic condition to determine whether or not to skip a procedure step, a Precondtion will determine whether the step should wait for a condition to become true before allowing that step to be consider being started.

Preconditions are evaluated, and if false, they are stored to a precondition list which will be regularly checked to determine if the underlying condition has been met, thus allowing the step to move forward and be scheduled.

NOTE - if a step contains both a precondition and a runcondition, the Precondition must pass first before any runCondition will be evaluated to determine if the step should actually be skipped.

Example and Explanation: Usage of precondition in parallel steps.

In this example step1 is configured without a precondition and to run in parallel.

Step2 is configured without q precondition and in parallel, when it is completed it sets property "step2Completed" - ectool setProperty /myJob/step2Completed complete

Step3 is configured with a precondition and also in parallel. In precondition it checks for "step2Completed" property before run and waits for it to become "true" (more detailed interpretation of TRUE or FALSE can be found in documentation)

After running such configuration we will see next:

Once dependent conditions will be met step3 will start running.

Additional Examples:

Use case

JavaScript condition

Nested property check(at first evaluates if NewEnvironment is ready and after check for precondition property)

$[/javascript (getProperty("/myProject/NewEnvironment") == "True") ? myJob.InstallerCompleted : " " ]

Simple property check

$[/javascript getProperty("/myJob/status")=="complete"]

Applies to

  • Product versions: 4.2 and higher