Defining Custom Actions for Buttons

In most cases, buttons on a form are configured with one of the pre-defined actions provided in TIBCO Forms. The left-most button on the Interview Witness form, for example, was created automatically when the form was generated. This button is configured with the standard rule Cancel that invokes the system action Cancel when the Cancel button is selected.

However, the Interview Witness form also contains three custom buttons to control the flow of the business process:

  • If the button labeled Failed - Try Again is clicked, the flow returns once again to the Interview Witness user task so that another attempt will be made to contact the witness.
  • The button labeled Failed - Do Not Try Again sends the process to its end event.
  • The button labeled Completed sends the process to its end event.

The table Custom Buttons shows three custom buttons and the action associated with the event Select - when the control is clicked or otherwise selected.

Custom Buttons
Button Label Custom Action Name Description of Functionality
Failed - Try Again
failed_try_again
This action sets the witness_stat variable to a value of TRY_AGAIN, and then invokes the standard submit action that is defined by the system.
Failed - Do Not Try Again
failed_dont_try_again
This action sets the witness_stat variable to a value of FAIL, and then invokes the standard submit action that is defined by the system.
Completed
success
This action sets the witness_stat variable to a value of SUCCESS, and then invokes the standard submit action that is defined by the system.

The action defined for each of the three custom buttons invokes the standard Submit action that is defined by the system. Before doing so, each action defines the witness status by setting the value of the WitStatus control, which is used in the logic of the Contact Witness Again gateway to determine the flow of the business process. A value of TRY_AGAIN restarts the Interview Witness user task. A value of FAIL or SUCCESS moves the Claims Process business process to its end event.