Uploaded image for project: 'Commons SCXML'
  1. Commons SCXML
  2. SCXML-202

State machine running status must be kept and maintained by SCInstance across serialization and deserialization

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.0
    • 2.0
    • None

    Description

      As was discovered and reported by Francis Tenda on the commons users@ list, currently it isn't possible to serialize/de-serialize a state machine instance (SCInstance) without keeping hold on the (same) SCXMLExecutor and its embedded SCXMLExecutorContext.

      While the use-cases for re-creating a new SCXMLExecutor/SCXMLExecutorContext every time after deserializing an SCInstance might be limited, as you cannot have/keep running Invokers and will have to re-configure the Evaluator, Dispatcher, ErrorReporter as well as any SCXMLListeners every time then, it still should be possible.

      The problem is that the SCXMLExecutorContext currently manages the state machine running status and never get 'triggered' to set it (back) to running after re-attaching a SCInstance. With as effect that any subsequent firing of events will be ignored.

      The running status logically 'belongs' to the state machine itself, and thus it currently is wrongly managed.

      I'll fix this by moving this status property into SCInstance instead, which thereby should also fix the test example Francis Tenda provided on the list.

      Attachments

        Activity

          People

            ate Ate Douma
            ate Ate Douma
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: