Invoker interface
Any agent, trigger or mapping can use the invoker method for the ActiveDirectory agent. The invoker method is available in the dispatcherService class as well as the in the serverService.
The invoker method is not specific of the Shell agent. Many other connectors support this method. The expected arguments are:
- Action
- Object name
- Parameters
Here you have an example of a post-update trigger to create the home server for a user:
map = new HashMap();
map.put("user", source{"accountName"});
// Create folder
dispatcherService.invoke("invoke", "mkdir /home/${user}", map);
dispatcherService.invoke("invoke", "mkdir /home/${user}/Desktop", map);
There is a chance to execute operation across agents. For instance, if the system has an ActiveDirectory agent and an Exchange agent, hereĀ is a post-insert trigger to place in the post-insert trigger of the ActiveDirectory agent to execute a command in the Exchange one.
map = new HashMap();
map.put("user", source{"accountName"});
// Create folder
serverService.invoke("Exchange", "invoke", "EnableMailbox ${user}", map);
The list of allowed commands are:
Command |
Object name |
Parameters |
Comments |
---|---|---|---|
invoke |
Sentence to execute |
Sentence parameters |
Executes the command and return the results |