Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info
iconfalse
titleWhat is it for?

AQ_Instance_Create is used to create a new instance and directly set its attributes and relations. By default the instance is activated directly upon creation (before attributes and relations can be set).

Parameters

NameDescriptionTypeRequired
EntityThe type of the instance that should be createdModule Element - EntityTrue
Instance ActivationSelect whether the created instance is activated before or after setting the attributes and relations. The instance will remain activated after the service call, regardless of which value is chosen.

Enumeration

  • Before (default)
  • After
True
Attributes and RelationsAdd one line for each attribute or relation that you want to setLineFalse

Attribute/RelationSelect an attribute or relation of the entity selected aboveModule element - Attribute/RelationFalse

Value

Write an expression that results in a value for the selected attribute or relation

ExpressionFalse

This service executes all lines from top to bottom, so when setting InstanceActivationType to "Before" 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 subsequent line. Attributes and relation will be set in the order that you specify.

Examples

Create Job

Imagine a situation in which you want to create a new job instance, and place it in the Person.hasJobs relation. In this fictitious example we are only registering business engineers, and the job title should get this value. The service shown below will do all this within one service.

...

UI Text Box
typeinfo

If a person can have multiple jobs, then the above service will work. By adding setting the Job.BelongsToPerson relation, the Person.HasJobs relation will be updated by adding the instance to the existing job instances.

Copy Job

Imagine a situation in which you want to create a new job instance and use current active job instance to retrieve values from. In this fictitious example we are using the active job instance to retrieve values from and set them on the newly created job instance. The service shown below will do all this within one service.

...