Open topic with navigation

TIBCO Business Studio™ - BPM Edition 5.4.0

# Tips for Using TIBCO Business Studio - BPM Edition Forms

You might 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 TIBCO BPM Enterprise Work Manager URL. For example, http://<host>:<port>/work-manager/index.html?log_level=INFO.

You can see the logging messages that show the data provided to the form on TIBCO BPM Enterprise Work Manager, 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 might be some issues in other tasks in the process or in the page-flow.

## Make use of sample data 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,

    {
     "body": {
     "inputs": [.........],
     "outputs": [],
     "inouts": [.........]
     }
    }

2. In TIBCO Business Studio - BPM Edition, create a file in the same folder as the form, giving it a `.data.json` extension. You must use a different name from that of the form, otherwise your custom file might get overwritten by the builder-generated default preview data file. 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 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 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 might 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.

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO Business Studio™ - BPM Edition

Copyright © 2015-2023. Cloud Software Group, Inc. All Rights Reserved.