TopLogic-Script

By means of the proprietary script language TopLogic-Script, calculations can be performed as part of the modeling. Calculation is relatively broadly defined. Numerical calculations can be mapped as well as text or date operations. Most importantly, however, is the ability to easily and quickly access model content.

Before we get to the coding, let's briefly review the naming conventions of TopLogic:

From the technical name and the module name, a fully qualified name is formed on the part of the system according to the following rule.

For technical objects: <technical module name>:<technical subject object name>.

For their properties: <technical module name>:<technical subject object name>#<technical attribute or reference name>.

Important: the fully qualified technical names of the object types whose instances are to be read are always enclosed with the `` characters.

We can now enter the following codes as a condition on the gateway links:

Name of the link Condition
Demand necessary

process -> $process.get(`MyEntities:Ticket#hasSolutionStatus`) == `MyEntities:SolutionStatus#unsolved`

Change implemented

process -> $process.get(`MyEntities:Ticket#hasSolutionStatus`) == `MyEntities:SolutionStatus#solved`

Error detected, rework necessary

process -> $process.get(`MyEntities:Ticket#testPassed`) == `tl5.enum:tl.yesno#tl.no`

Change OK, close ticket

process -> $process.get(`MyEntities:Ticket#testPassed`)== `tl5.enum:tl.yesno#tl.yes`

Explanation using the example of process -> $process.get(`MyEntities:Ticket#hasSolutionStatus`) == `MyEntities:State#Solved`:

  • process declares the variable we are working with here.
  • Through $process the variable is accessed.
  • .get tells the system that it should read from the model.
  • What is to be read is in the parenthesis. Important: the fully qualified expressions are always enclosed in backticks ``. Here, the value of the "has solution status" is read from the ticket and checked whether this corresponds to the value "solved" (technical name: MyEntities:SolutionStatus#solved) or not.