-
Notifications
You must be signed in to change notification settings - Fork 4
Command exit events
Command exit events provide a way for a class constructor to call an external program in response to specified conditions being met. Any command line application can be executed.
As with all events, the execution conditions must be met for the event to be raised.
All events must have a unique name that is used to identify the event.
Events can be disabled to prevent them from being raised and executed.
Specify the path and executable file to run.
The command-line arguments to pass the executable. Please note that as this uses ACMA declarative language, certain characters must be escaped to be passed to the command line.
The external command can either be run synchronously or asynchronously. In synchronous mode, ACMA will wait for the process to exit before moving onto the next export object. In asynchronous mode, ACMA will run external commands on a separate thread, and continue to process export objects. ACMA will wait until all operations have completed before signaling to the FIM sync engine that the export has completed.
When exporting synchronously, you can abort the export operation on the object, and return an error to the sync engine. When exporting asynchronously, you can only log the error to the ACMA log file.
Command: powershell.exe
Arguments: -File "C:\Scripts\ProcessUser.ps1" -Username "{sAMAccountName}" -Email "{mail}"
Execute Asynchronously: No
Command: C:\Scripts\CreateHomeDirectory.bat
Arguments: "{sAMAccountName}" "{department}"
Execute Asynchronously: Yes
Command: C:\Tools\UserProvisioning.exe
Arguments: /user "{displayName}" /id "{employeeNumber}" /dept "{department}"
Execute Asynchronously: No
On Error: Abort export
Synchronous execution blocks ACMA processing until the command completes, which can impact export performance for time-consuming operations. Asynchronous execution allows ACMA to continue processing other objects while commands run in parallel.
Synchronous commands can abort the export operation and return errors to the sync engine, providing strong error control. Asynchronous commands cannot abort exports but can log errors for monitoring purposes.
Commands execute under the ACMA service account context. Ensure the service account has appropriate permissions for the commands being executed.
When using ACMA declarative language expressions in arguments, special characters may need escaping depending on the target application's command-line parsing requirements.