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

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

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: jBPM 4.3
    • Fix Version/s: jBPM 4.4
    • Component/s: None
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      attached test case

      Show
      attached test case
    • Workaround:
      Workaround Exists
    • Workaround Description:
      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.
    • Estimated Difficulty:
      Low

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  swiderski.maciej Maciej Swiderski
                  Reporter:
                  swiderski.maciej Maciej Swiderski
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: