Debugging the Process with Test Data

To interact in Debug view, you can use the following toolbar. Which icons in the toolbar are enabled at any time depends on the states of the debug models and the debug event notifications from the engine.

The process may be in one of the following states when debugging:

  • "Suspended" means the process is halted by a breakpoint. In this state, you can browse/modify the variables in the Variables view
  • "Active" means the process is running, and the variables will not be listed in the Variables view.
  • "Completed" means the process runs successfully.
  • "Cancelled" means that you terminate the process instance before it finishes.
Note: When debugging the process, you should press "Step Over" or "Step Into" if you want to change the state to "suspended" . If you press "Resume" while debugging a process, the state of the process does not change to "suspended" so you cannot see the variables in the debug window.

Procedure

  1. Load the emulation elements from the emulation file.
    1. From the top right area, select the Testpoints tab and click the button to select the process node from an emulation file.
    2. The Select ProcessNodes dialog appears.
    3. Select demo.invoke from the Projects drop-down list.
    4. Select demo.invoke.em and GetBalance-Process.
    5. Click the OK button.
    6. Notice that the Testpoints view in the top right area displays the predefined testpoint in the demo.invoke process as shown:
  2. Select the Script Task activity.
  3. From the bottom area, select Properties > Emulation.
  4. Notice that the values passed as emulation data (that you defined earlier) are as follows:
    Variable Value
    acctNum TIBCO
    depositAmt 3000
    newBal 5000
  5. Type the following values as input parameters to start GetBalanceProcess:
    Variable Value
    acctNum ABC
    depositAmt 1000
  6. Notice that the GetBalanceProcess process starts in the Debug view.
  7. Notice that the process starts and stops at the first breakpoint after the Catch Message Event activity.
  8. Click the Variables view in the top right area and notice the variable values at the first breakpoint after the Catch Message Event activity:
  9. Select the Script Task activity and select Properties > General to see the formula to calculate the newBal value:

    newBal = 1000.0 + depositAmt

    Click the button on the task bar to execute the next step in the process.

    The Script Task activity starts as shown:

  10. Click the Variables view to see the values.

    The values of variables are still the same at the breakpoint set before the Script Task activity.

  11. Select the Script Task activity and click the Properties tab, notice that Script Task has emulation data with a testpoint that was added at Adding and Editing Emulation Files.

    Click the button to execute the Script Task activity.

  12. The Script Task activity executes and displays the output data as shown:

    Click the button to complete the process with the Reply to Catch Message Event activity.

  13. Notice that the value of the newBal variable remains at 5000, as specified in the emulation data.
  14. Remove the testpoint and emulation data for the Script Task activity as follows:
    1. Select Script Task, right-click and click Testpoint > Remove.
    2. From soapUI, pass the following values as input parameters to start GetBalanceProcess:
      Variable Value
      AcctNum ABC
      depositAmt 1000
    3. Click the button to complete the process up to the End Event activity.
  15. Check the value of the newBal variable.

    The value appears as shown:

    Variable Value
    AcctNum ABC
    depositAmt 1000
    newBal 2000

    Runtime Behavior

    The process stops execution at every breakpoint and allows you to edit values for variables from the Variables view.