Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Do While

This activity executes the activity contained in its body at least once, until the specified condition evaluates to false.

Activity Parameters

The Do While activity has only one parameter and it can be provided by manual manually inserted values or via IN arguments or variables:

...

The following basic example will remove all instances of an IP (192.168.0.11) from a previously defined collection of IPv4 IPs (where it appears twice):


This time, the condition will be provided via a boolean variable (IPexists), which dictates the Do While activity to loop until the the IP is not found in the collection anymore. It has been initialized to True to make sure it enters the Do While sequence at least once

...

25-01-2016 04:19:06getElementFromCollectionExecuting
25-01-2016 04:19:06getElementFromCollectionCollection Count: 4
25-01-2016 04:19:06getElementFromCollectionElement: 192.168.0.10
25-01-2016 04:19:06getElementFromCollectionCSV String: 192.168.0.10,192.168.0.12,192.168.0.13,192.168.0.14,

 

ForEach

This activity executes the activities in its body for each element found in a collection/array.

Activity Parameters

The ForEach activity properties can be provided via manually inserted values or via IN arguments or variables:

Image Added

Parameters:

  • Values (text box editor type) (type: dependant on TypeArgument): the collection/array that the activity will iterate. On each iteration, the body of the ForEach activity will be executed.
    Image Added
  • TypeArgument (ComboBox type): the type of the elements in the collection/array that the activity will iterate.


Example:

This basic example will use the Iterator to go through the collection of IPs (IPv4Collection defined above) and test the connection for each one using a PowerShell script activity contained in the ForEach body.

Image Added

 

If

This activity runs an activity/sequence of activities if a condition is true, and can optionally run activities if the condition is false.

Activity Parameters

The If activity properties can be provided via manually inserted values or via IN arguments or variables:

Image Added

Parameters:

  • Condition (text box editor type) (type: boolean): the condition that decides which child activities will be executed

Example:

This basic example will iterate a previously defined collection of IPv4 addresses, and when a specific one is found (validated via an If activity), test its connection.

 

Image Added

The IPv4Collection variable definition:

Image Added

In this example, the Else branch has been left empty, therefore no activity will be performed against the Iterators that do not meet the condition (Iterator="191.168.0.14").