Process is the method call with its own pagedef. In the router I check the return status attribute so it knows to return the taskflow with a succes or abort.
To call the bpel web service I use an ADF web service datacontrol. This generates a datacontrol see picture below.Now we can drag the process method of the creditcheck datacontrol to the taskflow. We get the following wizard where we can define the values of the input variables.
It generates the following pagedef.
MethodName="process" IsViewObjectMethod="false"
DataControl="CreditCheck" InstanceName="CreditCheck"
ReturnName="CreditCheck.methodResults.process_CreditCheck_process_result">
NDValue="${data.items_trainPageDef.CustomerId.inputValue}"
NDType="java.lang.Integer"/>
NDValue="${data.items_trainPageDef.OrderId.inputValue}"
NDType="java.lang.Integer"/>
NDValue="${data.items_trainPageDef.OrderTotal.inputValue}"
NDType="java.lang.Float"/>
The return = CreditCheck.methodResults.process_CreditCheck_process_result. To evaluate the status we must add a methoditerator on the result. We do this in the pagedef.




version="11.1.1.47.96"
id="WEB_INF_order_task_flow_definition_order_task_flow_definition_process"
Package="nl.ordina.order.view.pageDefs">
RangeSize="25"
BeanClass="nl.ordina.order.view.CreditCheck.process"
id="processIterator"/>
RangeSize="25" DataControl="CreditCheck"
BeanClass="nl.ordina.order.view.CreditCheck.process_Result"
id="process_ResultIterator"/>
MethodName="process" IsViewObjectMethod="false"
DataControl="CreditCheck" InstanceName="CreditCheck"
ReturnName="CreditCheck.methodResults.process_CreditCheck_process_result">
NDValue="${data.items_trainPageDef.CustomerId.inputValue}"
NDType="java.lang.Integer"/>
NDValue="${data.items_trainPageDef.OrderId.inputValue}"
NDType="java.lang.Integer"/>
NDValue="${data.items_trainPageDef.OrderTotal.inputValue}"
NDType="java.lang.Float"/>
Now we can use the status attributevalue in the router. If status is true then the outcome is succes else the default outcome is used ( abort)

No comments:
Post a Comment