Web Request Rule

A Web Request Rule allows you to send an HTTP request to a web service or application connection and process the response.

Use the Request tab to configure the request URI, request method, and appropriate request headers, and content body.

Use the Response tab to configure how to handle the response from the request.

To create a new web request rule:

  1. On the Rules page, select the arrow beside New and select Web request as your rule type.
  2. In the Create Web Request Rule dialog box, specify the Name and Description for your rule.
  3. Select either Web Service Connection or Application Connection.
  4. Select the web service or application connection that you want access.
  5. Click Create.
    1. On the Request tab, craft the content of the request.
      • Append additional parameters as needed to the URI. You can add Laserfiche tokens that can be filled in by a workflow when running the rule.
      • Select from one of the following HTTP request methods:
        • Get
        • Head
        • Post
        • Put
        • Patch
        • Delete
      • Add HTTP request headers as required for the web service endpoint.
      • For Post and Put requests, craft the content body.
      • Use Test Web Request, to test the request works as you expect. The Response tab will display the response of the test.
  6. On the Response tab, configure how to process the returned response. Add tokens that will be used by the processes using the response.
    • If the Test Web Request automated data is unavailable or otherwise unsuitable for the following steps, you may build a manual response by clicking the edit response here link when an HTTP response type is selected. Provide a status message, response header, and response body in standard JSON response format.
    1. Select JSON from the Parse Type menu in the top right corner of the response window.
    2. To add output tokens containing information from the header:
      1. Click the + Add output token to create a new token within the HTTP Headers area.
      2. Provide a token name for use by the process that will receive the data.
      3. Select the header element from the dropdown
    3. To add output tokens containing information from the body of the response:
      1. Click the + Add output token to create a new token within the Response Body area.
      2. Provide a token name for use by the process that will receive the data.
      3. Create a JSONPath expression to retrieve the data desired. If the expression retrieves data from the sample response, a preview of the data will be displayed.

        Note: The parser accepts a standard JSONPath expression that uses dot-notation. For example, $.store.book[0].title

  7. Note: Tokens may contain either single or multi-value return values.

  8. Add a Run Web Request Rule or a Rules Service Task activity to your processes.

Note: Publish the rule to make it available for use in process automation workflows.

 

Content Body Considerations