Build Number | Database | OS |
V10 build 3512 | MariaDB 11.3 | Windows Server 2016 |
What I did…
I created BOs that are part of a BO Group. There is a process that takes the BO Group as input and performs an action, for example store the BO in a Session attribute. As a result of the program logic, there may be multiple BOs in the Context which may be of different types within the same Group.
What I expected to happen
I expected the process to take the latest (most recent) BO from the Context as input, in the same way that BOs are taken from the Context that are not part of a Group.
What happened
I found that in some cases, the process does not get the most recent BO as input but an earlier BO. It seems that one type within the Group is more ‘dominant’ than another type. So if first the dominant type is put in Context and then another type is added, the process will get the earlier BO as input instead of the later BO.
Steps to reproduce the problem
I created an example BSV to demonstrate this issue. This builds on the CRM sample application, so to test it you need to have the files in \AwareIM\samples\CRM. When running the BSV, you will first get the usual message that the data will be initialized. Assuming this works correctly, you can then do the following:
- Select the tab Correspondence
- Select the operation ‘View details’ for Rosemary Flint. This will open a new tab with the name ‘Main’, which has the list of Communication items in the left panel and the details of the selected item in the right panel
- Select communication items in the left panel. Selecting any item triggers the process ‘Communication_Select’. This saves the selected item in the Session BO. The form in the right panel is automatically refreshed to show the details of the communication item that is stored in the Session BO.
- You may see that in some cases the right panel is updated and displays the details for the selected item, but in some cases it is not updated but instead displays the details of the earlier BO (being in this example the Contact Note for Rosemary Flint). On my computer, this happens for example when I select the outgoing letter to Jane Allison (the first communication item in the left panel).
If in your situation this does not reproduce the problem, you may have to try different combinations. I.e. select one communication type on the Correspondence list (tab ‘Correspondence’) and then select another communication type on the tab ‘Main’. The first step puts that BO in Context and the second selection puts another BO in Context.
Below a screenshot that illustrates the issue. First a ContactNote is put in Context. Subsequently another item is selected of a different type, in this case an OutgoingLetter. But that OutgoingLetter is not delivered as input to the process Communication_Select, but instead the earlier ContactNote. In other words the ContactNote seems to have preference over the OutgoingLetter.

For comparison, here is a screenshot of the log when the same two objects are selected in reverse order. This shows that the issue is not in the object itself, but in the way that the object is taken from the Context.

Attached example BSV
Attached log file (as zip file as the Forum does not seem to support .log or .txt files)