AQL functions for state of INSTRUCTION and ACTIVITY

Description

Applications need to query for INSTRUCTION and ACTIVITY in a given state. To simplify this recurrent task we will introduce two functions for this:

instruction-aggregate-state(instruction_identifier)

  • Returns the aggregated state of the given INSTRUCTION as a String

current-state(activity_identifier)

  • Returns the current state of the given ACTIVITY as a String

Some examples are:

SELECT i
FROM INSTRUCTION i
WHERE instruction-aggregate-state = 'ACTIVE'

SELECT ac
FROM INSTRUCTION i CONTAINS ACTIVITY ac
WHERE current-state(ac) = 'ACTIVE'

Reporter

Bjørn Næss

Raised By

Bjørn Næss

Components

Affects versions

Configure