13.4.3. jBPM BpmProcessor

Input Type org.jboss.soa.esb.message.Message generated by AbstractCommandVehicle.toCommandMessage()
Output Type Message – same as the input message
Class org.jboss.soa.esb.services.jbpm.actions.BpmProcessor
The JBoss Enterprise SOA Platform can make calls into the jBPM using the BpmProcessor action. The BpmProcessor action uses the jBPM command API to make calls into jBPM.
The following jBPM commands have been implemented:
  • NewProcessInstanceCommand
  • StartProcessCommand
  • CancelProcessInstanceCommand
  • GetProcessInstanceVariablesCommand

Table 13.11. BpmProcessor Properties

Property Description Required
command
The jBPM command being invoked. Required Allowable values:
  • NewProcessInstanceCommand
  • StartProcessInstanceCommand
  • SignalCommand
  • CancelProcessInstanceCommand
Yes
processdefinition
Required property for the New- and Start-ProcessInstanceCommands if the process-definition-id property is not used. The value of this property should reference a process definition that is already deployed to jBPM and of which you want to create a new instance. This property does not apply to the Signal- and CancelProcessInstance-Commands.
Depends
process-definition-id
Required property for the New- and Start-ProcessInstanceCommands if the processdefinition property is not used. The value of this property should reference a processdefintion id in jBPM of which you want to create a new instance. This property does not apply to the Signal- and CancelProcessInstance commands.
Depends
actor
Optional property to specify the jBPM actor id, which applies to the New- and StartProcessInstanceCommands only.
No
key
Optional property to specify the value of the jBPM key. For example one can pass a unique invoice id as the value for this key. On the jBPM side this key is as the “business” key id field. The key is a string based business key property on the process instance. The combination of business key and process definition must be unique if a business key is supplied. The key value can hold an MVEL expression to extract the desired value from the EsbMessage. For example if you have a named parameter called “businessKey” in the body of your message you would use “body.businessKey”. Note that this property is used for the New- and StartProcessInstanceCommands only
No
transition-name
Optional property. This property only applies to the StartProcessInstance- and Signal Commands, and is of use only if there are more then one transition out of the current node. If this property is not specified, the default transition out of the node is taken. The default transition is the first transition in the list of transition defined for that node in the jBPM processdefinition.xml.
No
esbToBpmVars
Optional property for the New- and StartProcessInstanceCommands and the SignalCommand. This property defines a list of variables that need to be extracted from the EsbMessage and set into jBPM context for the particular process instance. The list consists of mapping elements. Each mapping element can have the following attributes:
esb
required attribute which can contain an MVEL expression to extract a value anywhere from the message.
bpm
optional attribute containing the name which be used on the jBPM side. If omitted the esb name is used.
default
optional attribute which can hold a default value if the esb MVEL expression does not find a value set in the EsbMessage.
No