Command-Line Tools for Workflow

Policy Manager provides a command-line tool that allows integrating Policy Manager workflow with external processing. This tool can be used to perform workflow actions on services and contracts. The tool also provides a facility to update the workflow definition XML without using the Policy Manager Management Console.

Workflow Management Workflow Library

Table of Contents

  1. Performing Workflow Actions
  2. Loading Updated Workflow XML Definitions

Performing Workflow Actions

The callWorkflow command-line tool can be used in external processing to cause a Workflow action to be performed on a particular service or contract.

Using the callWorkflow command-line tool to cause a workflow action to be performed

Supported Command-Line Parameters:
--performAction
--performRemoteAction
Use one of these required parameters to specify whether the workflow action is to be performed on a service or contract in the local Policy Manager or on a remote Policy Manager instance.
--remoteServiceKey uddi-service-key
--remoteServiceQName service-qname
--remoteServiceBindingId binding-identifier
Use one of these when performing an action on a remote Policy Manager to specify the instance of the Policy Manager Workflow Service that has been created in the local Policy Manager connected to the desired remote Policy Manager. You can specify either the service’s UDDI key, QName ({xml- namespace}xml-localpart), or a binding identifier that has been assigned to the service.
--remoteAdminUser [domain\]username
--remotePassword password
When performing an action on a remote Policy Manager, these two parameters specify the user credentials on the remote Policy Manager instance when performing the specified action.
--remoteMethod sync | async
This optional parameter specifies the strategy to use when performing a workflow action on a remote Policy Manager instance.
  • sync The command will not complete until the workflow action has been completed on the remote Policy Manager instance. This is the default.
  • async The command completes immediately after the request to perform the remote workflow action has been placed on a persistent queue. Policy Manager includes a background process that will perform the workflow action on the remote Policy Manager instance as soon as possible.
--service uddi-service-key
--serviceKey uddi-service-key
--serviceQName service-qname
--serviceBindingId binding-identifier
--contract contract-key
Use one of these required parameters to specify the target service or contract for the Workflow action to be performed.
--action workflow-action-name
Use this required parameter to specify the Workflow action that is to be performed for the selected service or contract. This parameter specifies the name attribute on the Workflow <action> element. For instance:
<action id="1000" name="WF-Import Complete">
This action could be selected using the following parameter:
--action "WF-Import Complete"
Note that if the value for this parameter includes embedded spaces, it must be enclosed in quotation marks.
--comment "comment for workflow history log"
This optional parameter is used to specify a comment that will be added to the Workflow history log entry for the action performed. If the value for this parameter includes embedded spaces, it must be enclosed in quotation marks.
--user [domain\]username
--password password
These required parameters specify the user name and password for a user on the local Policy Manager that will process this request. This user must have permission to use the Workflow Service on the local Policy Manager instance. In addition, if the workflow action is to be performed on a service or contract in the local Policy Manager, this user must also have the permissions and/or roles needed to perform that action.
--host PM-host-name
--port PM-port
These optional parameters specify hostname and port for the local Policy Manager container. These default to localhost and 9900.

back to top

Loading Updated Workflow XML Definitions

The callWorkflow command-line tool can also be used to load updated workflow XML definitions in the local Policy Manager instance using a scripted process. This process must be performed from the command-line on the server a Policy Manager container is executing.

Using the callWorkflow command-line tool to load updated workflow XML definitions

Supported Command-Line Parameters

-- updateDefinition
This required parameters is needed to select the Update Workflow Definition processing.
--serviceWorkflowFile file-system-path
--contractWorkflowFile file-system-path
Use one of these to specify the file system location of the updated workflow definition XML file. This XML file must be specified as a file system location that is accessible by the Policy manager container.
--reset | ––noreset
When --reset is specified, all of the current service or contract workflow instances are reinitialized by performing the @reset initial action. This is needed when there is the possibility that one of the workflow instances would have an active <step> that is not present in the new workflow definition.
--user [domain\]username
--password password
These required parameters specify the user name and password for a user on the local Policy Manager that will process this request. This user must have permission to use the Workflow Service on the local Policy Manager instance. In addition, if the workflow action is to be performed on a service or contract in the local Policy Manager, this user must also have the permissions and/or roles needed to perform that action.
--host PM-host-name
--port PM-port
These optional parameters specify hostname and port for the local Policy Manager container. These default to localhost and 9900.

back to top