The Business Data Comparison Business Component provides overviews of changes between a current state of a data structure and previous versions in time. Thanks to clear overviews of data changes along handovers between multiple collaborators who are working on a business process, the component boosts efficiency of business data reviews and supports transparent decision making. This helps reduce operational costs, supports compliance by design and helps provide better customer experience overall.
The component can be used in review and approval steps of onboarding applications, in update party and business relationship use cases, as well as in regulatory reviews or reviews of mortgage agreements.
The Business Data Comparison Business Component is designed to achieve efficiency in reviewing changed business data. Users get a clear overview of the data and historical changes made, down to the level of single fields. They can collaborate in the context of every single change and even mark it as important, if required.
In the following demo video, data editing and reviewing tasks between different collaborators in opening a business relationship are illustrated.
The following sections provide details on all the functionalities explained in the demo video.
The Business Data Comparison provides an overview of data changes. The changes is identified as Added, Removed, or Updated. Each of them has a semantic visual notation. In addition, the Business Component provides information on the editor(s) of those changes.
When a data property is added, the value is shown in green.


When a data property is removed, the value is shown in red strikethrough.


When a data property or its subset is updated, it gets marked by a blue dot.


You can click on added or removed data to display the date and time of the change, as well as the editor of the data.

The overview of changes is possible only when the Data Class and its properties are being tracked. This can be configured in Studio using the Data History module (Data & Integration > Data History). If the Data Class and its properties are not tracked, a dedicated notation is displayed with the message.

The component presents the data by traversing the data structure hierarchy modelled in the solution. Breadcrumbs allow users to navigate nested data.

When there are changes, a blue dot appears at the level of breadcrumbs.
To display only changed data, the entire data set (including nested sections) can be filtered by enabling the Changes Only functionality.

Savepoints are the records of changes in time. You can filter by Savepoints to see the changes occurred in data between the selected point in time and the present.
Savepoints can be added in the Process as trackpoints and their description can be configured based on relevant business information, such as the type of action performed by users and their name, as shown in the example below.
If Savepoint names are configured accordingly, you can look for the changes performed by a a specific role, the user involved in the business process or other combinations. By default, all Savepoints are available for filtering and sorted by time. The Savepoint Start shows all changes.

For more details on how to configure Savepoints and on their relation with the Data History, see Defining and Configuring Data History Savepoints section.
Depending on the requirements (i.e. Data Model complexity, performance constraints and so on), as a Solution developer, you can decide how to structure data in the change overview.
You can define multiple roots or origins of data in the form of a Master-Details List, shown on the left-hand side of the display. As a result, the user can spot changes from the master-details entries. Changed subsections are marked by the has changes tag.
In the following example, the Master-Details List contains four root Objects, corresponding to the Data Class 'Account' and the collection 'Parties'. Subsections of 'Account' and 'Parties' objects are highlighted with a blue has changes tag.

For information on how to configure this feature, see the Configuring the ChangeOverview Screen Widget Based on the Data Logic section.
The Business Data Comparison allows users to add comments and flag a change to draw the attention of other collaborators, thus avoiding using external collaboration channels (emails, chat, SMS, etc.), which can be tedious and non-compliant. Collaborators can prioritize task editing and reviewing without losing context.
- For details on the Commenting and Flagging functionality, see the following subsections.
- For details on how to configure the Commenting and Flagging functionality, see the Configuring the Collaboration feature section.
The Discussion List Screen Component makes comments possible by using Appway's Workspace Collaboration capabilities.
Each field has the commenting functionality attached to it, meaning that users can comment on both changed and unchanged fields. Clicking on the comment icon to the right side of the field enables the Discussion List popup. If there are new comments, a blue dot appears on top of the comment icon.

Beside commenting, the Business Data Comparison allows users to flag content inside the Discussion List popup to bring attention to a change. Once the content is flagged, the comment icon gets replaced by the red flag icon.

As a Solution developer, you can implement summary overviews aggregating the commented and flagged data properties as shown in the image below. Such summaries care useful as a recap before leaving a final remark and handing over the work to another collaborator, e.g. for approvals or further amendments of the data. The comments and flags are tracked together with the context information, such as “Marie Baumann / Kyc / Source of Wealth” in this example below.

The Business Data Comparison Configuration Kit provides an example (BusinessDataComparisonConfigurationKit:EditorSummary) of how such a recap screen can be constructed. The example is based on the function BusinessDataComparison:ChangeOverviewHelper.retrieveDiscussions, which returns all the Discussions associated with the specified process. A Solution can implement its own function to retrieve a discussion based on Solution-specific filters.
Comment and flag information can also be used to enhance audit reports, typically created as PDF documents that are archived at the end of a Process.
Comments and flags tracked by the component can also be used to build an introduction screen at the beginning of a review or editing task to emphasize problematic areas before reviewers or editors go through the changed data.

The Business Data Comparison Configuration Kit provides an example (BusinessDataComparisonConfigurationKit:ApproverSummary) of how such a recap screen can be built.
The Business Data Comparison provides a compact overview of changes, while also providing the ability to inspect the entire history of changes, when required. Users can view the history of all changes for each field by clicking on a dedicated button and thereby triggering the History popup.
The History popup contains the editor's information, and the date and time of change in a timeline. The latest change is highlighted and is always at the top of the timeline.

Please, note that the
Savepoint selection also filters the history display. In order to view all changes from the very beginning of the data change tracking, please select the very first Savepoint from the dedicated dropdown.
users can compare changes within text-heavy content such as paragraphs. There are two configurations to this functionality:
The two separate areas compare the two texts before and after the changes. It uses the same notations from added and removed data inside the paragraph texts.

The merged area shows the changes occurred within a paragraph text. In this case, updates are shown as removal and insertion operations placed one after the other inside the same text.

For more information on how to configure large text blocks, see the Configuring the textDiff section.
This section outlines all the ingredients and dependencies necessary to install the Business Data Comparison.
For more details, see the Business Data Comparison card in the Products page.
The Business Data Comparison consists of the following Packages provided in the component bundle:
- DataHistory Package
- DataHistory Extension
- BusinessDataComparison Package
- BusinessDataComparisonConfigurationKit Package (see section)
- BusinessDataComparison Extension
- Make sure you installed the necessary Dependencies.
- Upload the Data History (follow the steps described in the Installing Data History section).
- Upload the BusinessDataComparison Extension.
- Import the following Packages with the corresponding Package Configurations:
a. BusinessDataComparison
b. BusinessDataComparisonConfigurationKit (see section)
The Business Data Comparison Business Component is based on a set of generic capabilities for tracking data changes performed in the context of an Appway Process and handling the data change display. This ensures the ability to construct the change overview irrespective of the underlying data structure complexity and collaboration workflows where data changes are made by users.
The diagram below explains how the change overview is constructed. Based on a series of configuration steps performed at design time and actual data objects managed in the context of an Appway Process at runtime, the change overview is auto generated on the fly. Wherever it is relevant to show data change overviews in an Appway solution, include the ChangeOverview Screen widget and configure it according to the requirements mandated by the specific use case.

The following are the configuration steps that are required to be performed at design time. Each step is illustrated in detail in dedicated subsection.
- Define which Data Classes, Data Class properties and Collections should be tracked for changes by the Data History.
- At relevant points in the Appway Process, implement the logic to start and stop the Data History tracking.
- At relevant points in the Appway Process, add Data History Savepoints and configure their names. This step is optional, and it is only required if the functionality to filter based on Savepoints is used.
- Define which data and changes should be shown in the ChangeOverview Screen Widget and in which order by creating a Data Logic Business Object with all the required configurations.
- Optionally, customize the display value for tracked Data Classes.
- Configure the ChangeOverview Screen Widget by turning on and off different features through the ChangeOverviewHelper Data Class.
The Data History is responsible to track and retrieve changes performed by users on Data Class instances and collections in the context and for the duration of a Process Instance. The Data History Studio module provides support to configure the data properties to be tracked in a visual manner, as well as a series of functions to manage the tracking and querying of information.

The Data History comes with predefined functions to start and stop the tracking of changes: DataHistoryStartTracking and DataHistoryStopTracking, respectively. As part of the business analysis activities and the Process design, it is necessary to identify the points in the Process where the Data History start and stop functions need to be invoked for a correct tracking and display of data change information.

Savepoints are trackpoints that can be added in the Process to define markers in the timeline of tracked changes.
The Business Data Comparison Savepoints are based on Data History Savepoints. Data History Savepoints must be added to your Process in the first place, but they can optionally be further configured in the Business data Comparison (see the dedicated section).
Consider that the name of each Data History Savepoint can be configured according to the business requirements of the Solution in such a way that users understand their meaning.

Savepoints support use cases where it is necessary to retrieve only a subset of the changes performed on Data Class instances or collections. Consider, for example, a Process with multiple back and forth handovers between collaborators and, thus, multiple rounds of changes over the same data entities. In this case, users need to review only the changes performed since the last time they have returned the process and hide those changes that they have already reviewed in a previous session.
Consider a Process that tracks a Country property and has Savepoints defined exactly where the Process is handed over to another collaborator, either as a submission for approval or as a return for corrections. The Savepoints are configured to show:
- the stage in the Process, such as ‘Data Gathering’ or ‘Compliance Review’.
- the action performed, such as ‘Submit’, ‘Return’ or ‘Reject’.
- the name of the user who has just performed the action.

If the Savepoint is set to the tracking start point, the user interface shows that the country has evolved from being undefined to the value “Switzerland”. The full history of changes is also displayed in the popup.
However, if the Savepoint is set to the stage right after the “return” action of “Maria M.” who was in charge of a “Compliance review” activity, then the user interface shows that the country has gone through two subsequent changes since the review, which can indicate that another “Compliance review” is required.

For more details about defining and managing Savepoints, please see the Enabling and Filtering Savepoints.
Data Logic provides a modeled rather than scripted configuration layer for the change overview rendered by the component. The Data Logic allows an Appway developer to define the way in which data and changes are structured in the Screen in terms of property sorting, grouping, visibility and labeling. Thanks to the Data Logic, the Business Data Comparison component is data model-agnostic.
A main advantage of Data Logic is that the same configuration can be reused for different use cases and in different parts of the same Solution. For example, the same Data Logic Business Object can be used to render a form used to gather the data, as well as an interface for reviewing the data changes provided by the Business Data Comparison.
The following configurations can be defined in a Data Logic Business Object. For complete details on how to configure Data Entities using the Data Logic see the Data Logic article.

- Configure the root Data Objects to be shown in the ChangeOverview Screen Widget:
a. Data Class and Collection controls added at the topmost level in the Data Logic Controls hierarchy correspond to entries in the Master-Details list. The Master-Details list is not shown if only a single root object is defined. - Configure the visibility of data properties in the ChangeOverview Screen Widget:
a. Navigate the hierarchy of Controls created by Data Logic based on the data structure and remove Controls that are not necessary for the display or hide/show properties based on logic defined in the sentries of each Control. For example, if the data model contains technical fields not relevant to end users, their corresponding Controls can be either removed or hidden from the display. See, for example, in the BusinessDataComparisonConfigurationKit:Demo (see section), the Sentry logic specified in the Rejection Comment field: if the account is not approved, this field is not displayed. - Configure the order of properties.
a. Reorder Data Logic Controls as relevant for the data review tasks to be performed by users.
Note: Starting from version Appway 9.1, it is possible to move properties inside the Control of another Data Class. The Business Data Comparison is not able to track changes for a property that has been detached from their parent in the Data Class hierarchy. Therefore, this kind of configuration is discouraged for Data Logic Business Objects used with the Business Data Comparison.
- Configure the Labels to be used for the different data values.
a. Use the Label property of each Control to define which label is shown to users. Typically, predefined Label Business Objects are referred to at this point in the configuration.
b. In addition, in the Correctness Rules panel, define the Catalogs to be used to map technical ids into a user-friendly representation of data values (see image below). Typically, data values are represented internally through ids when the id corresponds to a value in a list that is used in the data gathering phase as a Data Source for dropdown lists, checkbox lists or multiple selection fields. As an example, check the Correctness Rules panel in the Data Logic Business Object BusinessDataComparisonConfigurationKit:Data (see section).

The Correctness Rules panel plays a role in the display of changes inside large text blocks. Mark text fields as multiline to enable the
Text diff comparison feature. As an example, check the Correctness Rules panel in the Data Logic Business Object BusinessDataComparisonConfigurationKit:Data (see
section).
Starting from Appway version 9.1, a new way to unfold controls has been implemented, however an (unfolded) Group Control created in Appway 9.0 and earlier is not migrated to the new automatic unfold when upgrading to Appway 9.1. If a complex control was unfolded in Appway 9.0, this is converted immediately to a Group Control, which leads to display issues in the Business Data Comparison. In the case of a Data Logic Business Object created in Appway 9.0 and earlier and with unfolded Group Controls, we recommend redoing that configuration step by using the new Data Logic Controls.
For each Data Class tracked by the Data History, the display value is the output of the predefined getDataHistoryDisplayValue function. For complex Data Classes in particular, it is recommended that the Data Class provides an alternative implementation of the getDataHistoryDisplayValue function in order to define a user-friendly representation for the old and new display values of Data Class instances and collections. Otherwise, the display uses a default String representation (serialization).

An example for a “Party” Data Class:
Function getDataHistoryDisplayValue() : String Begin
If EMPTY($this.firstName) and EMPTY($this.lastName) and EMPTY($this.dateOfBirth) Then
Return 'Party';
End
Return $this.firstName & ' - ' & $this.lastName & ' (' & SHORT($this.dateOfBirth) & ')';
End
Note on Data Class design: Since the Business Data Comparison is relying on the Data Class model to render the data change display, remember to follow
Best Practices when it comes to Data Model design. In particular, use the proper representation for Lists of elements and avoid using bindings to Strings. Although, the Multiple Selection Field and Check Box List Screen Components allow defining string binding, this feature has been deprecated in Appway 10 and therefore
is not supported in the Business Data Comparison.
When dealing with a complex data model, it can be complicated and time consuming to set up the Data Logic Business Object needed by the Business Data Comparison. For example, in recursive or cyclic data models, the number of times a Control needs to be unfolded is not known beforehand. Moreover, if objects of the same Data Type appear multiple times in the data model, a similar setup needs to be replicated multiple times in the Data Logic Business Object configuration.
Starting from Appway 10, the newly introduced Data Logic Includes provide improved support for this use case, removing the need for custom coding. See the related documentation for more information.
In Appway 10, Type Handlers can still be used. However, consider that they are going to be deprecated in future versions of Appway in favor of Data Logic Includes. Therefore, we recommend using Data Logic Includes when possible.
If you need to use Type Handlers in your Solution, follow the instructions below:
A Type Handler is used to instruct the Business Data Comparison on how to handle objects of a given data type, without configuring the behavior in a Data Logic Business Object.

To create and register a custom Type Handler:
- Create a Data Class that inherits from BusinessDataComparison:TypeControlHandler
- Set the handledType property to the data type you want to handle
- Override the methods of BusinessDataComparison:TypeControlHandler in order to define how the Business Data Comparison handles objects of the specified data type
- Register the Type Handler in the ChangeOverviewHelper Data Class:
$helper.registerTypeControlHandler(NewObject(MyPackage:MyCustomTypeHandler))
where $helper is the ChangeOverviewHelper Data Class currently in use, and MyPackage:MyCustomTypeHandler is the custom type handler that has been created and needs to be applied.
The functions of a Type Handler have the following purposes:
getContentControls(DataLogic:Control $control) : Indexed DataLogic:Control: Given a control of the handled data type as an input, it returns a list of controls to be displayed in the comparison summary. Override this function by returning the properties of the handled class that must be displayed.getContentControls(DataLogic:Control $control): String: Given a control of the handled data type as an input, it returns the text to be used as a label for that control in the user interface.
If a Type Handler for a certain data type is registered, whenever an object of that type is encountered in the Data Logic Business Object configuration, the Business Data Comparison uses such Type Handler to determine how to represent the object in the user interface. Any unfolding performed on the registered Type is therefore ignored.
For example, see the Balance field in the Configuration Kit. The Balance field in the Account Data Class is an instance of the Data Class BusinessDataComparisonConfigurationKit:Money.
In BusinessDataComparisonConfigurationKit:Demo, this field is shown as a complex object.
However, in the BusinessDataComparisonConfigurationKit:DemoTypeHandler, a Type Handler to override the default control is defined, therefore the Balance field is represented as a simple field.

The Type Handler BusinessDataComparisonConfigurationKit:AccountTypeHandler implements the BusinessDataComparison:TypeControlHandler by extending the method getContentControls.
Function getContentControls(DataLogic:Control $control) : Indexed DataLogic:Control Begin
If $control isa DataLogic:ReferenceControl Then
Return []:DataLogic:Control;
ElseIf $control isa DataLogic:ComplexControl Then
Return CAST(DataLogic:ComplexControl, $control).children;
ElseIf $control isa DataLogic:PrimitiveControl Then
Return []:DataLogic:Control;
ElseIf $control isa DataLogic:GroupControl Then
CAST(DataLogic:GroupControl, $control).children;
ElseIf $control isa DataLogic:IndexedCollectionControl Then
CAST(DataLogic:IndexedCollectionControl, $control).values;
ElseIf $control isa DataLogic:NamedCollectionControl Then
CAST(DataLogic:NamedCollectionControl, $control).values;
Else
Return []:DataLogic:Control;
End
End
The Type Handler has been configured in the BusinessDataComparisonConfigurationKit:DemoTypeHandler Process by adding this line $widgetHelper.registerTypeControlHandler(NewObject(BusinessDataComparisonConfigurationKit:AccountTypeHandler, $widgetHelper));
The BusinessDataComparison Package contains
- A visible Screen called ChangeOverview, which can be added to any application screen to render the overview of data changes,
- A visible Data Class called ChangeOverviewHelper, which is used to configure the ChangeOverview screen widget.
A ChangeOverview widget instance needs a valid instance of a ChangeOverviewHelper Data Class to work properly. If the component is used multiple times in the same Process, and for several users, each task needs to use its own ChangeOverviewHelper instance because it contains (together with other elements) information about the navigation and interaction states that need to be isolated among different user sessions.
Follow the list of steps to configure the ChangeOverview Screen Widget
-
Initialize a $widgetHelper variable of type BusinessDataComparison:ChangeOverviewHelper. When constructing this variable, make sure you pass the ID of the Data Logic Business Object to be used, and set the Variable Assignments (see configuration options in the following subsections).
BusinessDataComparison:Configuration $conf := NewObject(BusinessDataComparison:Configuration);
$conf.additionaDiscussionKeys := ['extraKey']:String;
$conf.isFlaggingEnabled := true;
$conf.isDiscussionEnabled := true;
String $dataLogicId := GETBUSINESSOBJECT('Data Logic', 'BusinessDataComparisonExample:MainDataLogic').getId();
Named Any $varAssignments := {'partyGroup'=$partyGroup}:Any;
$widgetHelper := NewObject(BusinessDataComparison:ChangeOverviewHelper, $changeTrackerGlobalData, $conf, null, $dataLogicId, $varAssignments);
-
Add a Screen Task in your Process wherever you want to display the Business Data Comparison change overview summary.
-
In the Screen, include BusinessDataComparison:ChangeOverview (passing the $widgetHelper)
The demo BusinessDataComparisonConfigurationKit:Demo, for example, implements this approach (see section).
Note: In previous versions of the Business Data Comparison, it was possible to configure the widget using a Data Task. However, this configuration does not support
Data Logic Includes and it is therefore deprecated with Business Data Comparison 3.0.0 and higher.
When a ChangeOverviewHelper instance is created, the constructor function accepts the following arguments:
- BusinessDataComparison:ChangeOverviewGlobalData $globalData: this object must be unique per Process Instance and shared among all the widget helper instances, so it is a mandatory argument.
- BusinessDataComparison:Configuration $configuration: this argument is used to tune the ChangeOverview component features. It contains several properties capable of driving the rendering and functionalities of the component at runtime. See more details in the Appendix section.
- BusinessDataComparison:SavepointProvider $SavepointProvider (optional): this argument is optional but must be provided by the Solution if Savepoints need to be used and managed.
- String $dataLogicId (optional): If a Data Logic Business Object ID is passed, the Business Data Comparison computes the context and ignores the underlying Data Task. Fill this parameter to use the Business Data Comparison without an underlying Data Task.
- Named Any $varAssignments (optional): If a Data Logic Business Object ID is passed, this object is used to assign variable values to the Data Logic. Fill this argument whenever you want to use the Business Data Comparison without an underlying Data Task to pass variables to the Data Logic context.
The following properties are used to enable and disable the widget features:

- The Savepoint navigation dropdown can be disabled using the SavepointProvider(more detail in the Savepoint section)
- The Changes Only check box is enabled/disabled through the isOnlyChangesFilterEnabled, while its default value is set through the showOnlyChanges property.
- The Collaboration interaction can be fully configured.
- The list of fields to be shown can be configured using the Data Logic.
The Process BusinessDataComparisonConfigurationKit:ConfigurationWizard showcases the different configuration options of the ChangeOverview widget (see section).

- Click on Show Generated Configuration to display the code snippet to apply the chosen configuration.
- Click on the Next button to display a preview of the ChangeOverview widget.
As shown in the Reviewing Changes Inside Large Text Areas section , you can configure two different representations for text-heavy fields.
- In the ChangeOverview widget configuration, enable the textDiff functionality and set thereview mode (one merged area or two separate areas):
BusinessDataComparison:Configuration $configuration := NewObject(BusinessDataComparison:Configuration);
$configuration.isTextDiffEnabled := true;
$configuration.textDiffMode := Configuration.TEXT_DIFF_TWO_COLUMN();
- To enable the textDiff representation for a specific field, use a Correctness Rule to enable the Allow Multiline option for that field.
As described in the Commenting and Flagging section, the ChangeOverview widget fully supports collaboration with the possibility to comment and flag changes.
The ChangeOverview widget configuration allows enabling and disabling comments and flags by using the isDiscussionEnabled and isFlaggingEnabled properties.
BusinessDataComparison:Configuration $conf := NewObject(BusinessDataComparison:Configuration);
$conf.isDiscussionEnabled := true;
$conf.isFlaggingEnabled := false;
$conf.flagLabel := [LABEL:MyLabel]:Any;

Flagging
Define the label you want to use for flagging through the flagLabel property.
Commenting
Commenting is possible through Discussion Lists. In the Business Data Comparison, these are saved into the Discussion Context using, as keys:
- Business Data Comparison-PID: the ID of the Process Instance in which the Business Data Comparison is included.
- Business Data Comparison: processInstanceId#dataEntityPointerId. The dataEntityPointerId is a unique identifier of a certain piece of data. For example, assume that a comment is left on the property firstName of a Data Entity of type Person, with dataEntityId 123456. The dataEntityPointerId would be 123456:firstName.
- Any other key defined in the Configuration.additionalDiscussionKeys
Example:
Business Data Comparison-PID=1561723587795, Business Data Comparison=1561723587795#1561723587801:name
In this way, you can retrieve and use Discussion Lists used in the Business Data Comparison scope even outside the component.
An example of Business Data Comparison DiscussionLists used outside the scope of the component can be seen in the BusinessDataComparisionConfigurationKit:EditorSummary.
For more information about the Discussion Context, see the Workspace Collaboration article.
To use Savepoints with the Business Data Comparison, you must add them to your Process using trackpoints (see dedicated section). Moreover, Consider the following information:
- Filter or disable the Savepoints used in the ChangesOverview widget by using the SavepointProvider.
- If the ChangeOverviewHelper Data Class has no SavepointProvider (SavepointProvider = null), then the Business Data Comparison does not show the Savepoint navigation dropdown and it only shows changes about one defined Savepoint.
- A Solution can implement its own Savepoint provider that filters the list of Savepoints to be shown in the Savepoint navigation dropdown. The SavepointProvider implementation needs to extend two methods:
- getSavepointDescription: takes a Savepoint as an input and returns the visual representation used in the dropdown. The default value is a concatenation of the Savepoint name and the date.
- getSavepoints: returns the filtered list of Savepoints.

- Use the preselectCurrentSavepointMode property to configure the Savepoint selected by default in the widget.
BusinessDataComparison:Configuration $conf := NewObject(BusinessDataComparison:Configuration);
$conf.preselectCurrentSavepointMode := BusinessDataComparison:SavepointProvider.PRESELECT_THE_LAST();
There are 3 possible configurations:
- Preselect the last Savepoint in the list
($conf.preselectCurrentSavepointMode := BusinessDataComparison:SavepointProvider.PRESELECT_THE_LAST();) - Preselect the first Savepoint in the list
($conf.preselectCurrentSavepointMode := BusinessDataComparison:SavepointProvider.PRESELECT_THE_FIRST();) - Preselect a specific Savepoint by ID.
For option 3, consider that a Savepoint selection strategy must inherit from the Data Class 'BusinessDataComparison:DefaultSavepointSelectionStrategy' and implement its abstract method 'getDefaultSelectedSavepoint'. This method receives, as input, the list of available Savepoints, and must return the Savepoint to be selected by default.
We provide a concrete Savepoint selection strategy named 'BusinessDataComparison:DefaultSavepointSelectById' to select a savepoint given its ID.
Note that, when referring to a Savepoint ID, we refer to the field savepointId of an instance of Data Class DataHistory:Savepoint, and NOT to the function getSavepointId(), which is no longer used in Business Data Comparison 3.0.0 and higher.
To use it, the Business Data Comparison configuration can be set as follows:
BusinessDataComparisonConfigurationKit:Configuration $conf :=
NewObject(BusinessDataComparisonConfigurationKit:Configuration);
String $savepointId := '1234'; // The id of the savepoint to be selected by default
$conf.preselectCurrentSavepointMode :=
NewObject(BusinessDataComparison:DefaultSavepointSelectById, $savepointId);
Further custom savepoint selection strategies can be created and used by implementing the interface Data Class 'BusinessDataComparison:DefaultSavepointSelectionStrategy' and its abstract method 'getDefaultSelectedSavepoint'.
In the demo BusinessDataComparisonConfigurationKit:DemoSavepointFiltering (see section), DataHistory Savepoints are filtered to exclude the Savepoint generated in the Worker2 Swimlane.
The ChangeOverviewHelper is based on the Data Context generated by the underlying Data Logic Business Object. As this object can be quite large and expensive to be computed, you can save the Data Context in the application cache by using the Configuration.isCacheEnabled property. If the Cache is enabled, the object is persisted in the cache for 10 minutes. the default value is: true
All changes and annotations in the Business Data Comparison can be tracked and collected for audit purposes by instantiating the ChangeOverviewHelper and iterating over Controls. The content of discussion lists, flags and changes is then retrieved.
The Business Data Comparison Configuration Kit provides an example of how to extract and display this type of information programmatically. Please, see the BusinessDataComparisonConfigurationKit:EditorSummary.
A Configuration Kit is an example of configuring a Business Component, and bundles pre-created data objects, logic, or screen flows necessary to support a prototypical scenario.
The Business Data Comparison Configuration Kit contains several configuration examples which are mentioned in this article and can guide you in configuring your Solution.
Please, consider that the Configuration Kit provided by Appway is just an example of how a Solution works. If you wish to use the Configuration Kit as a starting point for configuring your Solution, you may do so, but make sure you create a copy of the Configuration Kit and apply your changes to this copy. Otherwise, all your customizations will be overwritten when you upgrade to a new Configuration Kit.
All the Business Data Comparison Style Business Objects are placed in the (sealed) Digital Binder Package and they cannot be edited directly.
To achieve the desired styling, or to align the Business Data Comparison to a solution branding, all the Style Business Objects and Style Value Business Objects provided need to be cloned in a new or in an existing Style Package with the Style Package Tools.
When upgrading from Business Data Comparison 1.x to Business Data Comparison 2.x, consider the following upgrade information:
- Business Data Comparison 2.0.0 has introduced a new Style Business Object. If you use a Style Package, make sure you run again the Style Package Tools and import the missing styles.
- Business Data Comparison 2.0.0 has introduced the following change in the navigation breadcrumb: it now uses the 'getDataHistoryDisplayValue' function of the root Data Class. Therefore, make sure such method for your root Data Class is implemented.
| Property | Type | Description |
|---|
| isDiscussionEnabled | Boolean | If true, the component provides a feature to leave comments and discuss on the data model properties or changes [default: true] |
| isFlaggingEnabled | Boolean | If true, the component allows flagging properties and changes [default: true] |
| isTextDiffEnabled | Boolean | If true, the component performs a diff for long-text properties (use a Correctness Rule in the Data Logic template to enable the Allow Multiline option) [default: true] |
| isNamedCollectionKeyDisplayed | Boolean | If true, the key value of NamedCollection entities is shown in the ChangeOverview widget. |
| textDiffMode | String | Sets the desired mode for the long-text diff rendering (one merged are or two areas). The allowed values are provided by two static functions: - Configuration.TEXT_DIFF_SINGLE_COLUMN()
- Configuration.TEXT_DIFF_TWO_COLUMNS()
[default: TEXT_DIFF_TWO_COLUMNS]. |
| flagLabel | String | Defines the label for the flag feature. In general, the label does not need to be changed to customize the text, as it can be set with the overriding translation feature. However, you need to customize them if you want to use different labels for different flags in the same Appway Instance [default:“[LABEL:BusinessDataComparison:FlagLabel]”] |
| additionalDiscussionKeys | Indexed String | If set, the component adds the contained keys when creating new discussions (discussions are containers for the comments on properties/changes) [default: [] ] |
| preselectCurrentSavepointMode | String | If Savepoints are enabled, it determines how the component behaves, at render time, when the current Savepoint is undefined.Possible values for this property are: - SavepointProvider.PREFILL_WITH_FIRST(): it takes the first Savepoint available.
- SavepointProvider.PREFILL_WITH_LAST():it takes the last Savepoint available
[default: PREFILL_WITH_LAST ]. |
| isCacheEnabled | Boolean | If true, the ChangeOverviewHelper enables the cache for the Data Control. |
| isChangeFilteringEnabled | Boolean | If true, the component provides a filtering feature based on the fields that have been edited. [default: false]. |
| isMasterDetailLabelDisplayed | Boolean | If true, the label associated with the Master Detail entry is displayed. The default value is true, meaning labels are displayed by default. |
| Property | Type | Description |
|---|
| configuration | BusinessDataComparison:Configuration | Configuration options for the ChangeOverview widget. |
| globalData | BusinessDataComparison:ChangeOverviewGlobalData | Mandatory argument. It must be unique in each process instance and shared among all widget helper instances. |
| SavepointProvider | BusinessDataComparison:SavepointProvider | Data Class to be used to filter/disable Savepoints. If null Savepoints are disabled. |
| typeHandlers | Named BusinessDataComparison:TypeHandler |
| Function | Inputs | Description |
|---|
| BusinessDataComparison:WordDiff | - $first (String): First string to be compared. Example: The cat is on the table.
- $second (String): Second string to be compared. Example: The cat fell to the ground.
| This script function executes a word-based diff comparison between the two strings provided as arguments. The result is a Named collection containing two Indexed of integers indicating which words have been deleted from the first string, or added to the second one. |
We are very much open to questions and suggestions from your side. If you have any feedback regarding the Business Data Comparison Business Component, please open a ticket on community.appway.com using the project "Appway – Platform — Business Components".