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

WorkItem can't be linked to throwing Message Event which created it

    XMLWordPrintable

Details

    • Hide

      see description

      Show
      see description

    Description

      The WorkItem that is created by a Throwing Message Event and handed over to the executeWorkItem method of a Send Task handler contains no information that links it to the Throwing Message Event Node. Usually we are facing WorkItemNodeInstances which can directly be linked as they contain the WorkItem. In case of the Throwing Message Event we only have the work item name "Send Task" as an indicator, but this could still belong to a "real" Send Task or to a different Throwing Message Event.

      I guess there would be multiple approaches of fixing this. One way seems to be suggested in JBPM-3232 (although I haven't checked its code changes). Another option would be to adjust the code of handleMessageNode of IntermediateThrowEventHandler so that information about the Throwing Message Event are handed to the WorkItem as a parameter or to hand the ActionNodeInstance the WorkItemId.

      The motivation for this issue is that
      a) we want to be able to determine where we are within the process and
      b) we would like to access process variables from within the WorkItemHandler as we are only able to map a single variable to a Throwing Message Event. We would now like to simply use getProcessVariable of the ActionNodeInstance which we can get by browsing the active nodes. However when we are not able to link the ActionNode with certainty to the WorkItem this approach isn't reliable.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: