Skip to content

flow: add ELSE clause to rules #116

@jorgegv

Description

@jorgegv
  • Add ELSE clauses to flow rules, to specify actions that are executed if any of the CHECK conditions are not met.
  • More than one ELSE clause can be specified, the same as DO clauses.
  • All DO clauses are executed when all of the CHECK conditions are met.
  • All ELSE clauses are executed when any of the CHECK conditions are not met.

That is, the conditional (CHECK) parts of the rule are executed as AND conditions, and the action (DO, ELSE) parts of the rule are lists of actions to run in each case.

Example:

BEGIN_RULE
  SCREEN Screen01
  WHEN    ENTER_SCREEN
  CHECK   SCREEN_FLAG 0x01
  CHECK   USER_FLAG 0x02
  DO      DISABLE_BTILE BlackBtile
  ELSE    ENABLE_BTILE BlackBtile
END_RULE

In this example, BlackBtile will be disabled only if SCREEN_FLAG is 0x01 and USER_FLAG is 0x02. And it will be enabled if SCREEN_FLAG is not 0x01 or USER_FLAG is not 0x02.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions