Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-2874

SubProcess not ended when signaling its state node from main process instance

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • jBPM 4.4
    • jBPM 4.3
    • None
    • None
    • Low
    • Workaround Exists
    • Hide

      Workaround for it is to use internal class (ExecutionImpl) to get hold of subProcessInstance and then call signal method using returned subProcessInstance. These way processes will work properly.

      Show
      Workaround for it is to use internal class (ExecutionImpl) to get hold of subProcessInstance and then call signal method using returned subProcessInstance. These way processes will work properly.
    • Hide

      attached test case

      Show
      attached test case

      There is a potential risk of wrong usage of sub process execution that seems like it was not tested.
      Please consider following scenario:

      • there are two processes (main and sub)
      • both of them have states somewhere in the execution
      • subprocess goes into wait state
      • user wants to signal it but there is no reference to it available via public API
      • user tries to signal using main process instance
      • no exception is thrown

      Potential misuse would be to call signal method using main process instance which will in fact move on with execution leaving unfinished sub process instance.

      Solution to this issue could be as follows:

      • expose method getSubProcessInstance on Execution (public API)
      • disable direct signal on sub process activity from the API when it is in active state
      • create an example and document it in user guide

      I have already tested that and it seems to work properly.
      If no objections, will finish with docs and examples and put it to repository.

              swiderski.maciej Maciej Swiderski (Inactive)
              swiderski.maciej Maciej Swiderski (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: