Creating an Action Catalog

Procedure

  1. Create an action catalog called my.action.catalog. Create the action descriptors as shown in the following sample:

 <action-descriptor name="My-Action" category="my category"
 datatype="BOOLEAN"  implclass="com.tibco.spm.rule.action.MyActionHandlercontextImpl"
 description="My custom action function">
Function Descriptors Properties
Property Name Description
name Name of the function.
category The category name.
implclass To create custom metric function, you should extend com.tibco.spm.rule.action.MyActionHandlercontextImpl. This is an implementation class that implements ActionHandlerContext.

For more information about the API, refer to the TIBCO Service Performance Manager Java API reference pages.

datatype Datatype of the action. This is always set to true.
description Description of the custom action.

  1. The action parameters list arguments required by the action function with their ordinal position and data type. The following example for "e-mail action" takes five action parameters:
       </action-params>
         <action-param id="To" datatype="STRING" ordinal="0"      value="" description="TO Recipient List(Comma Separated)"/>
         <action-param id="Cc" datatype="STRING" ordinal="1"      value="" description="CC Recipient List(Comma Separated)"/>
         <action-param id="Bcc" datatype="STRING" ordinal="2"      value="" description="BCC Recipient(Comma Separated)"/>
         <action-param id="Subject" datatype="STRING" ordinal="3"      value="" description="Subject" />
         <action-param id="Body" datatype="STRING" ordinal="4"      value="" description="e-mail Content" />
        </action-params>
     </action-descriptor>
    </action-descriptors>
  2. These are made available to the TIBCO ActiveMatrix Dashboard when you use the action. The dashboard user has to provide values to these parameters at the time of configuring an action in a rule.