-
-
Notifications
You must be signed in to change notification settings - Fork 12
Implementation Role Feature 6
Max Leuthäuser edited this page Nov 18, 2021
·
6 revisions
The sequence of role acquisition and removal may be restricted
E.g. you are only allowed to be a voter if you are not a prisoner (in some countries).
There is no direct support in SCROLL for this. Of course you can implement your own business-related rules as plain Scala code between role acquiring and removal.
SCROLL supports defining your own sequences of role acquisition and removal through the usage of finite state machines. Have a look at the RolePlayingAutomaton and the corresponding RolePlayingAutomatonTest.