Calling published automation services

You can call automation services from the user interfaces of your business applications.

Automation services are published workflow automations that can be discovered and added to your business application (application) in a consistent way. You can also reuse existing process applications from traditional workflow capabilities or create an external automation service from the services in an OpenAPI or Swagger file.

Before you begin

  • An automation must be published as an automation service in IBM Business Automation Studio before you can call them from your application.

About this task

Your application user interfaces are made up of pages, views, actions, and automation services. Actions and automation services provide you with the ability to call server-side logic from your user interface. Actions are usually implemented by more technical users to achieve automation functionality that is specific to your application. Think of actions as the customizable entities that can be used to achieve more complex automations. Whereas automation services are reused across the platform after they are published to Business Automation Studio. Automation services are added to applications from the component pane.

You can add synchronous or asynchronous automation services to your application. If your application invokes a synchronous automation service, the application will receive a response. You can think of synchronous as a two-way invocation. If your application invokes an asynchronous automation service, it is a one-way transaction where no response is captured.

When you drag an automation service to your page from the components list, the entry fields for your user interface are automatically generated for you based on the input and output parameters of the operation you selected.
Note: If you add an asynchronous automation service to your page, there are no outputs configured.

Procedure

  1. While creating your application, click the category list from the components pane, and then click Automation services.
  2. Click Add.
  3. From the list of published automation services, select the automation service that you want to use.
    Note: If the automation service you want to use is not available, it might not be published to Business Automation Studio or you might not have permission to call it.
  4. Optional: Select whether you want to use the default version of the automation service at run time. The administrator sets the default version and they can change it at any time. If the box is cleared, the version that you selected when you added the automation service is used at run time.
  5. Select the operations that you want to use from the published automation service, and then click Add.
    The automation service now appears in the components pane.
  6. Drag your automation service to a page of your application.
  7. Select the operation that you want to call from the automation service. You can click Add operation + if you don't see the operation in operation list.
  8. Choose whether you want to call the automation service when a button is clicked, or when your application page is loaded.
  9. Configure your input mapping as required.
  10. Click Done.

Results

The entry fields for your user interface are automatically generated based on your selections in the Call an automation service dialog, specifically the input and output parameters.