Triggers
Triggers are sets of code that automatically execute when a user performs a given action or when there is a change in status.
You can use one of the pre-configured triggers in the IXIA CCMS package or you can create your custom one.
There are two types of triggers:
- CCMS action triggers that automatically execute when a user performs an action such as Release, Lock, or Publish. For example, you can use a trigger to automatically remove tracked changes from all related topics when a user publishes a document.
- Status triggers that automatically execute there is a status change. For example, you can use a status trigger to archive any existing PDF review copies when a document object goes from Authoring:Draft to Authoring:Edit review. The status changes after inclusion of the updates and when the object returns to a review state.
Important: Make configuration changes in a test
environment and confirm they work before copying them to a production
environment.
You can enable or disable a triggers in the triggers.xml file.
The following code shows how a trigger could be defined in the triggers.xml
file.
<!-- Status trigger -->
<trigger apply-to="changeStatus" class="com.ixiasoft.cms.triggers.ArchiveReviewPDF" name="Archive" objtype="topic" schedule="after">
<parameters>
<param name="initial-status" value="Authoring:draft"/>
<param name="end-status" value="Authoring:edit review"/>
</parameters>
</trigger>
<!-- Action trigger -->
<trigger apply-to="Release" class="com.ixiasoft.cms.triggers.AddIds" name="AddIds" objtype="topic" schedule="before">
</trigger>
You configure status triggers by setting the apply-to
attribute to "changeStatus"
,
whereas you configure action triggers by setting the apply-to
attribute to the related action.