Chapter 13. Managing service tasks in Business Central
Service tasks (work items) are tasks that you can customize and reuse across multiple business processes or across all projects in Business Central. Red Hat Process Automation Manager provides a set of service tasks within the service task repository in Business Central. You can enable or disable the default service tasks and upload custom service tasks into Business Central to implement the tasks in the relevant processes.
Red Hat Process Automation Manager includes a limited set of supported custom tasks. Custom tasks that are not included in Red Hat Process Automation Manager are not supported.
In Business Central, click in the upper-right corner and select Service Tasks Administration.
This page lists the service task installation settings and available service tasks for processes in projects throughout Business Central. The service tasks that you enable on this page become available in the project-level settings where you can then install each service task to be used in processes. The way in which the service tasks are installed in a project is determined by the global settings that you enable or disable under Settings on this Service Tasks Administration page.
Under Settings, enable or disable each setting to determine how the available service tasks will be implemented when a user installs them at the project level.
The following service task settings are available:
- Install as Maven artifact: Uploads the service task JAR file to the Maven repository that is configured with Business Central, if the file is not already present.
Install service task dependencies into project: Adds any service task dependencies to the
pom.xmlfile of the project where the task is installed.
Use version range when installing service task into project: Uses a version range instead of a fixed version of a service task that is added as a project dependency. Example:
Enable or disable (set to ON or OFF) any available service tasks as needed. Service tasks that you enable will be displayed in project-level settings for all projects in Business Central.
Figure 13.1. Enable service tasks and service task settings
To add a custom service task, click Add Service Task, browse to the relevant JAR file, and click the Upload icon. The JAR file must contain work item handler implementations annotated with
- Optionally, to remove a service task, click remove on the row of the service task you want to remove and click Ok to confirm removal.
- After you configure all required service tasks, navigate to a project in Business Central and go to the project Settings → Service Tasks page to view the available service tasks that you enabled.
- For each service task, click Install to make the task available to the processes in that project or click Uninstall to exclude the task from the processes in the project.
If you are prompted for additional information when you install a service task, enter the required information and click Install again.
The required parameters for the service task depend on the type of task. For example, rule and decision tasks require artifact GAV information (Group ID, Artifact ID, Version), email tasks require host and port access information, and REST tasks require API credentials. Other service tasks might not require any additional parameters.
Figure 13.2. Install service tasks for use in processes
- Click Save.
Return to the project page, select or add a business process in the project, and in the process designer palette, select the Service Tasks option to view the available service tasks that you enabled and installed:
Figure 13.3. Access installed service tasks in process designer