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

What is it for?

The AQ_ActivateInstance service is used to activate a specific instance in a Flow element

The activated instance can be used for display on a page or used in conditions in subsequent flows or pages. The instance will stay active as long as the flow of the active service is active. Once the flow has been completed or aborted the instance will be removed from the instance stack, just like any other instance that might have been activated in that flow.

Selecting an instance to activate

The instance that should be activated can be specified in two ways:

  • By type, which means that all of the instances of that type are considered.
  • By relation, which means that all instances in the specified relation are considered.

A condition is used to determine which instance should be activated from the list of possible instances. The first instance for which the condition returns true will be activated. When there are no instances found, or none of the instances returns true for the condition, the service will have no effect.

Parameters

NameDescriptionTypeRequired
entity-nameThe type of the instance(s) that may be activated.Stringfalse
relationThe name of the relation containing the instances that may be activated. Dotted notation is permitted in this path.Stringfalse
conditionA condition expression that will evaluate to either true of false. This condition, when specified, will be evaluated for each instance, and only the first instance for which the condition evaluates to true will be activated.Stringfalse

Either the entity-name or relation parameter must be specified. If both are empty, or both are provided, an exception is raised.

The service honors the stop-on-errors flag set by previous services in the flow.