Este conteúdo não está disponível no idioma selecionado.

9.4. Instantiating a Deployment


  1. 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>
    
  2. 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 esbToBpmVars mapping.
    In the bpm_orchestration4 quick start, the XML came from the Seam DVD Store and the SampleOrder.xml looks 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.

Red Hat logoGithubredditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar. Explore nossas atualizações recentes.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja o Blog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

Theme

© 2026 Red Hat
Voltar ao topo