Upgrading case types: Adding data change management to details UIs

Draft comment:
This topic only applies to BAW, and is located in the BAW repository. Last updated on 2025-03-13 12:15
Client-side human services for case details UIs that are created in Business Automation Workflow V8.5.6 contain a data change event handler. This event handler manages both the local and remote changes to data in the UI. After converting case types from V8.5.5 to a processes, you can add the event handler.

Procedure

  1. Convert the case type to a process.
  2. Open the client-side human service for the details UI.
  3. In the Diagram view, add an event handler Event Handler tool to the diagram.
    By default, the event handler is an Error Event handler.
  4. Change the default Error Event handler to a data change event handler by renaming the Error node to Data Change and, in the Implementation properties, under Event Trigger, select Data Change Event.
    Tip: The data change event handler is available only for client-side human services that run in the context of a process. A client-side human service can have only one data change event handler. Human services for processes automatically contain an implemented data change event handler.
  5. Implement the data change event handler.
    1. Optional: Specify the boundary events that can trigger the data change event handler.
      By default, the event handler checks the server at regular intervals for updated data. To specify the boundary events, in the Behavior implementation properties, select the coach boundary events in the current client-side human service that trigger the event handler. For example, you can add a Refresh Button to the UI so that users can manually refresh the data. In the data change event handler properties, add the boundary events for the Refresh Button to trigger the refresh.
      If the current service contains nested client-side human services that have Trigger the root data change event handler selected, the nested services are also shown in the Behavior list.
    2. Add the logic for reacting to data changes by double-clicking the Data change node.
      Several tw.system.coachUtils and tw.system.dataChangeUtils JavaScript APIs are available for detecting data changes on the server and applying them to the client. For more information, see JavaScript API for client-side human service development.
  6. Click Save or Finish Editing.
    For details about declaring variables for the client-side human services, see Declaring variables
  7. To test the interaction between the user interface and the process:
    1. Run the process.
    2. In the Inspector, select the process instance and click Open instance Details UI in the toolbar.