Optimize 10.3.0 | webMethods Optimize Documentation | Administering webMethods Optimize | For Developers | Setting up Web Service Actions | Configuring Web Services Actions
 
Configuring Web Services Actions
*To configure Web service actions
1. In My webMethods: Navigate > Applications > Administration > System-Wide > Environments > Define Environments.
2. Click the name of the configured environment for which you want to configure Web service actions.
3. Click the Configure Servers tab.
4. On the CONFIGURATION tree, find the Analytic Engine for which you want to configure Web service actions, and click WS Action Settings under the name of the Analytic Engine.
The WS Action Settings page is displayed.
5. Identify the Web service to execute, the location of its WSDL document, and the parameters the service will pass, by uncommenting and editing this XML displayed in the text box:
<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 describes the action variables.
Table A: Action Variables
In section A of the XML sample, replace the text in braces{} with the appropriate text as described.
Variable
Description
Test Action
Name:A unique name to identify the action.
host:port/path/ service.wsdl
URL + wsdl:The hostname 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
Method:The name of the method to invoke. This name should match the method name provided in the WSDL document.
The following table describes the action parameter attributes.
Table B: Action Parameter Attributes
The web service method called must have a signature matching the parameters listed below. Place these parameters in Section B of the XML code sample.
To specify parameters for displaying rule information and other attributes in your Web service actions, replace the <element><string> lines with one or more of the following:
<element><string>RuleName</string></element>
<element><string>RuleDefinition</string></element>
<element><string>RuleEvaluation</string></element>
<element><string>RuleSla</string></element>
<element><string>RuleCustomer</string></element>
<element><string>RuleSeverity</string></element>
<element><string>RuleStatus</string></element>
<element><string>Attributes</string></element>
<element><string>Time</string></element>
Literal Attribute
Description
Enter the names of these attributes literally to include this information in the action.
RuleName
String containing of the name of the base rule, an instance of which has fired: Use this text literally to represent the string containing the name of the base rule, an instance of which was violated.
RuleInstanceName
String containing the name of the rule instance that fired: Use this text literally to represent the string containing the name of the rule instance that was violated.
RuleDefinition
String containing the definition of the rule: Use this text literally to represent the string containing the definition of the rule.
RuleEvaluation
String containing the evaluation of the rule: Use this text literally to represent the string containing the evaluation of the rule.
RuleSla
String containing the Service Level Agreement (SLA) associated with the rule: Use this text literally to represent the string containing the SLA status (Yes or No) of the rule.
RuleCustomer
String containing the name of a customer associated with the rule: Use this text literally to represent the string containing the name of a customer associated with the rule.
RuleSeverity
String containing the severity of the rule: Use this text literally to represent the string containing any severity label assigned to this rule.
RuleStatus
String containing the compliance status of the rule. Use this text literally to represent the compliance status (Rule Violation or In Compliance) of the rule.
Attributes
Array of strings containing key = value pairs of all attributes in the rule diagnosis: Use this text literally to represent an array of strings containing key/value pairs of all attributes in the rule diagnosis.
Time
String form of the time that the rule went out of compliance: Use this text literally to represent the time that the rule was violated, in string format.
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 Process InstanceId field, you would specify ProcessInstanceId.
The following table describes the optional authentication parameters.
Table C: Optional Authentication Parameters
Use these parameters in Part C of the XML code sample when calling a secure web service. Supply the following parameters under the “login” node:
Variable
Description
username
Specify a user name. Must be accompanied by a password.
passwordHandle
Handle that identifies the password specified in the password string. Each instance of a web service action must use a unique password handle. By default, WSActionHandle automatically generates unique password handles for each web service action instance.Though you can manually define password handles, they will be overwritten when the configuration is saved.
password
Specify a password. Must be accompanied by a user name. Once this settings file is saved and processed, the password is encrypted, and is displayed only as asterisks.
Optimize displays the Web service action you identified in actionName on the Edit Rule and Rule Details pages. For more information about selecting a Web service action on this page, see the webMethods Optimize User’s Guide.
6. If you want to identify more than one Web Service action, copy and edit the XML shown above for each action.
7. Click Save.
8. Apply the changes by deploying your updated environment (see Changing Your Configuration Settings and restarting the Analytic Engine as described in Starting Optimize.
9. Make sure the new settings work, as follows:
a. In My webMethods Navigate > Applications > Administration > Analytics > Rules > Rule List.
b. On the Rule List page, click Create Rule.
c. In the Actions area on the Edit 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 page.