Debug a form

You can debug a form, including capture forms (Scan create new job, Scan, Document review, Validation, and Verification).

See Form debugging.

The Debug option is not available for Document and Folder forms.

To debug a form, perform the following steps.

  1. Launch a form in a debug mode

  2. Set breakpoints

  3. View action inputs/outputs

Launch a form in a debug mode

When you launch a form in debug mode, the primary form is loaded as per the runtime behavior.

  1. Navigate to User interface > Forms.

    A list of forms is displayed.

  2. On the context menu of the form to debug, click Debug.

    Alternatively, click Debug on the form Action bar.

    The form opens in the debug mode in a new browser window. The Form initialization pop-up appears. A list of form and global variables set as initialization variables in the form appears. A dropdown (if available) only shows the selected value and not all possible values.

    Form initialization

  3. You can add a breakpoint to any action, such as .Net action with a button click event. To add a breakpoint on form load, select Pause before executing form loaded event actions.
  4. Update the values of the initialization data.
  5. Click OK.

    At runtime, when you click the Request Automation Rule button on an activity form, a Request Automation Rule pop-up window appears that displays the name of the process or case that the activity belongs to, the name of the activity, and the Details text box where you can enter the description of the automation. When you click OK, a process note is added to the process in the following format: Automation Request: description for NodeID x, EPC y.

Set breakpoints

A breakpoint is an intentional stop or pause in a program and is used for debugging purposes. It is also sometimes referred to as a "pause". For example, you can set an event at a breakpoint on a form. You cannot set breakpoints on the "Before render" and "After render" form events or on "Begin condition", "Else condition", and "End condition" actions.

  1. In the Debug window, click for Breakpoints.

    The Breakpoint dialog box is displayed. A tree of the form with all corresponding controls, events, and actions associated with each, is displayed as shown below.

    • Form

      • Events

        • Configured Action 1

        • Configured Action 2

    • Control 1

      • Events

        • Configured Action 1

        • Configured Action 2

    • Control 2

      • Events

      You cannot debug any action configured in Before render and After render events. You can debug only actions in Form Load event.

  2. Add the breakpoints.

    The selected breakpoints are added to the Selected items list.

  3. Click Done.
  4. To skip an action within a form execution, click for Actions to skip.

    The Form action dialog box is displayed.

  5. Add the actions.

    The selected actions are added to the Selected items list.

  6. Click Done.

    The status of the actions is updated to "skipped" in the stack trace.

    When you load and debug the form for the first time and select "Pause before executing form loaded event actions", the first action cannot be skipped. You must restart debugging and then add actions to skip.

    Panel Description
    1

    Form

    The controls of the current form appear in this panel.

    2

    Variable values

    Lists the form and global variables, and form controls.

    You can view and update the variables and controls in this panel. You can also view the controls which are in a hidden state.

    3

    Stacktrace

    Lists the actions in the order of execution.

    4

    Breakpoints

    Lists the events for which you have set the breakpoints.

  7. Once a breakpoint is set, you can invoke the events on the form load.
    • To invoke any breakpoints on the "On load" event of the form, refresh the main page.

    • To invoke an event on a control, interact with the form itself. For example, click a button or select a row within the table.

    Once the event is invoked, the Stacktrace panel displays the following actions. The status of the actions is updated as they are executed until it reaches the first breakpoint. You can choose to continue execution or step over an action.

    1

    Continue

    Continues execution to the next enabled breakpoint.

    2

    Step over

    Executes current action and stops at the next action in order.

    3

    Skip

    Skips the selected action while debugging and the status is updated to skipped. See the example below.

    4

    Clear

    Clears the stack trace panel.

    5

    Stacktrace

    The list of actions for execution.

    Skip an action - Example

    1. Set a breakpoint on an action (SamePage1).

    2. In the Debugging panel, click the control (button1) on which the SamePage1 action is set.

      The status of the SamePage1 action is updated to pause indicating that a breakpoint is set.

    3. To skip this action, click Skip in the stack trace panel.

      The status is updated from pause to skipped indicating that the action is not executed and pauses at the next action if applicable.

    Using Conditions while debugging

    You can determine the path that was taken when using conditions in debug mode. When you configure your form to have a Begin condition and an Else condition, these are displayed in the stack trace so that you can determine where the logic was executed.

    You can have a Begin condition within a Begin condition for nested logic.

    When you click on the Begin condition, you can view the outcome whether it is true or false. For example, in the following scenario, the outcome of BeginCondition1 is false and the outcome of BeginCondition2 is true.

    Form debug condition

View action inputs, outputs, input, response, and info

When you reach a breakpoint, you can expand any server-side action such as .Net action, and view and update the values of controls form, and global variables, and continue execution.

You can expand a Table control to see all rows and columns.

A Redirect action does not redirect but when executed displays a message stating where it would have redirected to.

The following is displayed for the info when you debug a form that has a RESTful service action: Request URL, request headers, request body, and response body.

When you debug a form and view the information for a completed Generative AI action, you can view the input and response so that you can determine if the response is correct.

When you map a form control to hold the response of an input, but the mapped variable or control is not valid, the response is not returned from AI provider and the return data is not displayed on the Outputs tab.

To update the value (for example, to update the value of a form variable), perform the following steps.

  1. Click the Form variables tab.
  2. Select the variable and click Edit.
  3. Change the value as needed and click OK.
    You can update global variables and form controls in a similar manner. However, you cannot update array form variables and advanced form controls.