IAdmBusinessRuleAction
The IAdmBusinessRuleAction interface represents an action for business rules, custom commands, and scheduled tasks.
Inheritance: IAdmTop
Methods
-
Method
-
Description
-
GetAction()
-
Returns the IAdmAction interface that represents the action object.
-
SetAction()
-
Updates the action object.
-
GetApproversInfo()
-
Returns the IAdmRequestApproversInfo interface that represents a list of approvers for the action.
-
SetApproversInfo()
-
Updates the list of approvers of the action.
Properties
-
Property
-
Description
-
ExecutionOptions
-
Gets or sets a value that indicates whether the action is performed synchronously or asynchronously.
-
ApprovalRequired
-
Gets a value that indicates whether approval is required to execute the action.
Details
GetAction()
Returns the IAdmAction interface that represents the action object.
IAdmAction GetAction()
SetAction()
Updates the action object.
void SetAction(IAdmAction action)
Examples
For examples on how to create actions and add them to business rules, scheduled tasks, and custom commands, see Defining actions and conditions.
Remarks
This method does not save the changes to the directory. Call IADs::SetInfo to update the action parameters in the directory.
GetApproversInfo()
Returns the IAdmRequestApproversInfo interface that represents a list of approvers for the action.
IAdmRequestApproversInfo GetApproversInfo()
SetApproversInfo()
Updates the list of approvers of the action.
void SetApproversInfo(IAdmRequestApproversInfo approversInfo)
Examples
The following code sample adds the manager of the initiator and the user named John Smith to the list of approvers.
- PowerShell
-
# The $action variable represent an action. # Get information about approvers. $approvers = $action.GetApproversInfo() # Bind to the user John Smith. $userDN = "CN=John Smith,CN=Users,DC=company,DC=com" $user = $service.OpenObject("Adaxes://$userDN", $null, $null, 0) # Add the user to the list of approvers. if (-not($approvers.ApproverTrustees.IsApprover($user))) { $approvers.ApproverTrustees.Add($user) } # Add the manager of the initator to the list of approvers. $approvers.ManagerOfTrusteeIsApprover = $true # Save the changes. $action.SetApproversInfo($approvers) - C#
-
// The action variable represent an action. // Get information about approvers. IAdmRequestApproversInfo approvers = action.GetApproversInfo(); // Bind to the user John Smith. const string userDN = "CN=John Smith,CN=Users,DC=company,DC=com"; IAdmTop user = (IAdmTop)service.OpenObject($"Adaxes://{userDN}", null, null, 0); // Add the user to the list of approvers. if (!approvers.ApproverTrustees.IsApprover(user)) { approvers.ApproverTrustees.Add(user); } // Add the manager of the initator to the list of approvers. approvers.ManagerOfTrusteeIsApprover = true; // Save the changes. action.SetApproversInfo(approvers);
Remarks
This method does not save the changes to the directory. Call IADs::SetInfo to update the action parameters in the directory.
ExecutionOptions
Gets or sets a value that indicates whether the action is performed synchronously or asynchronously.
- Type:
- ADM_ACTIONEXECUTIONOPTIONS_ENUM
- Access:
- Read/Write
ApprovalRequired
Gets a value indicating whether approval is required to execute the action.
- Type:
- bool
- Access:
- Read-only
Requirements
Minimum required version: 2009.1