Enable triggers
You enable triggers by configuring them in the triggers.xml file.
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:
-
Open the TEXTML Administration perspective by clicking the
TEXTML Administration shortcut on the
tool bar. If the shortcut is not displayed, follow these steps:
- Select Window > Perspective > Open Perspective > Other
- Click TEXTML Administration.
- Click Open.
- 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.
- When the Connect as dialog opens, type your username and password and click OK.
- Double-click the name of your Content Store to open a connection to it.
- Expand the Content Store's Repository node and browse to /system/conf to locate the triggers.xml file.
- Right-click triggers.xml and select Check Out.
- Open the file in an XML editor.
-
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:
Option Description 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 anobjtype="map"
and another trigger with anobjtype="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, theCheckSvgContent
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
andend-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:
Do not include the <parameters> element for action triggers.<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 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.
The following code shows how to enable a trigger that you created yourself (for example, AddPrepublishFlagTrigger):<trigger apply-to="Release" class="com.ixiasoft.cms.triggers.AddIds" name="AddIds" objtype="topic" schedule="before"> </trigger>
<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>
- Save, close, and check in the file.
-
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 IXIASOFT CCMS Desktop by clicking IXIASOFT CCMS > Synchronize Configuration.