jBPM Component
Available as of Camel 2.16
The jbpm component provides integration with Business Process Management (BPM) Suit jBPM. It uses kie-remote-client API to interact with jBPM instance over REST. The component supports only producer.
Maven users will need to add the following dependency to their pom.xml
for this component:
<dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-jbpm</artifactId> <version>x.x.x</version><!-- use the same version as your Camel core version --> </dependency>
URI format
jbpm::hostName[:port][/resourceUri][?options]
URI Options
Name | Default Value | Type | Description |
---|---|---|---|
operation | startProcess | String | The operation to perform: Process operations: startProcess, abortProcessInstance, signalEvent, getProcessInstance, getProcessInstances Rule operations: fireAllRules, getFactCount, getGlobal, setGlobal Work Item Operations: abortWorkItem, completeWorkItem Task Operations: activateTask, addTask, claimNextAvailableTask, claimTask, completeTask, delegateTask, exitTask, failTask, getAttachment, getContent, getTasksAssignedAsBusinessAdministrator, getTasksAssignedAsPotentialOwnerByStatus, getTaskByWorkItem, getTaskBy, getTaskContent, getTasksByProcessInstance, getTasksByStatusByProcessInstance, getTasksOwned, nominateTask, releaseTask, resumeTask, skipTask, startTask, stopTask, suspendTask |
value | null | Object | the value to assign to the global identifier |
processId | null | String | the id of the process that should be acted upon |
parameters | null | Map<String, Object> | the variables that should be set for various operations |
processInstanceId | 0 | Long | the id of the process instance |
eventType | null | String | the type of event to use when signalEvent operation is performed |
event | null | String | the data associated with this event when signalEvent operation is performed |
maxNumber | null | Integer | the maximum number of rules that should be fired |
identifier | null | String | identifier the global identifier |
workItemId | 0 | Long | the id of the work item |
taskId | 0 | Long | the id of the task |
userId | null | String | userId to use with task operations |
language | null | String | The language to use when filtering user tasks |
targetUserId | null | String | The targetUserId used when delegating a task |
attachmentId | 0 | Long | attachId to use when retrieving attachments |
contentId | 0 | Long | contentId to use when retrieving attachments |
task | null | Task | The task instance to use with task operations |
entities | null | List<OrganizationalEntity> | The potentialOwners when nominateTask operation is performed |
statuses | null | List<Status> | The list of status to use when filtering tasks |
Message Headers
Name | Default Value | Type | Description |
---|---|---|---|
CamelJBPMValue | null | Object | the value to assign to the global identifier |
CamelJBPMOperation | PUT | String | The operation to perform. The operation name must be prefixed with CamelJBPMOperation and the name of the operation. See the full list above. It is case insensitive. |
CamelJBPMProcessId | null | String | the id of the process that should be acted upon |
CamelJBPMProcessInstanceId | 0 | Long | the id of the process instance |
CamelJBPMParameters | null | Map<String, Object> | the variables that should be set for various operations |
CamelJBPMEventType | null | String | the type of event to use when signalEvent operation is performed |
CamelJBPMEvent | null | String | The type of the received event. Possible values defined here org.infinispan.notifications.cachelistener.event.Event.Type |
CamelJBPMMaxNumber | null | Integer | the maximum number of rules that should be fired |
CamelJBPMIdentifier | null | long | identifier the global identifier |
CamelJBPMWorkItemId | 0 | Long | the id of the work item |
CamelJBPMTaskId | 0 | Long | the id of the task |
CamelJBPMTask | null | Task | The task instance to use with task operations |
CamelJBPMUserId | null | String | userId to use with task operations |
CamelJBPMTargetUserId | null | String | The targetUserId used when delegating a task |
CamelJBPMLanguage | null | String | The language to use when filtering user tasks |
CamelJBPMAttachmentId | 0 | Long | attachId to use when retrieving attachments |
CamelJBPMContentId | 0 | Long | contentId to use when retrieving attachments |
CamelJBPMEntityList | null | List<OrganizationalEntity> | The potentialOwners when nominateTask operation is performed |
CamelJBPMStatusList | null | List<Status> | The list of status to use when filtering tasks |
Example
Below is an example route that starts a business process with id project1.integration-test and deploymentId org.kie.example:project1:1.0.0-SNAPSHOT
from("direct:start") .setHeader(JBPMConstants.PROCESS_ID, constant("project1.integration-test")) .to("jbpm:http://localhost:8080/business-central?userName=bpmsAdmin&password=pa$word1" + "&deploymentId=org.kie.example:project1:1.0.0-SNAPSHOT");