Testing a ruleset for REST execution

From the Rule Execution Server console, you test REST API requests for execution of a ruleset in XML or in JSON format.

Before you begin

Restriction: Generation of OpenAPI description files is supported for only Java™ XOMs, while WSDL and WADL file generation are supported for XML XOMs and Java XOMs with JAXB annotations.

About this task

Before you execute a ruleset in XML or in JSON form from a client, you can test your execution request in the Rule Execution Server console.
Tip: You can also test the execution of a ruleset without generating it as a hosted transparent decision service.

Procedure

  1. Select a ruleset and open the ruleset view.
  2. Expand the Hosted Transparent Decision Services (HTDS) Options. Click Retrieve HTDS description file.
  3. Select REST in the Service protocol type section.
  4. Select WADL, YAML, or JSON from the Format pull-down menu as explained in Viewing or downloading an HTDS description file.
    Remember: You can select YAML and JSON only for Java XOMs.
  5. Click Test.
    The execution request is displayed in a separate browser window.

    If you selected WADL in the previous step, you can choose XML or JSON for Java XOMs as an execution format from the Execution Request selector. For XML XOMs, XML is the only available execution format.

    If you selected OpenAPI, JSON is the only available execution format.

    Tip: If you are not using the XML format, you can use the Swagger UI tool instead of the ruleset testing page, as Swagger UI allows you to edit and send requests as well. To do so, instead of clicking Test in Step 5, click Swagger UI.
  6. Click Execute Request.
    The response is displayed in the Server Response section. If you selected Decision trace information before you click Test, the trace filter is added to the request and the decision trace is included in the response.
  7. Optional: If you selected XML as an execution format, click the Validate XML button to validate the generated XML code.
    If the request is invalid, error messages indicate the reason and location of each error. Visual indicators highlight the incorrect lines in the request.
    Note: The JSON format does not support validation.