Skip to content

AQL Examples ​

Hint

The AQL expressions in the examples listed below contain line-breaks. These are not necessary, they are just used to improve the readability of the examples.

Example 1 ​

List all the objects "Request accepted?", "Work on request" and "Take holiday request" of a model:

{"Request accepted?","Work on request","Take holiday request"}

Example 2 ​

List all the objects "Request accepted?", "Work on request" of the model "Holiday request":

{"Request accepted?":"Holiday request":"Dynamic model","Work on request":"Holiday request":"Dynamic model"}

Example 3 ​

List all the activities of a Dynamic model:

<"Activity">

Example 4 ​

List all the activities of the model "Holiday request":

<"Activity":"Holiday request":"Dynamic model">

Example 5 ​

List all the roles of a Static model:

<"Role">

Example 6 ​

List all the roles of the performer "Maier":

{"Maier"}->"Has role"

Example 7 ​

List all the performers who belong to the organisational unit "Distribution":

{"Distibution"}<-"Belongs to"

Example 8 ​

List all the performers who have the role "Clerk":

{"Clerk"}<-"Has role"

Example 9 ​

Display the whole organisation (i.e. all the organisational units), if it is hierarchically structured and if the organisational unit "Management" is in the upper hierarchy level:

{"Management"}<<-"is subordinated"

Example 10 ​

List all the objects within a Dynamic model which are connected with the relation "Subsequent":

<"End"><<-"Subsequent"

Example 11 ​

List all the objects of the class Activity within a Dynamic model which are connected with the relation "Subsequent":

<"End"><<-"Subsequent" >"Activity"<

Example 12 ​

List all the performers who belong to the organisational unit "Distribution" or an organisational unit subordinated to the distribution:

({"Distribution"}->>"Is subordinated") <- "Belongs to"

Example 13 ​

List all the connectors of the class "subsequent" within a Dynamic model which start from objects of the class "Decision":

<"Decision"> -><"Subsequent">

Example 14 ​

List all the connectors of the class "Has role" of a Static model which lead to the role "Clerk":

{"Clerk"} <- <"has role">

Example 15 ​

During the simulation, the activity "Write letter" should be carried out by the same performer, which has executed the activity "Fill form". Enter the following in the attribute "Performer" of the activity "Write letter":

Has done "Fill form"

Example 16 ​

Example of a variable reference

During the simulation, the activity "Control" should be done by different performers depending on the variables "Credit level": 1. for a credit level above 500.000 by the manager of the organisational unit "Credit department", 2. for a credit level under or equal to 500.000 by performers with the role "Clerk".

Enter the following AQL expression for Activity attribute "Performer" of the Activity "Control":

(({"Clerk"} <- "Has role")\[!"Credit level" <= 500000\]) OR(({"Credit department"} <- "Is manager")\[!"Credit level" > 500000\])

Example 17 ​

List all the activities with execution time of five minutes:

<"Activity">\[?"execution time" like "00:000:00:05:00"\]

Example 18 ​

List all the activities for which the attribute "Description" contains no entry:

<"Activity">\[?"Description" like ""\]

Example 19 ​

List all the variables that contain the variable type "Float":

<"Variable">\[?"Variable type" like "Float"\]

or:

<"Variable">\[?"Variable type" like "F\*"\]

Since the attribute variable type can only be assigned with "Float" or "Enumeration", the first letter is enough for the entry.

Example 20 ​

List all the activities which are carried out by clerks and for which the activity costs are at least 10:

(<"Activity">\[?"Performer" like "\*Clerk\*"\]) AND (<"Activity">\[?"Costs" >= 10\])

Only the activities which are carried out by performers who contain the text "Clerk" in exactly this spelling in the role description. "*clerk*" will not work for this query!

Example 21 ​

List all the objects of the class "Process start", which have entered the value "Major responsible" in any table row of the record attribute "Process ownership" in the attribute "Classification":

<"Process start">\[?"Process ownership"\]\[?"Classification" = "Major responsible"\]

Example 22 ​

List all the performers with the role "Clerk" who do not belong to the organisational unit "Distribution":

({"Clerk"}<-"Has role") DIFF({"Distribution"}<-"Belongs to")

Example 23 ​

List all the performers of a Static model:

<"Performer">

Example 24 ​

List all the roles of the performers "Maier", "Sommer" and "Winter":

{"Maier", "Sommer", "Winter"} -> "Has role"

Example 25 ​

List all the oganisational units which are managed by Mr. M�ller:

{"Maier"} -> "Is manager"

Example 26 ​

List all the organisational units, for which the organisational unit "Department" is subordinated:

{"Department"} -> "Is subordinated"

Example 27 ​

List all the managers of the organisational unit "Department":

<"Department"> <- "Is manager"

Example 28 ​

List all the employees who have a role:

<"Role"> <- "Has role"

Example 29 ​

List all the performers who have the role "Clerk" and belong to the organisational unit "Department":

({"Clerk"} <- "Has role") AND({"Department"} <- "Belongs to")

Example 30 ​

List all the performers who have the role "Clerk" and belong to the organisational unit "Org" or who are managers of the organisational unit "Org":

(({"Clerk"} <- "Has role") AND({"Org"} <- "Belongs to")) OR({"Org"} <- "Is manager")

Example 31 ​

List of all the performers whose name starts with "M" and who's hourly wages are not higher than 20:

(<"Performer">\[?"Name" like "M\*"\]) AND(<"Performer">\[?"Hourly wages" <= 20\])

Example 32 ​

List all the organisational units and roles which have the entry "Test" in the attribute "Description":

(<"Organizational unit"> OR<"Role">)\[?"Description" = "Test"\]

Example 33 ​

List all the performers whose name contains six letters and the fifth letter is an "e":

<"Performer">\[?"Name" like "????e?"\]

Example 34 ​

List all the performers who have the role "Clerk" and belong to the organisational unit "Org" or who are manager of the organisational unit "Org", less the performers who have the role "Secretary" or who are manager of this organisational unit:

((({"Performer"} <- "Has role") AND({"Org"} <- "Belongs to")) OR({"Org"} <- "Is manager")) DIFF(({"Secretary"} <- "Has role") OR({"Org"} <- "Is manager"))

Example 35 ​

During the simulation, the Activity "Write letter" must be carried out by the performer who has executed the Activity "Fill form". In the attribute "Done by" of the Activity "Fill form", define e.g. the variable "Maier". In the Activity "Write letter", enter the following expression in the performer assignment:

Done by "Maier"

Example 36 ​

To carry out the current activity, the resource defined in the Static, e.g. a colour printer, must be used. For this Activity enter the following AQL expression in the resource assignment:

{"colour printer"}

Example 37 ​

The performer who carries out the current activity must use the reources that are assigned to him, e.g. his PC. Enter the following AQL expression in the resource assignement of this Activity:

Current performer -> "Uses resource"

Example 38 ​

All the Dynamic models which have been changed up to the 1st January 2001.

<"Dynamic model">\[?"Last change on" like "01.01.2001\*"\]

Example 39 ​

All objects of the class "Organizational unit" which are refered to in aDynamic model.

<"Activity"> --> "ORG unit"

Example 40 ​

All the objects which refer to an object of the class "Role".

<"Role"> <--

Example 41 ​

All the performers who are working at least 3 days a week. (The attribute "Days per week" is defined in the attribute profile attribute "Presence" .)

<"Perfomer"> \[?"Presence"\]\[?"Days per week" >= 3\]

Example 42 ​

List all objects of a model:

<"">