Optimize 10.5 | webMethods Optimize Documentation | Configuring BAM | Managing webMethods Optimize Environments | Configuring Logical Servers | Defining Logical Server Subcomponents for the Analytic Engine | Defining WSAction Settings
 
Defining WSAction Settings
When a rule is violated, you can have Optimize trigger a Web service action. For example, suppose that you defined a rule to determine when an adapter goes offline. Also suppose that the Integration Server on which that adapter is running contains a service that attempts to restart adapters. You can define an action so that, when the adapter rule is violated, that action invokes a Web service that executes the Integration Server service to restart the adapter.
You also can provide optional authentication parameters for the Web service action by specifying a user login and an encrypted password.
*To configure Web service actions
1. In My webMethods: Navigate > Applications > Administration > System-Wide > Environments > Define Environments.
2. On the Define Environments page, click the name of the environment you want to work with.
3. On the Edit Environment page, click the Configure Servers tab.
4. Under the appropriate Analytic Engine logical server node in the configuration tree, click WSAction Settings.
A new area appears beside the configuration tree, labeled WSAction Settings for Analytic Engine.
5. Identify the Web service to execute, along with the location of the services associated WSDL document, by editing the XML snippet in the text editor in the settings area. As installed, the XML is configured as a comment (<!-- xml -->). Remove the comment formatting and modify the XML according to the instructions in the XML.
The XML to uncomment and edit appears in the following example.
<properties>
<!-- (Remove this line to uncomment the file.)
<property name="action">
<string meta="name">{Test Action}</string>
<string meta="url">{host:port/path/service.wsdl}</string>
<string meta="method">{operation}</string>
<list>
<!-Place parameter name and types here -->
<element><string>{paramName1}</string></element>
<element><string>{paramName2}</string></element>
<element><string>{paramName...}</string></element>
</list>
<property name="login">
<string meta="user">{username}</string>
<!-- Must use a unique handle for each different password
which is used for encryption -->
<string meta="handle">{passwordHandle}</string>
<string meta="password">{password}</string>
</property>
</property>
--> (Remove this line to uncomment the file.)
</properties>
The following table provides information about the XML properties.
For this property
Substitute
Test Action
A unique name to identify the action.
host:port/path/service.wsdl
The host name or IP address and port number of the system on which the Web service will be executed, and the location and name of the WSDL document.
operation
The name of the method to invoke. This name should match the method name provided in the WSDL document.
The Web service method called must have a signature matching the parameters that are listed in the following table.
List of Parameters
Description
Literal Attributes
Enter the names of these attributes literally to include this information in the action.
RuleName
Use this text literally to represent the string containing the name of the rule instance that was violated.
RuleDefinition
Use this text literally to represent the string containing the definition of the rule.
RuleEvaluation
Use this text literally to represent the string containing the evaluation of the rule.
Attributes
Use this text literally to represent an array of strings containing key/value pairs of all attributes in the rule diagnosis.
Time
Use this text literally to represent the time that the rule was violated, in string format.
ProcessInfo
Use this text literally to represent an array of strings containing information about a process, such as process name, step names, and instance IDs.
ProcessInfo
Array of strings containing information about a process. Use this text literally to represent an array of strings containing information about a process, such as process name, step names, and instance IDs.
Additional Attributes
Enter additional attributes by specifying Monitor data field names.
paramName
Allows you to specify a particular field from the underlying data of the Monitor. For example, if the rule is on business data containing a ProcessInstanceId field, you would specify ProcessInstanceId.
Optional Parameters
One or more parameters to pass to the Web service. These parameters should match the parameters provided in the WSDL document.
username
Specify a user name. The user name must be accompanied by a password.
passwordHandle
Specify the handle used for identifying the password specified in the password string. Use WSActionHandle if you will be specifying only one password for Web service action settings, or use a unique handle for each password if you will be specifying multiple passwords.
password
Specify a password. The password must be accompanied by a user name. Once this settings file is saved and processed, the password will be encrypted, and it will be displayed only as asterisks.
Optimize displays the Web service action you specify on the Add / Edit / Copy Rule page and the Rule Details page.
6. To identify more than one Web service action, copy and edit the XML in the text editor; add and configure a new section for each new Web service action.
7. Click Save to save changes or click Cancel to discard any changes you have made in this settings area.
8. Apply the changes by restarting the Analytic Engine.
For more information about restarting the Analytic Engine, see Administering webMethods Optimize.
9. To make sure the new settings work:
a. In My webMethods: Navigate > Applications > Administration > Analytics > Rules > Rule List.
b. On the Rule List page, click Create Rule.
c. In the Actions panel on the Add / Edit / Copy Rule page, click Add Action.
d. Ensure that the Action Name list contains the Web service actions you added to WSActionConfiguration.properties in this procedure.
If the Action Name list does not contain the Web service actions you identified, check the syntax of the XML in the WS action settings area (on the Configure Servers tab).