Calling an automation service from a workflow automation

Discover a published IBM® Business Automation Workflow or OpenAPI automation service and call it from a workflow automation.

About this task

In Workflow Designer, you can discover automation services that are published in Business Automation Studio, and choose the operations that you want to call. As the result of the discovery, an automation service artifact is created as well as the business objects needed as inputs and outputs of the operations. An automation service has an interface with operations that you can then use as implementations in a service task in a service flow.

To call an automation service, you use a service flow and for each business function that you want to call you use a service task.

Procedure

To discover and call an automation service, complete the following steps:

  1. In the library, select Services > + > Automation Service.
    You then see the list of published services that are available.
  2. Select the automation service that you want.
  3. Select the version of the automation service that you want.
  4. Select the operations that you want to discover.
  5. Click Next.
  6. If you're calling a workflow automation service, you're asked which version of the automation service you want to call at run time: the version that you select or the default version your admin sets. Select a version and click Submit.
    Note: If you're running an automation service from Business Automation Studio that is implemented in Workflow Designer, the current working version of the automation service is called when you choose the option to call the default version at run time.
    An automation service is created, with operations and their inputs and outputs based on the operations that you selected during discovery. In the Data library section, you see the business objects that were created as a result of generating the automation service. These business objects are read-only and are only for the automation service, and have the same lifecycle; when you delete the automation service, the business objects are also deleted.

After your automation service is created, you can select it as an implementation of a service task in a service flow. For information on how to use service flows, see Creating a service flow.

  1. In the service task, select the operation that you want to use.
  2. In the Data Mapping, view and map the inputs and outputs of the operation.
  3. To catch any errors that might occur in the service, attach a catch all boundary error event to it, as described in Catching errors by using error boundary events.

What to do next

After you're happy with your workflow automation service, you can install it to a Workflow Server and run it. See Installing workflow automations and automation services.
Note: When you use a decision service as an automation service and call it from a business application or workflow automation, you can deploy that decision service only to the embedded decision runtime environment to be played back. You can’t promote the decision service to other runtime environments. For 21.0.1 You can’t undeploy the decision service.