You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Object node values can evaluate to NULL. This value symbolizes a non-valid value of an object. For example, if a boolean value could not be calculated since an error occurred during its calculation, it might be set to NULL indicating that it is not known whether the correct value is true or false.

Another application of NULL values is undefined class attributes and associations. If an object is created of a class containing attributes that do not have initial values, these attributes are set to NULL. Using the boolean operation exists() allows to test whether attributes or associations exist.

aParameter.exists()

As an alternative, you may also use logical operators to check for NULL values, for instance within a condition() statement:

 set s = condition (b1 != NULL, "abc", "xyz");

EAL expressions may also return NULL. You can verify if operations, which explicitly can return NULL values, are doing so also by using logical operators. If you implement decisions, you could add the following conditional statement in the guard section of a transition specification:

 aParameterString.findString("LanguageFlag") != NULL;

Runtime before 2018.4 Accessing an attribute of a NULL object is not rejected.
Runtime 2018.4 Accessing an attribute of a NULL object will cause the xUML Runtime to throw an exception.
Runtime 2018.5 Accessing an attribute of a NULL object will cause the xUML Runtime to log an error to the xUML Service Standard Log.
Runtime 2018.10 Accessing an attribute of a NULL object will cause the xUML Runtime to log an error to the xUML Service Standard Log only, if the service is re-compiled with a recent compiler.

  • No labels