Tips for Using TIBCO Business Studio Forms

You may benefit from a few tips.

If possible, reproduce problems in Forms Preview

It is much quicker to track down problems if an issue can be reproduced within the Forms preview. Alter the logging level in the preview from Window > Preferences > Form Designer > Preview.

Determine source of data integrity issues

For any issues with the initial data being displayed in a form, you can use the runtime logging to see the data being received by the form and the data being submitted. To see this, enable INFO level logging by adding the query parameter log_level=INFO to the Openspace or Workspace URL. For example, http://<host>:<port>/openspace/openspace.html?log_level=INFO.

You can see the logging messages that show the data provided to the form on Openspace, and the data submitted back to the server side. This helps in tracking down issues where you see unexpected results in subsequent steps. If the data coming into and out of a form is correct, then there may be some issues in other tasks in the process or in the page-flow.

Make use of sample data in TIBCO Business Studio to reproduce problems at runtime

You can use the INFO logging to capture actual runtime input data in order to reproduce problems within Forms preview.

You can follow these steps:

  1. From the logging window, copy the incoming data from the log message. For example, {items:[ . . . . . . . . ]}
  2. In TIBCO Business Studio, create a file in the same folder as the form, giving it a .data.json extension. For example, myCustomData.data.json
  3. On the Preview Data property sheet of the form, select Custom, and select the newly created file from the drop-down list.

Now when you preview the form, this data is used as the initial data for the form. With this setting, you can reproduce and troubleshoot data-specific issues within TIBCO Business Studio without having to re-deploy the projects.

Use logging within form actions

You can access an instance of a logger class using context.form.logger. There are methods for logging at TRACE, DEBUG, INFO, WARN, and ERROR levels. For example, logger.debug("My debug message").

Temporarily disable actions and rules

If you suspect a problem in your action script, you can disable the rules and actions using the TIBCO Business Studio UI. It can help in tracking down the problem action.

Check for null objects and values

Problems often arise in scripts that are accessing values before they have been initialized.

Make sure the Form parameter interface is in sync with the User Task

Sometimes the reference from the form to the user task is lost, in which case the validation framework may not report a synchronization issue. This can happen if you are using the same form for multiple user tasks (not generally recommended), or have refactored or moved resources within or between projects.