Using a Cross Process Conversation to Determine the Mortgage Rate
The process conversation mechanism is demonstrated using a mortgage rate calculation scenario that performs the following:
- A user passes the customer's name and credit profile information.
- If the credit profile value of the customer is A, the mortgage lending rate is 3.5 and if the credit profile is B, the lending rate is 2.0.
- Depending on the mortgage lending rate calculated, the lending institution decides either to accept or to reject the application. This particular lender decides to lend money only with the 3.5 mortgage rate. If the calculated rate is lower for any credit profile, the application is rejected by the lender.
Procedure
Result
The CrossProcessConversation.log output file at C:\tmp\CrossProcessConversation is created with the following content:
Received application from BWUser user with credit profile B
Mortgage Cancelled
### DONE
The console displays the following log message:
12:20:42.735 INFO [bwEngThread:In-Memory STWorkProcessor-1] c.t.b.p.g.L.t.b.s.c.c.C.SubmitMortgageAppLog - Received application from BWUser user with credit profile B
12:20:42.779 INFO [bwEngThread:In-Memory STWorkProcessor-4] c.t.b.p.g.L.t.b.s.c.c.C.CancelMortgageAppLog - Mortgage Cancelled
12:20:42.818 INFO [bwEngThread:In-Memory STWorkProcessor-5] c.t.b.p.g.L.t.b.s.c.c.C.Log - DONE
Understanding the Configuration
Operations implemented in the Service Provider process are invoked from the Consumer process. The following processes are implemented:
- The MortgageAppConsumer process invokes different operations implemented in the MortgageServiceProvider process. The SubmitFinDoc or CancelMortgage operation is called, based on the mortgage rate returned by the SubmitMortgageApp operation for a customer.
- The MortgageServiceProvicer process implements the SubmitMortgageApp, SubmitFinDoc, or CancelMortgage operation. The SubmitMortgageApp operation generates and returns the mortgage app id and tentative mortgage rate, based on the customer's credit profile. The SubmitFinDoc operation submits the final mortgage documents. The CancelMortgage operation cancels the mortgage request.
For details about the conversation, select the Conversation tab for each of the following:
- The SubmitMortgageAppOut Reply activity for initiating the conversation.
- The SubmitFinDocIn Receive activity for joining the conversation.
- The onEvent Event Handler for joining the conversation.
A conversation is evaluated to true if the value in Join matches the mortgageAppID generated by the SubmitMortgageApp operation for each mortgage request. This way, the mortgageAppID is used as a key to process a mortgage request for a customer.