此内容没有您所选择的语言版本。

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

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部