Triggers for CCMS Web
Triggers cause the CCMS to automatically perform certain actions when a CCMS Web user performs a given function or when an object changes status.
You can use one of the preconfigured triggers in the CCMS, or you can create a custom one if you have the programming knowledge to do so.
You work with CCMS Web triggers in the syste,/conf/triggerswebplatform.xml file.
Action triggers
Action triggers automatically run when a user performs an action such as Release, Lock, or Publish.
For example, this trigger applies the @ixia_locid
attribute to
specified elements when a user releases an object:
<!-- Applies @id attributes to elements specified in xpathforids.xml -->
<class applyOn="Release" className='com.ixiasoft.application.command.triggers.AddElementIdTrigger' />
Status change triggers
Automatically run when a user (or the system) changes the status of an object.
For example, this trigger removes specified processing instructions (PIs) from
objects when they move from any Authoring status to
Authoring:complete
:
<!-- Removes the Oxygen track change processing instructions -->
<class applyOn="changeStatus" className="com.ixiasoft.application.command.triggers.RemoveProcInsTrigger">
<parameters>
<param name="initial-status" value="Authoring:*"/>
<param name="end-status" value="Authoring:complete"/>
</parameters>
</class>
Anatomy of a trigger
CCMS Web triggers are identified by their
@className
attribute:
<!-- Applies @id attributes to elements specified in xpathforids.xml -->
<class applyOn="Release" className='com.ixiasoft.application.command.triggers.AddElementIdTrigger' />
The type of trigger is identified by the @applyOn
attribute:
<!-- Applies @id attributes to elements specified in xpathforids.xml -->
<class applyOn="Release" className='com.ixiasoft.application.command.triggers.AddElementIdTrigger' />
The value of this attribute is changeStatus
,
Release
, Delete
, assignTo
, or
Lock
.
The <parameters>
element(s) identify each scenario for which
the trigger applies. For example, this trigger has only one scenario. It applies
when an object changes status from any Authoring status to
Authoring:complete
:
<!-- Removes the Oxygen track change processing instructions -->
<class applyOn="changeStatus" className="com.ixiasoft.application.command.triggers.RemoveProcInsTrigger">
<parameters>
<param name="initial-status" value="Authoring:*"/>
<param name="end-status" value="Authoring:complete"/>
</parameters>
</class>
Some triggers can have multiple scenarios. For example, say that when you activate
the trigger above, you know that some objects at Authoring:done
have PIs and you want to remove them before a user edits those objects. You could
add a second <parameters>
element to cover this scenario:
<!-- Removes the Oxygen track change processing instructions -->
<class applyOn="changeStatus" className="com.ixiasoft.application.command.triggers.RemoveProcInsTrigger">
<parameters>
<param name="initial-status" value="Authoring:*"/>
<param name="end-status" value="Authoring:complete"/>
</parameters>
<parameters>
<param name="initial-status" value="Authoring:done"/>
<param name="end-status" value="Authoring:work"/>
</parameters>
</class>
As shown, you must add a second <parameters>
element. You
cannot add <param>
elements to an existing
<parameters>
element. Each
<parameters>
element must describe only one scenario.