Loan approval case for BPEL (2)

Source: Internet
Author: User

Loan approval case for BPEL (2)

We copy the business process definition of this example below for instructions:
<Process name = "loanapprovalprocess"
Targetnamespace = "http://acme.com/loanprocessing"
Xmlns = "http://schemas.xmlsoap.org/ws/2003/03/business-process"
Xmlns: lNS = "http://loans.org/wsdl/loan-approval"
Suppressjoinfailure = "yes">

<Partnerlinks>
<Partnerlink name = "customer"
Partnerlinktype = "lNS: loanpartnerlinktype"
Myrole = "loanservice"/>
<Partnerlink name = "approver"
Partnerlinktype = "lNS: loanapprovallinktype"
Partnerrole = "approver"/>
<Partnerlink name = "assessor"
Partnerlinktype = "lNS: riskassessmentlinktype"
Partnerrole = "assessor"/>
</Partnerlinks>

<Variables>
<Variable name = "request"
Messagetype = "lNS: creditinformationmessage"/>
<Variable name = "risk"
Messagetype = "lNS: riskassessmentmessage"/>
<Variable name = "approval"
Messagetype = "lNS: approvalmessage"/>
<Variable name = "error"
Messagetype = "lNS: errormessage"/>
</Variables>

<Faulthandlers>
<Catch faultname = "lNS: loanprocessfault"
Faultvariable = "error">
<Reply partnerlink = "customer"
Porttype = "lNS: loanservicept"
Operation = "request"
Variable = "error"
Faultname = "unabletohandlerequest"/>
</Catch>
</Faulthandlers>

<Flow>
H: <flow> indicates that a set of steps should be executed in parallel. In a group of activities that are executed in parallel, you can use links to specify constraints on the execution sequence.

<Links>
<Link name = "receive-to-assess"/>
<Link name = "receive-to-approval"/>
<Link name = "Approval-to-reply"/>
<Link name = "assess-to-setmessage"/>
<Link name = "setmessage-to-reply"/>
<Link name = "assess-to-approval"/>
</Links>
H: each step of the process is called an activity. There are some basic activities:
H: receive waits for a message to respond to the operation of a service interface called by someone from outside
<Receive partnerlink = "customer"
Porttype = "lNS: loanservicept"
Operation = "request"
Variable = "request" createinstance = "yes">
H: Transfer and conditions
<Source linkname = "receive-to-assess"
Transitioncondition =
"Bpws: getvariabledata ('request', 'amount') <10000"/>
<Source linkname = "receive-to-approval"
Transitioncondition =
"Bpws: getvariabledata ('request', 'amount')> = 10000"/>
</Receive>
H: invoke calls operations on a Web Service
<Invoke partnerlink = "assessor"
Porttype = "lNS: riskassessmentpt"
Operation = "check"
Inputvariable = "request"
Outputvariable = "risk">
<Target linkname = "receive-to-assess"/>
<Source linkname = "assess-to-setmessage"
Transitioncondition =
"Bpws: getvariabledata ('risk', 'level') = 'low'"/>
<Source linkname = "assess-to-approval"
Transitioncondition =
"Bpws: getvariabledata ('risk', 'level ')! = 'Low' "/>
</Invoke>
H: Assign copies data from one place to another
<Assign>
<Target linkname = "assess-to-setmessage"/>
<Source linkname = "setmessage-to-reply"/>
<Copy>
<From expression = "'Yes'"/>
<To variable = "approval" part = "accept"/>
</Copy>
</Assign>
H: invoke calls operations on a Web Service
<Invoke partnerlink = "approver"
Porttype = "lNS: loanapprovalpt"
Operation = "approve"
Inputvariable = "request"
Outputvariable = "approval">
<Target linkname = "receive-to-approval"/>
<Target linkname = "assess-to-approval"/>
<Source linkname = "Approval-to-reply"/>
</Invoke>
H: reply to generate input/output operation responses
<Reply partnerlink = "customer"
Porttype = "lNS: loanservicept"
Operation = "request"
Variable = "approval">
<Target linkname = "setmessage-to-reply"/>
<Target linkname = "Approval-to-reply"/>
</Reply>
</Flow>

</Process>

 

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.