OCLOperators stateMachineForceMode
No edit summary
No edit summary
Line 5: Line 5:
Calling object.StateMachineForceMode(theStateAttribute) gives you one free pass to set the StateAttribute string directly:
Calling object.StateMachineForceMode(theStateAttribute) gives you one free pass to set the StateAttribute string directly:


[https://www.capableobjects.com/2016/03/02/statemachines-forcing-your-arm-even-if-you-are-admin/ Explained in more detail here]
[[Statemachines forcing your hand even if you are admin|Explained in more detail here]]
  self.stateMachineForceMode(‘StateAttribute’);
  self.stateMachineForceMode(‘StateAttribute’);
  self.StateAttribute:=’StateOneThing′;
  self.StateAttribute:=’StateOneThing′;
  self.stateMachineForceMode(‘StateAttribute’);
  self.stateMachineForceMode(‘StateAttribute’);
  self.StateAttribute:=’StateSomething′
  self.StateAttribute:=’StateSomething′
[[Category:MDriven Designer]]
[[Category:MDriven Designer]]

Revision as of 21:36, 15 March 2020

stateMachine Force Mode.

StateMachines follow their rules. But sometimes when you change your model or find some bug you may find yourself in a situation where the current state of objects is wrong - and there is no legal way to get to the correct state. For this purpose we added the StateMachineForceMode operator - it is only intended to be used in a debugger or the like.

Calling object.StateMachineForceMode(theStateAttribute) gives you one free pass to set the StateAttribute string directly:

Explained in more detail here

self.stateMachineForceMode(‘StateAttribute’);
self.StateAttribute:=’StateOneThing′;
self.stateMachineForceMode(‘StateAttribute’);
self.StateAttribute:=’StateSomething′
This page was edited 93 days ago on 02/10/2024. What links here