Specifying a Reinitialization Method for State Variables

  1. Open the signature editor for the trigger, action, condition, or method you want to use as reinitialization method.

    Keep in mind that during code generation, any method body is replaced by code that initializes the state variables. If you use an existing trigger, action, condition, or method, the state machine behavior will change.

  2. In the Settings tab, activate the Reinitialize option.

    If another method is specified as reinitialization method, the following warning opens:

    There is already the method '<name>' marked as reinitialization method. The reinitialization definition for this method is going to be removed! Do you really want to set the flag here?

  3. Confirm with Set the flag to activate Reinitialize for the current method and deactivate the option for the method <name>.

    Note

    The Reinitialize option for the method <name> is deactivated immediately. It is not reactivated if you close the signature editor with Cancel.

  4. Make sure that the reinitialization method contains no return value.

  5. Close the signature editor with OK.

    When the reinitialization method is called, the Closedinitialization code is executed. This is the only way to reset the history variable.

See also

State Variables

Editing the Signature of a Method or Process

Settings Tab