Example: Query Data Stored in Web Entries

Follow an example that uses the Allow Query String Data setting for Web Entries in Start Event elements.

Overview

Intended audience: Process designers, Web designers, graphic designers, software developers

Tags: Embed Code, Allow Query String Data, Web Entry, Start Event

This example demonstrates how to configure Web Entry in Start Events. Save your query string information in the Request data by using the Allow query string data setting. This use case can be useful when sharing a Web Entry with multiple participating stakeholders: the shared query string data is stored for different countries as this example demonstrates. If you do not want to show the URL information that could result complex to the users, with this use case you can embed the Web Entry in a HTML file.

Follow these guidelines to use the Allow query string data setting for a Web Entry in a Start Event element:

  1. Design a Form-type Screen with two Line Input controls and a Submit Button control.

  2. Use the Variable Name setting values for the Line Input controls as Code and Name respectively as shown below. For this example, exclude the value for the Line Input control that has the Variable Name setting Code.

  3. Design a Process with the following elements:

  4. Assign your created Screen to the Start Event element as Web Entry and the Form Task element.

  5. Configure the Web Entry in the Start Event element as follows:

    1. In the Mode setting, select Anonymous.

    2. In the Screen Associated setting, select a Screen to display for the Web Entry Task.

    3. In the Completed Action setting, select Screen.

    4. In the Screen For Completed setting, select a Screen that displays after the Web Entry Task is submitted.

    5. Select the Allow query string data setting to automatically save your string data information when running a Request. Otherwise, additional information in the URL is not stored.

    6. In the Web Entry URL setting, click Copy to use the URL to start a Request.

    7. Start a Request of this Process.

When starting a Request through this Start Event element using the Allow query string data setting in this example, the Web Entry uses the following URL https://{ServerURL}/webentry/15/node_9?country=usa. {ServerURL} is the name of the ProcessMaker Platform instance. The information after the quotation mark country=usa stores in the Data section as follows:

Below is an example of an HTML file with the embedded code.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Security-Policy" content="frame-ancestors http://{ServerURL}">
    <title>Document</title>
</head>
<body>
    <iframe src="http://{ServerURL}/webentry/15/node_9?country=usa" frameborder="1"></iframe>    
</body>
</html>