Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Summary
Value lists are filled from master data. These value lists contains all possible values within a domain. This domain can easily read from a source and apply within the domain layer. The list is managed and determined outside of the application. For example, country lists, occupation codes, municipalities, etc.
Contents
Table of Contents | ||
---|---|---|
|
Context
Within applications, lists in the form of a value list are used regularly. The content of a value list could be defined design-time or run-time. In this document solution will be shown to fill a value or instance list. Every solution has it's own pros and cons.
The table below mentions the most critical considerations regarding the implementation of instance or value lists within Blueriq.
Property | Description | |
---|---|---|
KnowledgeDecision Management | Design-time validatie | Visual Studio (design-time) provides design-time validation when a value is assigned to the active value of a value list. |
Run-time validatie | Validation during application execution occurs. | |
Version management list content? | Is version management of the value list content possible. | |
Implementation property | Read from external source | Value content is read from an external source . E.g. CSV file, database of webservice. |
Refresh value list | Moment in time when the content of a value list will be initialized/freshed. | |
Deployment needed/no design-time changes needed | Value list content can be updated by using a deployment or by modifying the external value list content only (e.g. CSV file, database of webservice). | |
Maintainability | Maintainability of content of a value list. | |
Out of the box | Solution can be implemented by means of OOTB functionality. |
Problem
Content of a value list changes more often compared to the application which uses the value list. Seperating application behaviour from maintenance of value list content which could be depend on external resources.
Solution
The solution takes into account the features that are named in the table in paragraph "Context".
There are several solutions that can be realized to a greater or lesser degree by the above characteristics. In each case, the best solution should be chosen. The table below shows the most important features and how each solution scores.
Property | Value list (static) | Value list (dynamic) | Instance list (static) | Instance list (dynamic) | |
---|---|---|---|---|---|
KnowledgeDecision Management | Design-time validation | ||||
Run-time validation | |||||
Version management list content? | |||||
Implementation propertiesproperty | Read from external source | ||||
Refresh value list | design time | start applicatie | design time | session time | |
Deployment needed/no design-time changes needed | |||||
Maintainability | /3 | /3 | |||
Out of the box | 1 | 2 |
1External source check mark property of Value List and configuration. BE workWork for Business Engineer.
2Maatwerk for inlezen bron en creeren van instanties. TE werkCustom code for reading data from source and the creation of instances. Work for Technical engineer.
3Depends on number of values/instances in the list.
Hieronder worden per oplossing in het kort de verschillen in de implementatie beschreven. Voor de realisatie van de daadwerkelijke oplossing wordt verwezen naar het desbetreffende patroon en wordt een concreet voorbeeld beschreven.
Below differeent solutions will be described. For the realization of a specific solution, a reference is made to the relevant pattern and a concrete example is described.Solutions:
Value list static
Value list
dynamicdefined within Blueriq Studio once. This value does not change run-time anymore.
Changing the value list requires a model customization and deployment.
With small value lists (<10 values), maintenance is easy. With a large value list (100+ values) maintence is very cumbersome.
Example
Adding values to a value list is descrbied
Value list static
Eenmalig in Studio de value list definiëren. Deze waarde veranderd run-time niet meer.
Wijizigen van de value list vereist een model aanpassing en deployment.
Bij value list met < 10 is onderhoudbaarheid goed, bij 100+ is deze slecht.
Example
Het vullen van een value list binnen Blueriq wordt beschreven in MyBlueriq.
Value list dynamic
An external rule also allows business rules to be implemented and unlocked. Compared to the Function, an external rule is not possible to ensure autonomy. An external rule uses attributes within the same domain as the application so that unwanted mixing is possible. In addition, the maintenance is low because an external rule is a rule that is implemented in code. Business rules do not want to be implemented in code but in Blueriq because of its maintainability.
Met een external rule kunnen ook bedrijfsregels worden geïmplementeerd en worden ontsloten. In vergelijking met de Functie is het met een external rule niet mogelijk om autonomie te waarborgen. Een external rule maakt gebruikt van attributen binnen hetzelfde domein als de applicatie zodat ongewenste vermenging mogelijk is. Daarnaast is de onderhoudbaar laag doordat een external rule een regel is die in code wordt geïmplementeerd. Bedrijfsregels wil je niet in code implementeren maar in Blueriq vanwege de onderhoudbaarheid.
Example
Het vullen van een value list binnen Blueriq wordt beschreven in Adding values to a value list is described in MyBlueriq.
Instance list static
Instances should be created design-time and show instances by using an instance linker. Define a relation attribute to catch the instances.
Example
The implementation of an static instance list will be described in MyBlueriq.
Instance list dynamic
Some custom code is needed to implement dynamic instance list. An external resource must provide the values for the instance list and instances should be created run-time.
Example
No example available. Too bad joh.
Issues and considerations
Value lists die regelmatig wijzigen via een external value list. Value lists die constant zijn, bijvoorbeeld geslacht, ja/nee/onbekend, die realiseren d.m.v. een value list design time. Bij een external value list heb je niet de mogelijkheid om design-time model validatie toe te passen. In een expressie kan een value gebruikt worden die run-time niet mogelijk blijkt te zijn. Dit wordt run-time pas geconstateerd.
Related patterns and articles
- Persistence Data to read/write data from an external resource.
- Persistence Product Model to read product model from external resource and applies values within the rule engine.
- How to handle Master Data
that change regularly should be implemented by an external value list. The initial work is way more compared with a static value list, but the maintenance is way less. With an external value list you do not have the option to apply design-time model validation. In an expression, a value can be used which does not exist. This is only observed run-time.
Value lists that are constant (e.g. gender, yes / no / unknown) should be realized by a (static) value list.The values are defined design-time.
Decouple category
Properties
Property | Description |
---|---|
Decouple category | Database decoupling (2) |
Complexity | Medium |
Related patterns/solutions |
|