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

What is it for?

AQ_DeleteInstance is used for removing instances from the profile

What does it do?

This delete instance service will remove instances from the profile depending on the parameters. The service can be used to delete the active instance of a certain type, or to delete all instances from a relation attribute.

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

The type-scope parameter may be used to indicate if all instances in the profile matching the type should be processed (Global mode), or only the active instance of the specified type (Active mode). When the global mode is used as type-scope, the exact-type parameter may be used to specify if only instances that exactly match the type (default) should be deleted, or if also derived instances should be processed.

In case there are no instances available and the type-scope is Active, the service will return an error Unknown instance, or no active instance. In case the type-scope is Global no warning or error will be shown.

A condition expression may optionally be provided to restrict the number of instances that are deleted to only those instances for which the condition evaluates to true.

Parameters


NameDescriptionTypeRequired
attribute-path

The name of the relation from which all instances should be deleted. Dotted notation is permitted in the path.

When a relation is used that does not contain any instances, the service call does not have any effect (except a few log statements).

Stringfalse
type

The type of the entity of which the instance(s) should be removed

When the type parameter is used, but no active instance is found for the specified type, the service raises an exception.

Stringfalse
conditionA condition expression that will evaluate to either true of false. This condition, when specified, will be evaluated for each instance, and only instances for which the condition evaluates to true will be deleted.Stringfalse
type-scope

Can be Active or Global. Active will clear only the active instance of the specified type. Default is Active.

The type-scope parameter is only relevant when the type parameter is specified.

Activefalse
exact-type

Boolean parameter that may be used to indicate if only instances that exactly match the specified type should be cleared, or when the value is false derived types are also processed.

The exact-type parameter is only relevant when the type-scope is set to global.

Booleanfalse



Exactly one of the parameters attribute-path and type must be defined. When both or none of the parameters defined, the service raises an exception.



6 Comments

  1. I was wondering if this service, when used with a Type and Type-Scope Global defined, should delete all instances of this type in the profile or just one random one?

    1. If only Type (with the name of the entity) and Type-Scope (Global) are specified. All instances of that entity are deleted.

      1. Then I'm going to check if I might have found a bug, because we might be getting different behavior.

  2. Unknown User (a.jansen)

    Is it possible to enter in the type parameter a list of entity types seperated by a delimiter, such as for example "Entity1|Entity2"? 

    1. Unknown User (a.jansen) This is not supported, could you create a feature request for this

      1. Unknown User (a.jansen)

        Hi Vincent Jansen, thanks for the reply. No feature request needed. For now the solution is to multiply the AQ_Delete service calls. I wanted to double check if that could be prevented.