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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • 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

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: