Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Until a value is first assigned to an entity variable in a rule postlude, the value of the variable will be null. There are various techniques which can be used to deal with this issue.

The defaultsTo operator

The defaultsTo operator can provide a default value when an entity variable is used in a read-only context. For example, suppose ent:owners will be a map, but might not have been initialized. This code checks the map for a specific key.

...