This documentation is for WSO2 Enterprise Integrator version 6.0.0 . View documentation for the latest release in the 6.x.x family and the latest release in the 7.x.x family.

All docs This doc

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Tip

Before you begin,

  1. Install Oracle Java SE Development Kit (JDK) version 1.8.* and set the JAVA_HOME environment variable.
  2. Download the WSO2 EI ZIP file from here, and then extract the ZIP file. 
    The path to this folder will be referred to as <EI_HOME> through out this tutorial.
  3. Select and download the relevant EI tooling ZIP file based on your operating system from here and then extract the ZIP file.
    The path to this folder will be referred to as <EI_TOOLING> through out this tutorial.
    For more detailed installation instructions, see the Installing Enterprise Integrator Tooling.
  4. Open the ESB Tooling environment and click File -> Import. Then, select Existing WSO2 Projects into workspace under the WSO2 category, click Next and upload the extracted pre-packaged C-App projectApp project. This C-App contains the configurations of the previous tutorial so that you do not have to repeat those steps.

...

  1. Add a Property Mediator just before the Call mediator to retrieve and store the patient's email address. 

    With the Property mediator selected, access the Properties tab of the mediator and fill in the information in the following table:

    FieldValue
    Property NameSelect New Property
    New Property Nameemail_id
    Propety ActionSelect Set
    Value TypeSelect Expression
    Value Expressionjson-eval($.patient.email)
    DescriptionGet Email Id
  2. Add another Property mediator just after the Log mediator to retrieve and store the response sent from SettlePaymentEP. This will be used within the body of the email.

    With the Property mediator selected, access the Properties tab and fill in the information in the following table:

    FieldValue
    Property NameSelect New Property
    New Property Namepayment_response
    Property ActionSelect Set
    Value TypeSelect Expression
    Value Expressionjson-eval($.)
    DescriptionGet Payment Response
  3. Drag and drop the init method from the Gmail Connector palette adjoining the Property mediator you added in the previous step.


    With the init method selected, access the Properties tab and fill in the information in the following table:

    FieldValue
    Parameter Editor TypeSelect inline
    userIdThe sender's email address
    accessTokenThe access token you obtained
    apiUrl https://www.googleapis.com/gmail
    clientIdThe client ID you created.
    clientSecretThe client secret you created.
    refreshTokenThe refresh token you obtained.
  4. Add the sendMail method from the Gmail Conector palette and access the Properties tab and fill in the information in the following table:

    FieldValueDescription
    Parameter Editor TypeSelect inline
     

    to{$ctx:email_id}Retreives the patient email address that was stored in the relevant Property mediator.
    subjectPayment StatusThe subject line in the email that is sent out.
    messageBody{$ctx:payment_response}Retreives the payment response that was stored in the relevant Property mediator.


    The updated PaymentRequestProcessingSequence should now look like this:

  5. Save the updated sequence configuration.
  6. Right click on SampleServicesConnectorExporter and navigate to New -> Add/Remove Connectors and select Add connector and click on Next. Select Workspace to list down the connectors that were added.


    Select the Gmail connector from the list and click OK and then Finish.

...