Adaxes HelpShow AllHide All

Actions and Conditions

Business Rules, Custom Commands and Scheduled Tasks are sets of actions and conditions triggered by different events, such as a specific operation performed in Active Directory, manual launch, or certain time point.

Actions and conditions in these objects are united in sets. One Business Rule, Custom Command or Scheduled Task can have several sets of actions and conditions. These sets, and actions in them, are executed sequentially in the order of their arrangement. To change the order of action execution, you need to change their sequence.

However, some actions have a fixed arrangement in a set. For example, Cancel the Operation action can only be the last in a set as the execution of this action cancels the actions that are scheduled for execution after it (and the triggering operation in Business Rules). So, adding actions after Cancel the Operation action makes no sense as their execution will be canceled by this action.

Every set of actions and conditions can include several actions restricted by one or more conditions. If there are more than one condition they are combined by AND/OR logical operators.

In a Business Rule, actions can be executed Before or After the triggering operation is performed. Some actions can be executed only before and some only after the main operation. For example, Send for Approval action cannot be executed After the triggering operation, because the operation that would be sent for approval is performed prior to the action requesting its execution approval.

Actions

The following actions can be executed by Business Rules, Custom Commands and Scheduled Tasks:

ActionDescription
Send this operation for approval

In a Business Rule, this action sends the operation that triggers a Business Rule for approval to users or groups you specify. Due to this, the triggering operation is not executed until it is approved. This action can be executed Before the main operation only.

In a Custom Command, this action suspends the execution of a Custom Command, until it is approved by the users you specify. This action is always executed before other Custom Command actions and the order of its execution cannot be changed.

In a Scheduled Task, this action is not available. Instead, you can set approval requests for every action using action parameters.

Update the object This action allows you to modify, add or remove object properties.
Modify Account Options This action allows you to modify account options for user accounts.
Add this object to a group This action allows you to add objects to the group you specify.
Remove this object from a group This action allows you to remove objects from the group you specify.
Move the object This action allows you to move objects to the location you specify.
Delete the object This action allows you to delete objects.
Enable/disable the object account This action allows you to enable or disable accounts. This action is available for users and computers.
Reset User password This action allows you to reset users' password. New user password can be set as a constant value (i.e. 'secret'), generated on the basis of the user properties (i.e. %firstname%%lastname%), or generated randomly.
Create an Exchange mailbox for the user This action allows you to create an Exchange mailbox for users.
Create the home directory This action allows you to create a home directory for users. By this action the home directory is physically created and the homeDirectory property of the user is updated.
Share the home directory This action allows you to share users' home directory.
Move the home directory This action allows you to move users' home directory.
Delete the home directory This action allows you to delete users' home directory.
Delete the home directory share This action allows you to delete the home directory share.
Run a program or PowerShell script This action allows you to run an external program or PowerShell script.
Send e-mail notification This action allows you to send an e-mail notification.
Send SMS This action allows you to send SMS messages.
Execute a Custom Command This action allows you to execute a specific Custom Command.
Cancel this operation

In a Business Rules, this action allows you to cancel the execution of the operation that triggers a Business Rule. ‘Cancel the operation’ action also cancels all other Business Rule actions that are scheduled for execution after it. That’s why, it is always the last in a set of actions, and the order of its execution cannot be changed. This action can be executed Before the triggering operation only.

In a Custom Command or Scheduled Task, this action allows you to cancel the execution of the Custom Command or Scheduled Task.

In a Business Rule, the list of available actions depends on the selected triggering operation, its object type and the time of action execution (Before/After the triggering operation).

Conditions

The following conditions can be set for actions:

ConditionDescription
If <property> changed This condition is met, if the property you specify is/is not changed by the operation that triggers a Business Rule. This condition is available for Business Rules only.
If <property> <relation> <value>

This condition is met, if a value of the property you specify corresponds to certain criteria. For example, if Department contains Sales.

To specify the value on the basis of other property values of the object, you can use value references. For example, if Display Name does not equal %lastname%, %firstname%.

Note: For multi-valued properties, this condition is met if at least one value corresponds to criteria.

If is a member of <Group> This condition is met, if an object is/is not a member of the group you specify.
If operation <result> This condition is met, if the operation that triggers the Business Rule succeeded, failed or was suspended. This condition is available for Business Rules only, if actions are executed After the triggering operation.
If located under <location> This condition is met, if an object is/is not located under the container or organizational unit you specify.
If account is <status>

For user objects, this condition is met, if a user account is enabled, disabled, locked out or not locked out.

For computer objects, this condition is met, if a computer account is enabled or disabled.

If certain Account Options are <status> This condition is met, if the specified account options are enabled or disabled for a user account.
If account/password is <expiration status> This condition is met, if the expiration status of a user account corresponds to the specified parameter.
If is inactive <period> This condition is met, if a user is inactive more than/less than the specified period.
If has an Exchange mailbox This condition is met, if a user has/doesn't have an Exchange mailbox.
If has an e-mail address established in Exchange This condition is met, if a user/contact/group has/doesn't have an e-mail address established in Exchange.
If the initiator is a member of <Business Unit> This condition is met, if the user, who performs a Custom Command or triggers a Business Rule, is/is not a member of the Business Unit you specify.
If the initiator is a member of <Group> This condition is met, if the user, who performs a Custom Command or triggers a Business Rule, is/is not a member of the group you specify.
If the initiator is assigned to <Security Role> This condition is met, if the user, who performs a Custom Command or triggers a Business Rule, is/is not assigned to the Security Role you specify.
If the initiator is <User> This condition is met, if the user, who performs a Custom Command or triggers a Business Rule, is/is not the user you specify.
If PowerShell script returns true This condition is met, if the PowerShell script specified for the condition sets the ConditionIsMet property of the pre-defined variable Context to true. Example: $Context.ConditionIsMet = $true

In a Business Rule, the list of available conditions depends on the triggering operation and its object type.