Loan approval case for BPEL (1)

Source: Internet
Author: User

Note: This article is free from Section 16.2 of bpel1.1 specifications.

This article discusses an example of a simple loan approval web service. In this example, the customer sends a loan approval request, including the customer's personal email.

Interest and loan amount. The loan approval Web Service uses this information to run a simple process to obtain "loan consent" or "loan rejection"

Result. For loans of less than $10000 and customers with good credit, approval is automated. For customers with high loans and uncertain credit

Users, we need to use the functions provided by the other two web services. The "Risk Assessment Service" is used to query the credit risks of an individual.

The home evaluation service is used to obtain experts' opinions on the project.

1. Service Description
Assuming that xmlns: lNS = "http://loans.org/wsdl/loan-approval" already exists, the service description file is as follows:
<Definitions
Targetnamespace = "http://loans.org/wsdl/loan-approval"
Xmlns = "http://schemas.xmlsoap.org/wsdl"
Xmlns: XSD = "http://www.w3.org/2001/XMLSchema"
Xmlns: plnk = "http://schemas.xmlsoap.org/ws/2003/05/partner-link"
Xmlns: lNS = "http://loans.org/wsdl/loan-approval">

H: credit information message. A message is equivalent to a value object.
<Message name = "creditinformationmessage">
<Part name = "firstname" type = "XSD: string"/>
<Part name = "name" type = "XSD: string"/>
<Part name = "amount" type = "XSD: integer"/>
</Message>
H: Approval message
<Message name = "approvalmessage">
<Part name = "accept" type = "XSD: string"/>
</Message>
H: Risk Assessment message
<Message name = "riskassessmentmessage">
<Part name = "level" type = "XSD: string"/>
</Message>
H: error message
<Message name = "errormessage">
<Part name = "errorcode" type = "XSD: integer"/>
</Message>

H: Understand porttype as our OO method! It specifies the input, output, and error handling.
<Porttype name = "loanservicept">
<Operation name = "request">
<Input message = "lNS: creditinformationmessage"/>
<Output Message = "lNS: approvalmessage"/>
<Fault name = "unabletohandlerequest"
Message = "lNS: errormessage"/>
</Operation>
</Porttype>

<Porttype name = "riskassessmentpt">
<Operation name = "check">
<Input message = "lNS: creditinformationmessage"/>
<Output Message = "lNS: riskassessmentmessage"/>
<Fault name = "loanprocessfault"
Message = "lNS: errormessage"/>
</Operation>
</Porttype>

<Porttype name = "loanapprovalpt">
<Operation name = "approve">
<Input message = "lNS: creditinformationmessage"/>
<Output Message = "lNS: approvalmessage"/>
<Fault name = "loanprocessfault"
Message = "lNS: errormessage"/>
</Operation>
</Porttype>

H: partnerlinktype is used to differentiate roles.
<Plnk: partnerlinktype name = "loanpartnerlinktype">
<Plnk: role name = "loanservice">
<Plnk: porttype name = "lNS: loanservicept"/>
</Plnk: Role>
</Plnk: partnerlinktype>

<Plnk: partnerlinktype name = "loanapprovallinktype">
<Plnk: role name = "approver">
<Plnk: porttype name = "lNS: loanapprovalpt"/>
</Plnk: Role>
</Plnk: partnerlinktype>

<Plnk: partnerlinktype name = "riskassessmentlinktype">
<Plnk: role name = "assessor">
<Plnk: porttype name = "lNS: riskassessmentpt"/>
</Plnk: Role>
</Plnk: partnerlinktype>

</Definitions>

 

 

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.