Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 2. Creating work item handler projects
Create the software project to contain all configurations, mappings, and executable code for the custom task.
You can create a work item handler from scratch or use a Maven archetype to create an example project. Red Hat Process Automation Manager provides the jbpm-workitems-archetype from the Red Hat Maven repository for this purpose.
Procedure
Open the command line and create a directory where you will build your work item handler such as
workitem-home:mkdir workitem-home
$ mkdir workitem-homeCopy to Clipboard Copied! Toggle word wrap Toggle overflow Check the Maven
settings.xmlfile and ensure that the Red Hat Maven repository is included in the repository list.NoteSetting up Maven is outside the scope of this guide.
For example, to add the online Red Hat Maven repository to your Maven
settings.xmlfile:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Find the Red Hat library version and perform one of the following tasks:
- To find the library version online, see What is the mapping between Red Hat Process Automation Manager and the Maven library version?.
-
To find the library version offline, check
Implementation-Versioninbusiness-central.war/META-INF/MANIFEST.MForImplementation-Versioninkie-server.war/META-INF/MANIFEST.MF.
In the
workitem-homedirectory, execute the following command:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Expand Table 2.1. Parameter descriptions Parameter Description -DarchetypeGroupIdSpecific to the archetype and must remain unchanged.
-DarchetypeArtifactIdSpecific to the archetype and must remain unchanged.
-DarchetypeVersionRed Hat library version that is searched for when Maven attempts to download the
jbpm-workitems-archetypeartifact.-DversionVersion of your specific project. For example,
1.0.0-SNAPSHOT.-DgroupIdMaven group of your specific project. For example,
com.redhat.-DartifactIdMaven ID of your specific project. For example,
myworkitem.-DclassPrefixString added to the beginning of Java classes when Maven generates the classes for easier identification. For example,
MyWorkItem.A
myworkitemfolder is created in theworkitem-homedirectory. For example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Add any Maven dependencies required by the work item handler class to the
pom.xmlfile. To create a deployable JAR for this project, in the parent project folder where the pom.xml file is located, execute the following command:
mvn clean package
$ mvn clean packageCopy to Clipboard Copied! Toggle word wrap Toggle overflow Several files are created in the
target/directory which include the following two main files:Expand Table 2.2. File descriptions Parameter Description myworkitems-<version>.jarUsed for direct deployment to Red Hat Process Automation Manager.
myworkitems-<version>.zipUsed for deployment using a service repository.