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

What is it for?

AQ_Instance_Update is used for updating an Attribute and/or Relation of one or more existing instances

Parameters

NameDescriptionTypeRequired
EntityThe type of the instance that should be updated.Module Element - EntityTrue
Select one or moreYou can use an expression to select the instance that you want to update. They have to be instances of the entity selected in the above parameter. If left empty, it is assumed that the selected entity is either singleton or that an active instance exists.ExpressionFalse
Clear existing valuesClears all attributes and relations before execution.BooleanFalse
Attributes and RelationsAdd one line for each attribute or relation that you want to set.LineFalse

AttributeSelect an attribute or relation of the entity selected above.Module element - Attribute/RelationFalse

Value

Write an expression that results in a value for the selected attribute or relation. Leaving the expression empty or removing it clears the value of the selected attribute or relation.

ExpressionFalse

This service executes all lines from top to bottom, so you could use the new value of an attribute or relation that you set in a previous line by using this attribute or relation in the expression of a next line. You can use attributes and relation in your desired order. 

The selected instance is not active in expressions. This allows for copying an instance of the same type. To have the option to have it active is an improvement for the future.

Example

Imagine a situation in which you want to update all job instances. You want to calculate the years of experience. All jobs that have no until date filled in, should get the value TODAY. The service shown below will update all job instances with an unknown end date within one service.

  • All Jobs are selected that have an unknown end date with the expression: COLLECT Job FROM ALL Job WHERE ( Job.EndDate = ? )
  • The attribute Job.EndDate gets the value TODAY
    • This is done for every instance found by the expression.

3 Comments

  1. We are using good old aq services to set and clear system.event and system.channel. In the 'new' update instance Blueriq service we are not able to select the system entity. How can we set/clear these values?

    1. It is not allowed to modify system attributes since they are owned by the runtime. For more information please refer to System attributes.

      Your case requires an alternative approach without manipulating the system attrbibutes.

  2. After migrating to this AQ_Instance_Update we discovered that the old instances did not set the attribute when the value with which the attribute was set was unknown. Instead of this is produces a warming like:

    WARN  [com.aquima.interactions.framework.service.attribute.SetAttribute] (webpool-28) [handle] Value from attribute 'X.Y' is Unknown, the attribute 'A.B' will NOT be set.


    The instance update service will however set the attribute to unknown and this may cause different behaviour.