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

wrong process definition is loaded for process receiving signal

XMLWordPrintable

    • NEW
    • NEW
    • Hide
      • we have deployed 4 projects - SignalReceive and SignalSend in two versions though processes within the individual versions have the same process ids
      • it is expected that signals are being sent between projects - that is not supported out of the box due to signals are scoped to ksession only
      • even though signals are scoped to ksession, ksession will fetch information from data base about process instances awaiting given signal
      • so there is process that waits for a signal called signalRef - SignalReceive version 2 so that information (signal name and process instance id - let's say it is signalRef and 12345 as process instance id) is stored in db
      • next SignalSend (version 1) sends the signal called signalRef
      • IMPORTANT: SignalSend does include process definition SendReceive with exact same process id as the one from version 2 that is actually waiting for a signal
      • since signal is sent via SignalSend process within project of version 1 it will use that ksession to send it - meaning that ksession will fetch information from db about instances waiting for given signal
      • and here is the issue - ksession finds that there is 12345 process instance waiting for that signal, so it tries to load it - and it is successful load - why is that? it's because ksession from SendSignal project version 1 includes process called SignalReceive so the process id of process instance 12345 is found and thus can be loaded, but that is not the expected process/deployment
        So this is certainly a bug as it should take into consideration deploymentId given process belongs to while loading and processing it.
      Show
      we have deployed 4 projects - SignalReceive and SignalSend in two versions though processes within the individual versions have the same process ids it is expected that signals are being sent between projects - that is not supported out of the box due to signals are scoped to ksession only even though signals are scoped to ksession, ksession will fetch information from data base about process instances awaiting given signal so there is process that waits for a signal called signalRef - SignalReceive version 2 so that information (signal name and process instance id - let's say it is signalRef and 12345 as process instance id) is stored in db next SignalSend (version 1) sends the signal called signalRef IMPORTANT: SignalSend does include process definition SendReceive with exact same process id as the one from version 2 that is actually waiting for a signal since signal is sent via SignalSend process within project of version 1 it will use that ksession to send it - meaning that ksession will fetch information from db about instances waiting for given signal and here is the issue - ksession finds that there is 12345 process instance waiting for that signal, so it tries to load it - and it is successful load - why is that? it's because ksession from SendSignal project version 1 includes process called SignalReceive so the process id of process instance 12345 is found and thus can be loaded, but that is not the expected process/deployment So this is certainly a bug as it should take into consideration deploymentId given process belongs to while loading and processing it.

      There are two processes: SendSignal and ReceiveSignal in the same project. They use intermediate throw and catch events.

      We create two project versions so we end up with four process versions: SendSignal v1, SendSignal v2, ReceiveSignal v1 and ReceiveSignal v2.

      From deployment v2 we start ReceiveSignal v2.
      From deployment v1 we start SendSignal v1.

      When the signal is sent to process ReceiveSignal v2 by SendSignal v1, ksession loads the process definition ReceiveSignal v1 instead of the correct process definition ReceiveSignal v2.

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

              Created:
              Updated:
              Resolved: