IBM Support

When a flow loops back to a Coach in IBM Business Process Manager (BPM), its Coach Views that are bound to re-initialized complex objects might contain stale data

Technote (troubleshooting)


Coach Views that are bound to complex objects (both data binding and configuration binding) might contain stale data when the runtime flow returns to a Coach that contains these Coach Views.


The runtime flow returns to the Coach through a stay on page node or connection. The stale data occurs only when complex objects, such as a business object of a complex type, are re-initialized on the server side. The Coach views are not notified of this re-initialization and, as a result, do not refresh their data. That is, a server-side tw.local.var1= new tw.object.BO1() means that Coach views that are bound to the business object (BO) might have data that is out of sync with the server. Coach views that are bound to simple type properties of the complex object are notified of changes (for example, tw.local.var1.property1="changed").

For example, CoachView1 is bound to BO1 and CoachView2 is bound to BO1.property1, which is a simple type such as String or Integer. If you re-initialize BO1 on the server and the flow returns to the Coach that contains CoachView1, CoachView1 is not notified of this change. However, if the re-initialization of BO1 changes BO1.property1, CoachView2 is notified of this change to BO1.property1.

Resolving the problem

To make your Coach view aware of changes to a complex object, use one of the following techniques:

  • Create a callback to capture changes to the complex object:
    1. In the load() event handler of the Coach view, add the following code:

      this.context.binding.get("value").bindAll(this.myChange, this);
    2. Define the myChange() event handler in the Coach view JavaScript™. Add the logic to handle properties changes.
    3. In the change() event handler, call bindAll() to rebind to the properties. This step is necessary because the previous binding subscriptions are lost when the complex object is replaced.
  • Create a flag to indicate that the complex object has changed:
    1. Add a variable of a simple type such as Boolean or String to the human service.
    2. Bind the variable as a configuration option to the Coach view.
    3. Add server-side scripting that updates the variable when the complex object changes. The change in the configuration option variable invokes the change() event handler for the Coach view.
    4. Add code to handle the changes in the complex object.

Cross reference information
Segment Product Component Platform Version Edition
Business Integration IBM Business Process Manager Express Coach Linux, Linux zSeries, Windows 8.5, 8.0.1, 8.0
Business Integration IBM Business Process Manager Standard Coach AIX, Linux, Linux zSeries, Solaris, Windows 8.5, 8.0.1, 8.0

Product Alias/Synonym


Document information

More support for: IBM Business Process Manager Advanced

Software version: 8.0, 8.0.1, 8.5

Operating system(s): AIX, Linux, Solaris, Windows, z/OS

Reference #: 1638401

Modified date: 16 January 2014