Creating Web Services from Process Definitions

You may have one or more process definitions that you wish to expose as web services. ActiveMatrix BusinessWorks provides a wizard that creates a Service resource and WSDL file for the selected process definitions.

To create a service resource and WSDL file from one or more process definitions, perform the following procedure:

Procedure 

  1. Open a project in TIBCO Designer and create one or more process definitions that implement operations you wish to expose as web services. The input, output, and error schemas for each process definition must be specified as schema elements defined in the XSD. See Start Activity and End Activity for more information about defining input, output, and error schemas.

  2. Create a transport shared configuration resource (either HTTP Connection or JMS Connection) to use as the transport for the web service.

  3. Select and right-click on the name of one of the process definitions in the project tree.

  4. Choose Tools or Multi-User > Generate Web Service > From Process from the pop-up menu.

    The Generate Web Service dialog appears.

  5. Review the values for the fields in the Generate Web Service dialog. The default values may be sufficient for your purposes, or you may wish to change the values. The following table describes each field.

  6. Field

    Description

    Namespace

    Specifies the namespace to use for the web service.

    Port Type

    Specifies the name of the interface for the web service. In WSDL terminology, this is referred to as the Port Type.

    Transport

    Transport for incoming messages. This can be either an HTTP Connection or a JMS Connection shared configuration resource.

    The default value in this field is the first HTTP Connection or JMS Connection resource found in the project tree.

    Location

    Location in the project to place the generated Service and WSDL resources.

    Operation Names

    List of operations in the generated service interface. This list contains the process definition names that implement each operation and the names of the corresponding operations. You can double click on either name to change either the process definition or the operation name. Use the down arrow button to move the selected operation down in the list.

    You can use the Add More Processes to Interface button to select other process definitions to include in the service interface.

    Process Chooser

    This field contains the Add More Processes to Interface button. Click this button to view a list of other process definitions you can add to the interface. Select the desired process definitions and click OK to add them to the list in the Operation Names field.

  7. Click Generate to create a Service resource and WSDL file for the selected process definitions.

  8. The Service resource is named intf<processDefinitionName>-service and the WSDL file is named intf<processDefinitionName>. The service and process definition stubs are placed in the location specified in the Generate Web Service dialog.

  9. Click the intf<processDefinitionName>-service resource in the project tree to display the service. Ensure the endpoint bindings are specified correctly. For HTTP transports, you may need to specify the Endpoint URI. For JMS transports, you must specify the destination name and other JMS configuration information. See the description of the Service resource in TIBCO ActiveMatrix BusinessWorks Palette Reference for more information about specifying endpoint bindings.