Uploaded image for project: 'MINA'
  1. MINA
  2. DIRMINA-847

Entry and Exit action support for Mina state machine

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.4
    • Fix Version/s: 2.0.5
    • Component/s: Statemachine
    • Labels:
      None

      Description

      In some situations it is much easier if you can execute an action when you enter to or exit from a certain state regardless of which transition has caused it.
      else you have to repeat the behavior in each entering or exiting transition.

      Here some more information could be found:
      http://en.wikipedia.org/wiki/UML_state_machine#Entry_and_exit_actions

      here is a sample usage:

      @onEntry(LOADED )
      public void onEntryStart() {
      System.out.println("On Start Entry");
      }

      @onExit(LOADED)
      public void onEntryExit() {
      System.out.println("On Start Exit");
      }

      I attach a candidate implementation.

        Attachments

        1. onEntryExitPatch.diff.gz
          6 kB
          Saeid Mirzaei
        2. onEntryExitPatch.tar.gz
          10 kB
          Saeid Mirzaei
        3. onEntryExitPatch.tar.gz
          10 kB
          Saeid Mirzaei

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              smirzai Saeid Mirzaei
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 10h
                10h
                Remaining:
                Remaining Estimate - 10h
                10h
                Logged:
                Time Spent - Not Specified
                Not Specified