Calling an automation service from a workflow automation

Discover a published automation service from the Business Automation Studio catalog, 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 of 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.

Service flows can invoke asynchronous implementations such as asynchronous automation services or asynchronous service flows. A service flow performs an asynchronous invocation, for instance, if an automation service is long-running and returns after some time later. Therefore, the calling service flow becomes of asynchronous nature too.

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.

Service flows can be enabled for asynchronous invocations. If you intend to invoke asynchronous implementations, you need to check the Enable service flow for asynchronous invocation property in the overview tab of the 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.

You must authorize users with the appropriate type of access, depending on the environment: administrative access to install to workflow servers in production environments, write access to install to any non-production workflow server, or read access to install to workflow servers in development environments.