You are viewing the documentation for Blueriq 14. Documentation for other versions is available in our documentation directory.

What is it for?

An attribute is used to define the properties of your entities, thereby defining the data that can exist in your application. A multivalued attribute can contain more than one value of the same type. 

What is it?

An attribute is a property of an entity. Every attribute is of a specific data type. For example the entity Person can have attributes like: Name (type: string), Gender (type: Boolean) and Date of birth (type: Date).

An attribute can:

  • have its values be limited to values specified in a value list (see Value list)
  • have multiple values (be multi-valued)
  • have a default value
  • can have an associated set of unit tests

How does an attribute get a value

An attribute can get a value through logic, or it can be set by the user, a service, a function flow or a web service.

When the value is derived through logic, a business rule, decision table or data rule determines the value of the attribute. The value is usually dependent on values of other attributes. When an attribute gets a value in this way we say that the value is "system set". A system set value is only determined when the value is necessary, for example when it is shown on a page or used as input for a service.

The value can also be set explicitly by the user. We call this value "user set". This is the case when the value is filled in on a page. Other ways to make give an attribute a user set value is through the use of a service. This also covers other situations like the use of a web service or a function flow. When an attribute has a user set value, this value will be fixed until the value is cleared, or another value is explicitly set.

How to – define an attribute

  1. Select the Home tab
  2. From the Domain group select the Attribute icon
  3. Choose the corresponding Entity
  4. Fill in the required fields and tick or uncheck the necessary boxes
  5. Click Save or Save & close


Properties

Property
Description
Go to unit test overview for this attribute.

Go to the Decision Requirements Graph for this attribute.
Entity

Choose the entity the attribute belongs to. 

It is possible to create an entity while creating an attribute by clicking on the icon Create new entity.

NameIdentifies the attribute. Only letters, numbers and underscores (_) are allowed. The name should start with a letter or an underscore. The maximum length of the name is determined by a database setting
Askable

Tick this box in case the value of the attribute can be given by the user. If an attribute is not askable, the value of the attribute has to be derived.

The askable property of an attribute is only used in the evaluation of decision trees.

Functional nameOptional, can be used in documentation
TypeChoose type of attribute. The options are: boolean, String, Number, Date, DateTime, Percentage, Currency, Integer
Acts as Reference

Not implemented

Note that the implementation for "Acts a reference" has not been available since Blueriq 10.0. Checking the tick box will not give an error, but will not have any effect either.

Check this box if the value of the attribute is a reference to an aggregate (version), document, case or task. This affects the way full-text search handles the value of the attribute. See Search in structured and unstructured information.

When checked, the Value list and Default Value section disappear and you can choose to what this attribute refers. It can refer to an aggregate id, aggregate version, task id or process id if the attribute is an integer, or to a document id if the attribute is a string. When referring to a document, you can also provide the connection name in which this is stored.

Multi-valuedTick this box in case the attribute needs to be a multivalued attribute . It can then have more than one value. 
Value list

A Value list is a drop down menu of possible values an attribute can have.

Tip: create a value list on the fly

When the value list is not yet created it is possible to create it whilst creating an attribute by clicking on the icon create new value list.

DescriptionIs optional, but recommended.
Default value

The initial value of an attribute is set by the default type in combination with the default value. The choices are: None, Constant, Expression, Decision table, External.The default type “None” cannot be combined with a default value e.g. no initial value will be set. For the other default types you can fill in the associated default value which will derive the initial attribute value.

  • Constant: fill in a value of the type defined by the base type
  • Expression: create an expression which derives the value during run time
  • Decision table: select a decision table in which the attribute is used as an action
  • External: use a service to set the initial attribute value

Be aware that a decision table as a default value will not be used in the derivation process, it is only used in case no logic can be found to find a value. It then will use this decision table as fallback.

The derived value must be of the same type as the base type

Question

When the attribute is used on a page, this text will be shown to the user. You can fill in a text for every language of your project. The double arrow down indicates that another language has been filled in as well, and you should not forget to update that one as well when you change the text.

The question text can contain TSL

Explain

You can fill in a text for every language of your project. The double arrow down right next to the selected language indicates that another language has been filled in as well, and you should not forget to update that one as well when you change the text.

The explanation text can contain TSL

Validation ruleChoose one or more Validation rule. Validations check the correctness of the input for that attribute at run-time. A validation rule can be selected from the drop-down list, or created in-place. Validation rules can also be added to an attribute by dragging and dropping.
Validation type

Is a standard validation rule you can create within the attribute. The following validation types are available:

  • Bankaccount (string): use to check whether a bank account number is valid
  • Date (date): use to construct validations for specific date formats
  • IBAN: International Bank Account Number
  • Number (number, integer, percentage, currency)
  • Regexp (string): use for regular expressions
  • SofiNumberValidator (string): use to check whether a social security number is valid
  • StringLength (string)

Please see Validation types.


Attribute Types: boolean, string, number, date, datetime, percentage, currency, integer

The Data type field is used to set the data type of an attribute.
Data typeDescription
BooleanContains a boolean TRUE or FALSE value, or UNKNOWN
StringContains a text string of max. 500 characters
NumberContains a numerical value
DateContains a date. The format depends on the locale of the application server
DatetimeContains a date and time. The format depends on the locale of the application server
Percentage

Contains a numerical value, representing a percentage. Note that that a value of a percentage is treated just like any number.

Icon

the percentage is mainly used for presentation, in mathematical operations the percentage acts the same as a Number. If you want a percentage attribute to act as a percentage in a multiplication (i.e., 25 % * 80 = 20) , you have to divide the result by 100.

CurrencyContains a numerical value, representing a currency
IntegerContains an integer value

For the numerical types (Number/Percentage/Currency/Integer), there are rules which mathematical operations can be applied between attributes of the same or different type. See Expression function reference.


2 Comments

  1. I found out this does not apply to rest calls. Could you confirm this will stay this way because we're depending on it.

  2. How many decimals do number type attributes support, at maximum?

    And are currency attributes always in Euros?