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

onentry and onexit child elements of parallel do not have parent

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.6
    • 0.7
    • None
    • Windows and linux

    Description

      Expanded the provide test case transitions-01.xml to include as childern of the element <parallel id="thirties_parallel">:

      <onentry>
      <log expr="'Entering thirties_parallel'"/>
      </onentry>
      <onexit>
      <log expr="'Exiting thirties_parallel'"/>
      </onexit>

      Running the test case will now result in NPE when attempting the log action.

      java.lang.NullPointerException
      at org.apache.commons.scxml.model.Action.getParentState(Action.java:115)
      at org.apache.commons.scxml.model.Log.execute(Log.java:102)
      at org.apache.commons.scxml.semantics.SCXMLSemanticsImpl.executeActions(SCXMLSemanticsImpl.java:229)
      at org.apache.commons.scxml.SCXMLExecutor.triggerEvents(SCXMLExecutor.java:131)
      at org.apache.commons.scxml.SCXMLTestHelper.fireEvent(SCXMLTestHelper.java:197)
      at controller.Transitions01Test.testSCXMLExecutorTransitions01Sample(Transitions01Test.java:58)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at junit.framework.TestCase.runTest(TestCase.java:154)
      at junit.framework.TestCase.runBare(TestCase.java:127)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:118)
      at junit.framework.TestSuite.runTest(TestSuite.java:208)
      at junit.framework.TestSuite.run(TestSuite.java:203)
      at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

      because the parent of on OnEntry and OnExit objects is null.

      Attachments

        Activity

          People

            Unassigned Unassigned
            cookiesj Dennis Cook
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: