Enable a trigger

You can enable a trigger by making configuration changes to the triggers.xml file.

Make sure you distinguish between the two trigger types: action-related triggers and triggers based on a change in status. Also pay attention to valid trigger classes. See Create new trigger code.

Important: Make configuration changes in a test environment and confirm they work before copying them to a production environment. For dedicated SaaS deployments, test the changes and then ask IXIA CCMS Customer Support to copy the changes to your production environment.

To enable a trigger:

  1. In the TEXTML Administration perspective, connect to your server.
  2. Locate the triggers.xml file in the repository's /system/conf collection.
  3. Check out the file and open it for editing.
  4. Add a new <trigger> element.
    <trigger apply-to="cms-action" class="trigger-class" name="trigger-name" objtype="type-of-object" schedule="before|after"> 
       <parameters>
          <param name="initial-status" value"initial-status-value">
          <param name="end-status" value"end_status-value">
       </parameters>
    </trigger>   

    where:

    OptionDescription
    cms-action Name of the action runs the trigger; for example, "Release". Valid values depend on the trigger.
    trigger-class Name of the Java class that defines the trigger; for example, "com.ixiasoft.cms.triggers.AddIds".

    Enter one of the pre-configured triggers, based on the set of valid trigger classes, or enter the name of the trigger class that you created.

    trigger-name Name of the trigger as it appears to a user in status windows. Select a meaningful name for your users. For example, "Add Ids".
    type-of-object Type of object, such as "image", "map", or "topic", to which the trigger applies. If a trigger applies to more than one object type, you must create one trigger per object type. For example, if a trigger applies to releasing maps and releasing topics, then you must create a trigger for the Release command with an objtype="map" and another trigger with an objtype="topic".
    before|after Type of timing that specifies whether the trigger runs before or after an action. Valid values are:
    • before runs the trigger before the action. If the trigger fails, then the action does not run. For example, the CheckSvgContent trigger—which validates that Scalable Vector Graphics (SVG) images do not contain external links—should run before the Release action. If the trigger fails, then the document does not release.
    • after: runs the trigger after the action, so the action runs even if the trigger fails. For example, a trigger that sends notifications to users should run after the action, since it should not block the action if it fails.
    initial-status-value and end-status-value
    Note: Apply to status triggers only. Do not include the <parameters> element for action triggers.
    Types of status that prompts the trigger, such as an initial status and end status. For example, to specify a trigger that runs when the status goes from Authoring:Draft to Authoring:Edit review.
    <parameters>
          <param name="initial-status" value"Authoring:Draft">
          <param name="end-status" value"Authoring:Edit review">
    </parameters>
    For example, the following code creates an AddIds trigger that runs when a user releases a topic. The trigger runs before the Release action.
    <trigger apply-to="Release" class="com.ixiasoft.cms.triggers.AddIds" name="AddIds" objtype="topic" schedule="before">         
    </trigger>   
    The following code shows how to create and enable a trigger, such as AddPrepublishFlagTrigger.
    <trigger apply-to="changeStatus"
       class="com.ixiasoft.cms.triggers.AddPrepublishFlagTrigger" name="Add Prepublish Flag" objtype="map" schedule="after">
         <parameters>
            <param name="initial-status" value="Authoring:review"/>
            <param name="end-status" value="Authoring:accepted"/>
        </parameters>
    </trigger>
  5. Inform users of the changes.
    The changes will be applied automatically once users close and then reopen their IXIA CCMS Desktop. Users can also apply the changes without restarting their CCMS Desktop by clicking IXIA CCMS > Synchronize Configuration.
The trigger is enabled.