Chapter 12. 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 Decision 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.

Procedure

  1. In Business Central, select the Admin icon in the top-right corner of the screen 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.

  2. 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.xml file 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: [7.16,) instead of 7.16.0.Final
  3. 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 12.1. Enable service tasks and service task settings

    Service Tasks Administration page
  4. 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 @Wid.
  5. After you configure all required service tasks, navigate to a project in Business Central and go to project SettingsService Tasks to view the available service tasks that you enabled.
  6. 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.
  7. If you are prompted for additional information when you install a service task, enter also the required parameters for the service task 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 12.2. Install service tasks for use in processes

    Project-level service task settings
  8. 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 12.3. Access installed service tasks in process designer

    Service tasks in process designer