Inside Activate
Connectors
Event Handlers (Actions)
12 min
event handlers define what happens when a connector detects a change (create, update, delete, enable, disable, etc ) they live inside \<events> blocks within change handler definitions each event type can contain one or more steps that specify what to do — submit a job, run a script, notify users, update tickets, and more supported event steps step purpose submit submit a job or task within activate execute run a script directly from the workflow notify send an email or in system notification end end the current workflow successfully retry leave the change pending and rerun later error throw an error and mark the row as failed set set activate parameters or attributes ticket create or update a ticket in activate publish / unpublish change the publication state of provisioning objects example \<events> \<create> \<submit> \<task>=//tasks/user/create user\</task> \<arguments> \<user> \<firstname>%=//current/firstname%\</firstname> \<lastname>%=//current/lastname%\</lastname> \<manager>=//links/manager\</manager> \</user> \</arguments> \</submit> \</create> \</events> step details submit submit a task to activate’s workflow engine \<submit> \<task>=//tasks/user/update user\</task> \<arguments> \<data> \<user>=//user\</user> \<department>=//current/department%\</department> \</data> \</arguments> \</submit> execute run a script inline or referenced from a resource \<execute>=//scripts/updateuserfields\</execute> notify send an email or message, optionally conditional \<notify> \<when>errors\</when> \<users>admin\@domain com\</users> \<message> \<subject>connector error\</subject> \<body>\<!\[cdata\[ the employee connector encountered %=//errors/count% error(s) \<table class='grid'> \<tr>\<th>id\</th>\<th>name\</th>\<th>error\</th>\</tr> %=foreach(=//errors, "\<tr>\<td>%=/employeenumber%\</td>\<td>%=/displayname%\</td>\<td>%=/log/0/message%\</td>\</tr>")% \</table> ]]>\</body> \</message> \</notify> ticket log or update an activate ticket \<ticket> \<ticketnumber>=/ticketnumber\</ticketnumber> \<name>=/name\</name> \<state>=if(=/state, "closed", "open")\</state> \<status>=/status\</status> \<user>=//user\</user> \<description>=/details\</description> \<notes>=/notes\</notes> \</ticket> ticket fields field required example description ticketnumber optional hr12345 external ticket number name optional onboarding failure ticket title description optional — detailed message state optional open / closed ticket state in activate status optional assigned external status user optional =//user assigned user notes optional — long form note text type optional request / fault ticket type priority optional high ticket priority category optional hardware ticket category retry keep the change pending and rerun later \<retry /> error mark a change as failed and stop processing \<error>user could not be updated\</error> set assign parameters without needing a script \<set> \<departmentcode name="departmentcode" type="string">=/departmentcode\</departmentcode> \</set> publish / unpublish toggle publication status of provisioning objects \<publish /> \<unpublish /> best practices chain multiple steps in order e g , submit → set → notify use when=errors in notify blocks to alert only on failures keep retry timeouts bounded — use options/retry/timeout in the process avoid infinite loops ensure scripts and jobs don’t re trigger the same connector immediately