com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.

Step 1 - Creating the Synchronous Processes

A Synchronous Process is a process, which would wait until a response is received from an external party before proceeding to the next step.  Following are the Synchronous Processes of this loan approval scenario.

  • Getting client history data
  • Calculating the credit rating

Let's get started! Follow the instructions in the below sections to create the Synchronous Processes with the following artifacts.

Defining the types of the request and response

Now, you need to define the type (schema) of the initial request and the final response that the BankLoanProcess BPEL process requires. 

  1. Open WSO2 EI Tooling.
  2. In the Project Explorer of WSO2 EI Tooling, double click on the BankLoanProcessArtifacts.wsdl file to get the Design view. 
  3. Click  BankLoanProcessRequest in the BankLoanProcess box 
     
  4. In the General section of the   Properties  tab, click the  Element  drop down field and click  Browse  .

     

  5. Select  Enclosing Project  to display the schema types including those that are listed in the loan.xsd file, select  LoanRequest   under Elements as the input of the BPEL process, and click OK.

     

  6. Click   BankLoanProcessResponse in the BankLoanProcess box

  7. In the General section of the   Properties   tab, click the   Element   drop down field and click   Browse .

  8. Select  Enclosing Project   to display the schema types including those that are listed in the loan.xsd file, select  LoanOffer   under Elements as the output of the BPEL process, and click OK.

    You view the defined output as shown below.

  9. Right click on the small connecting box of the diagram, click  Generate Binding Content

     

  10. Select SOAP in the  Protocol  field and click Finish. 

     

  11. Press Ctrl+S to save your artifacts.

Configuring the receiveInput element

Follow the steps below to create the synchronous BPEL process.

  1. In the Project Explorer of WSO2 EI Tooling, double click on the BankLoanProcess.bpel file to get the Design view. 
  2. Click on the  receiveInput element, which is available by default.
  1. Select the default client as the Partner Link in the Details section of the Properties tab.

    This creates the first step of the business process flow to receive the loan request from the client.

     

Adding the Operation

  1. Select process as the Operation in the Details  section of the Properties tab.


  2. Double click process in the Quick Pick section to generate the input and output variables for this element.


Configuring the InvokingCustomerInfo element

  1. Right click on the FIX_ME-Add_Business_Logic_Here  element, click Insert Before, and then click Invoke.

    This creates the element to invoke the CustomerInfo partner service.


     

  2. Click on the Invoke element you added.
  3. Enter InvokingCustomerInfo as the value of the   Name   field in the Description section of the Properties tab. 
     
  1. Click on the InvokingCustomerInfo element, click the drop down arrow of Partner Link and select Create Global Partner Link. in the Details section of the Properties tab.

    This adds a partner link to invoke this external service.

     

  2. Enter CustomerPL as the Partner Link Name and click OK.

  3. Select  From Project as the type of the Partner Link, select  CustomerInfo in the  Matches field and click  OK . 
  4. Click OK in the message, which pops up next to set the prefix of the namespace.

Adding the Operation

  1. Keep your cursor on the  Operation  field and double-click on  getCustomerSSN

  2. Double click  getCustomerSSN  in the  Quick Pick  section to generate the input and output variables for this element.

    This will auto update the input/output of the Invoke step and creates the following variables.



  3. Press Ctrl+S to save your artifacts.

Configuring the Assign element

You need to have the input data provided by the client from the receiveInput element to use the   InvokingCustomerInfo element.  Therefore, you need to add an Assign element right before the   InvokingCustomerInfo   element to apply this input data to the  CustomerPLRequest of the    InvokingCustomerInfo   element .

  1. Right click on the InvokingCustomerInfo  element, click   Insert Before, and then click Assign . 
     

Mapping the variables

  1. Click on the Assign element and click New in the Details section of the Properties tab .

  2. In the From box, expand the input :   BankLoanProcessRequestMessage and select CustomerInfo : CustomerInfoType. 
     
  3. In the  To  box, expand the  CustomerPLRequest :   getCustomerSSNRequest and select part: CustomerInfo
     
  4. Press Ctrl+S to save your artifacts.
  5. Click Yes in the message, which pops up to initialize the variables. 
     
  6. Follow the steps below to match the other variables.

    This creates variable to variable options to map each part of the CustomerInfo input (CustomerInfo:CustomerInfoType) to the corresponding part of CustomerPLRequest (part:CustomerInfo).

    1. Click New and select BankLoanProcessRequestMessage → CustomerInfo : CustomerInfoType →  Name : string  in the From  box and select CustomerPLRequest :   getCustomerSSNRequest → part:   CustomerInfo → Name : string  in the To  box.
       
    2. Press Ctrl+S to save the artifacts.
    3. Click New and select BankLoanProcessRequestMessage → CustomerInfo : CustomerInfoType →  Email : string  in the From box and select CustomerPLRequest :    getCustomerSSNRequest → part:   CustomerInfo → Email : string  in the  To  box.
       
    4. Press Ctrl+S to save the artifacts.
    5. Click New and select BankLoanProcessRequestMessage → CustomerInfo : CustomerInfoType →  CustomerID : CustomerIDType  in the From box and select CustomerPLRequest :    getCustomerSSNRequest → part:   CustomerInfo → CustomerID : CustomerIDType   in the  To  box.
       
    6. Press Ctrl+S to save the artifacts.
    7. Click New and select BankLoanProcessRequestMessage → CustomerInfo : CustomerInfoType →  CreditRating : int  in the From box and select CustomerPLRequest :    getCustomerSSNRequest → part:   CustomerInfo → CreditRating : int   in the  To  box. 
       
  7. Press Ctrl+S to save the artifacts.

Configuring the InvokeCreditRating  element

  1. Right click on the FIX_ME-Add_Business_Logic_Here   element, click  Insert Before, and then click Invoke.

  2. Click on the Invoke element you added.
  3. Enter  InvokeCreditRating  as the value of the Name  field in the Description section of the Properties tab. 

Adding the Partner Link

  1. Click on the InvokeCreditRating  element, click the drop down arrow of Partner Link and select Create Global Partner Link. in the Details section of the Properties tab.

    This creates a new Partner Link for the BPEL process to connect to the CreditRatingService.



  2. Enter  CreditPL  as the Partner Link Name and click OK.

  3. Select From Project as the type of the Partner Link, select CreditRating in the Matches field and click OK. 


  4. Click OK in the message, which pops up next to set the prefix of the namesapce.

Adding the Operation

  1. Keep your cursor on the  Operation field and double-click on getCreditRating

  2. Double click  getCreditRating  in the  Quick Pick  section to generate the input and output variables for this element.

    This will auto update the input/output of the Invoke step and creates the following variables.



  3. PressCtrl+S to save your artifacts.

Configuring the Assign1 element

You need to map the required data received from the CustomerInfo service to the InvokeCreditRatingRequest similar to the mapping you did before. Follow the steps below to do this.

  1. Right click on the InvokeCreditRating element, click Insert Before and click Assign, to add the Assign1 element.
  2. Right click on the FIX_ME-Add_Business_Logic_Here element and click Delete to remove it as it is a dummy element.

Mapping the variables

  1. Click on the Assign1 element and click New in the Details section of the Properties tab.

  2. In the From box, expand the  CustomerPLResponse :  getCustomerSSNResponse and select part : CustomerSSN
     
  3. In the  To  box, expand the CreditPLRequest :   getCreditRatingRequest and select part : CustomerSSN.  
     
  4. Press Ctrl+S to save your artifacts.
  5. Click Yes in the message, which pops up to initialize the variables.  

  6. Click on the Assign1 element and click New in the Details section of the Properties tab .

  7. In the From box, expand the CustomerPLResponse :   getCustomerSSNResponse → part : CustomerSSN and select SSN : string.
     
  8. In the  To  box, expand the  CreditPLRequest :    getCreditRatingRequest →  part : CustomerSSN  and select SSN : string.

     
  9. Press Ctrl+S to save your artifacts.
    Now, your BPEL artifacts will be as shown below.


Next, let's create the artifacts of the Asynchronous Processes next. For instructions, see Step 2 - Creating the Asynchronous Process.

com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links' is unknown.