Providing workflow automation services

Create an exposed automation service to reuse a business function that is implemented using a process or a service flow. Then, publish the exposed automation service in IBM Business Automation Studio so other business applications (applications), business automations (automations), and external clients can discover and call it.

About this task

An exposed automation service has one or many operations that expose business functions that are implemented as processes or service flows. You can use existing implementations or create new ones. After you finish implementing exposed automation services in Workflow Designer, you can publish them in Business Automation Studio. Published automation services can then be discovered and called in a consistent way from other automations and applications in Business Automation Studio.
The mapping between process and service flow artifacts and the resulting automation service in Business Automation Studio is as follows:
  • For each automation service published in Business Automation Studio, there is an entry with the same name as defined in Workflow Designer.
  • Each operation of the published automation service has a corresponding operation of the same name in the exposed REST automation service, with a service flow or a process as the implementation of the operation. The input and output parameters of the resulting automation service operations match the inputs and outputs in the service flow interface or process interface.
  • You publish the workflow automation, not the individual exposed REST automation services that are contained in the workflow automation. When you publish a workflow automation, all the exposed REST automation services are added to Business Automation Studio.

Procedure

To create an exposed automation service, complete the following steps:

  1. Open your workflow automation that contains your process or service flow.
  2. In the library, select Exposed Automation Services > + > REST service.
  3. Add an operation for each business function that you want to expose.
    In the operation details, name the operation and specify the service flow or process that provides the implementation for the operation. For the implementation, you can:
    • Create a new service flow or process by clicking New.
    • Select an existing service flow or process by clicking Select.
    For more information about service flows and how to create them, see Creating a service flow. For more information about processes and how to create them, see Creating a process.

    Inputs and outputs can use the simple types included with the product, such as String, Integer, Boolean, Decimal, Date, or Time, from the System Data toolkit or custom business objects. Types from other system toolkits are not supported.
    Note: Make sure that there are not multiple business objects with the same name in the dependency chain of your exposed REST automation service and its interface.
  4. Optional: For consumers other than automation service consumers:

    To develop an external client, see the OpenAPI definition for the REST service as it exists and is available in the development environment, by clicking the OpenAPI definition URL in the Behavior section of the REST service editor. For further details, see Implementing an external client to interact with workflow automation services.

  5. Optional: Take a snapshot.
    You can now publish the automation service.

To publish a workflow automation service, complete the following steps:

  1. From the Business Automation Studio home page, select Automations.
  2. Select the workflow automation that contains the exposed automation services that you want to publish.
    Publishing a version of a workflow automation publishes all the automation services in it. To see the services in a particular version, select the Automation Services tab.
  3. On the Versions tab, click the three-dot menu of the version you want to publish and select Publish. To publish a workflow automation service you don't yet have a version for, click the three-dot menu next to Open in the header area. A version is created for you and then it is published.

Results

After you publish the automation, you'll see its automation services in the Published automation services list. The published automation services are now available for a business developer to discover and call from an automation or application. See Calling an automation service from a workflow automation and Calling automation services from an application.