Page tree
Skip to end of metadata
Go to start of metadata

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 foldel
        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 foldel
        serverService.invoke("Exchange", "invoke", "EnableMailbox ${user}", map);

The list of allowed commands are:

CommandObject nameParametersComments
invokeSentence to executeSentence parametersExecutes the command and return the results
  • No labels