Event Triggers

Event Triggers use scripts to create an Event Filter that listens to events passing through the MVI Event Service. When the Event Script detects an event (e.g., that a dependency of the trigger’s workflow is used; a completed build of a related project; or a completed originating workflow with the auto-deploy flag set to "true"; etc.), it can then trigger another action by the MVI server.

In general, once configured, the scripts are immediately active and listening for events. The trigger, workflow, and project parameters provide references to the Event Trigger itself, as well as the workflow and project it belongs to. The MVI API exposes its event service so the Trigger may be configured to listen for specific events.

Prerequisites

  • You must have Administrative permissions. Prior to adding an Event Trigger to the workflow, the Event Script must be created. If you are unfamiliar with MVI scripting, Scripting and Tools > Developer Tools before creating an Event Trigger.

Create Event Trigger

  • Go to Administration and select the workflow the trigger is to be added to.
  • Select the Triggers tab, and click the New Trigger button.
  • Select Event Trigger from the drop-down menu and click Select.
  • Configure trigger:
  1. Name the trigger.
  2. Force. Check the box to force a build every time this trigger executes.
  3. Event Script. Select the script that returns an Event Listener. Available parameters are the workflow to be triggered (workflow); this project (project); and this trigger (trigger).
  • Click Save then Done.

Repository Triggers
For Continuous Integration builds, it is ideal to build every time a file is checked in. In this case, a post-commit script is added to the SCM that alerts MVI of source changes. Once the Repository Trigger is active for a workflow, every commit of source changes will initiate a build.

  • Go to Administration and select the workflow the trigger is to be added to.
  1. If using Subversion, triggers can be set up at the repository level. Once done, they are available to all workflows using that repository. An individual workflow trigger does not need to be created.
  • Select the Triggers tab, and click the New Trigger button.
  • Select Repository Trigger from the drop-down menu and click Select.
  • Configure trigger:
  1. Name the trigger.
  2. Force. Check the box to force a build every time this trigger executes.