Enable triggers

You enable triggers by configuring them in the triggers.xml file.

Note: This can be applied within a Hosted environment, but only within a test server.

This procedure describes how to enable a preconfigured action trigger or a custom trigger that you created yourself. For specific information about each preconfigured trigger, see the links at the end of this topic.

To enable a trigger:

  1. Open the TEXTML Administration perspective by clicking the TEXTML Administration shortcut on the tool bar. If the shortcut is not displayed, follow these steps:
    1. Select Window > Perspective > Open Perspective > Other
    2. Click TEXTML Administration.
    3. Click Open.
  2. In the TEXTML Administration view, double-click the server. If your server is not displayed in the view, you must add it to the view.
  3. When the Connect as dialog opens, type your username and password and click OK.
  4. Double-click the name of your Content Store to open a connection to it.
  5. Expand the Content Store's Repository node and browse to /system/conf to locate the triggers.xml file.
  6. Right-click triggers.xml and select Check Out.
  7. Open the file in an XML editor.
  8. Add a new <trigger> element, as follows:
    <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 that will execute 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 preconfigured triggers (see the links at the end of this topic for 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 will be displayed to the users in status windows; for example, "Add Ids". Select a name that will be meaningful to your users.
    type-of-object Type of the object to which the trigger will be applied; for example, "image", "map", or "topic". 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 create a trigger for the Release command with an objtype="map" and another trigger with an objtype="topic".
    before|after Specifies whether the trigger will be executed before or after the action is performed. Valid values are:
    • before: The trigger is executed before the action. If the trigger fails, then the action is not performed. For example, the CheckSvgContent trigger—which validates that Scalable Vector Graphics (SVG) images do not contain external links—should be executed before the Release action. If the trigger fails, then the document should not be released.
    • after: The trigger is executed after the action, so the action is performed even if the trigger fails. For example, a trigger that sends notifications to users should be executed after the action, since it should not block the action if it fails.
    initial-status-value and end-status-value Apply to status triggers only. Specify the initial status and end status that will prompt the trigger. For example, to specify a trigger that is executed when the status goes from Authoring:Draft to Authoring:Edit review, enter:
    <parameters>
          <param name="initial-status" value"Authoring:Draft">
          <param name="end-status" value"Authoring:Edit review">
    </parameters>
    Do not include the <parameters> element for action triggers.
    For example, the following code creates an AddIds trigger that will be executed when a user releases a topic. The trigger is executed before the Release action. See the AddIds trigger documentation for more information.
    <trigger apply-to="Release" class="com.ixiasoft.cms.triggers.AddIds" name="AddIds" objtype="topic" schedule="before">         
    </trigger>   
    The following code shows how to enable a trigger that you created yourself (for example, 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>
  9. Save, close, and check in the file.
  10. Inform users of the changes.
    The changes will be applied automatically once users close and then reopen their IXIASOFT CCMS Desktop. Users can also apply the changes without restarting their CCMS Desktop by clicking IXIASOFT CCMS > Synchronize Configuration.