Chapter 62. Deploying custom tasks
Work item handlers, as custom code, are created outside of Red Hat Process Automation Manager. To use the code in your custom task, the code must be deployed to the server. Work item handler projects must be Java JAR files that can be placed into a Maven repository.
In Red Hat Process Automation Manager you can deploy custom tasks using two methods:
- Within a Business Central custom task repository. For more information, see Chapter 58, Managing custom tasks in Business Central.
- Outside of Business Central, you can manually copy the JAR files into the Maven repository.
62.1. Using a Business Central custom task repository
You can enable, disable, and deploy custom tasks within a Business Central custom task repository. For more information, see Chapter 58, Managing custom tasks in Business Central.
62.2. Uploading JAR Artifact to Business Central
You can upload the work item handler JAR to the Business Central Maven repository using Business Central admin settings.
Procedure
- In Business Central, select the Admin icon in the top-right corner of the screen and select Artifacts.
- Click Upload.
- In the Artifact Upload window, click the Choose File icon.
- Navigate to the location of the work item handler JAR, select the file and click Open.
In the pop-up dialog, click the Upload icon.
The artifact is uploaded and can now be viewed on the Artifacts page and referenced.
62.3. Manually copying work item definitions to Business Central Maven repository
Business Central automatically creates or reuses the Maven repository folder. By default the location is based on the location of the user launched Red Hat JBoss EAP. For example, the full default path would be <startup location>/repositories/kie/global
. It is possible to replicate a standard Maven repository folder layout of <groupId>/<artifactId>/<versionId>/
in this folder and copy work item handler JAR files to this location. For example:
<startup location>/repositories/kie/global/com/redhat/myworkitem/1.0.0-SNAPSHOT/myworkitems-1.0.0-SNAPSHOT.jar
Any artifacts copied in this fashion are available to Red Hat Process Automation Manager without a server restart. Viewing the artifact in the Business Central Artifacts page requires clicking Refresh.