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

Validators Sample

Note that WSO2 EI is shipped with the following changes to what is mentioned in this documentation:

  • <PRODUCT_HOME>/repository/samples/ directory that includes all Data Integration samples is changed to <EI_HOME>/samples/data-services/.
  • <PRODUCT_HOME>/repository/samples/resources/ directory that includes all artifacts related to the Data Integration samples is changed to <EI_HOME>/samples/data-services/resources/.

In this sample demonstration, we will use the RDBMS Sample to show how we can validate the input parameters given in a request sent to the service. The "addEmployeeQuery" operation of this service has a length validator for the "lastName" field, where the length of the value should be between 3 and 20. Also, the "email" field is validated using a pattern validator that uses a regular expression to check if it is a real email address.

Follow the steps below to demonstrate this functionality using the TryIt tool:

  1. Ensure that RDBMSSample is deployed as described in Samples Setup.
  2. Log in to the management console of your server and click List under Services in the navigator. The RDBMSSample will be listed here.
  3. Click Try this service to open the TryIt tool.
  4. Select the "addEmployee" operation and enter the following parameter values to the request:
    • employeeNumber: 6001
    • lastName: AB
    • firstName: Nick 
    • email: test@test.com
    • salary: 1500
  5. Click Send to execute the operation. Note that you are not getting any results. A validation error will show as the response because the "addEmployee" operation has failed. This is because the lastName only has 2 characters.
  6. Now, change the lastName and the email address in the request as shown below and execute the operation again.
    • employeeNumber: 6001
    • lastName: ABC
    • firstName: Nick 
    • email: test-test.com
    • salary: 1500
    Note that the operation will fail again because the email address is invalid.
  7. Next, execute the "addEmployee" operation again with parameter values for email address and lastName as shown below:
    • employeeNumber: 6001
    • lastName: ABC 
    • firstName: Nick 
    • email: test@test.com 
    • salary: 1500.

      Note that the entry will be successfully added and you will get a result.
com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links' is unknown.