Show Table of Contents
9.4. Instantiating a Deployment
- Create a new process instance once the process definition is deployed. (Note that you can use the
StartProcessInstanceCommand. This command allows you to create a process instance with some pre-set initial values.)<service category="BPM_orchestration4_Starter_Service" name="Starter_Service" description="BPM Orchestration Sample 4: Use this service to start a process instance"> <listeners> </listeners> <actions> <action name="setup_key" class= "org.jboss.soa.esb.actions.scripting.GroovyActionProcessor"> <property name="script" value="/scripts/setup_key.groovy" /> </action> <action name="start_a_new_order_process" class= "org.jboss.soa.esb.services.jbpm.actions.BpmProcessor"> <property name="command" value="StartProcessInstanceCommand" /> <property name="process-definition-name" value="bpm4_ESBOrderProcess" /> <property name="key" value="body.businessKey" /> <property name="esbToBpmVars"> <mapping esb="BODY_CONTENT" bpm="entireOrderAsXML" /> </property> </action> </actions> </service>
- The new process instance is now invoked and using a script. The jBPM key is set to the value of the OrderId by an incoming order XML file.This same XML is subsequently put into a jBPM context, through use of the
esbToBpmVarsmapping.In thebpm_orchestration4quick start, the XML came from theSeam DVD Storeand theSampleOrder.xmllooks like this:<Order orderId="2" orderDate="Wed Nov 15 13:45:28 EST 2006" statusCode="0" netAmount="59.97" totalAmount="64.92" tax="4.95"> <Customer userName="user1" firstName="Rex" lastName="Myers" state="SD"/> <OrderLines> <OrderLine position="1" quantity="1"> <Product productId="364" title="Gandhi" price="29.98"/> </OrderLine> <OrderLine position="2" quantity="1"> <Product productId="299" title="Lost Horizon" price="29.99"/> </OrderLine> </OrderLines> </Order>
Note
Enterprise Service Bus and JBoss Business Process Manager deployments are what is known as "hot."The jBPM has a special feature that results in process deployments being "versioned". Newly created process instances will use the latest version, while existing ones will run to their conclusion using the process deployment they were started on.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.