Bug 1248451

Summary: PerProcessInstanceRuntimeManager should not issue a WARN message for process start commands
Product: [Retired] JBoss BPMS Platform 6 Reporter: Martin Weiler <mweiler>
Component: jBPM CoreAssignee: Alessandro Lazarotti <alazarot>
Status: CLOSED EOL QA Contact: Karel Suta <ksuta>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1.0CC: kverlaen
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 20:10:37 UTC Type: Enhancement
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Martin Weiler 2015-07-30 10:35:48 UTC
Description of problem:
The following WARN message is emitted when a process (deployed with process instance strategy) is started with correlation key:

WARN  [org.jbpm.runtime.manager.impl.PerProcessInstanceRuntimeManager]
(http-localhost/127.0.0.1:8080-3) ProcessInstanceIdContext or
CorrelationKeyContext shall be used when interacting with
PerProcessInstance runtime manager 

As per a discussion with Marco:

"This is normal and "logical": when you _start_ a new process, there is no ProcessInstanceId- or CorrelationKeyContext yet! 

To be slightly more specific: when using a PerProcessInstanceRuntimeManager, the context is created when (after) the process instance is created. 

The problem is that in order to not have that message at that particular time, we also need to know which command is being executed: in particular, we need to know whether or not a process instance is being created or not.

The message _should_ be produced if there is already an existing process instance related to the operation ("abort process instance" or "signal process instance", for example)."


Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
1. Create a simple process, deploy it with process instance strategy
2. Using REST command, start the process with correlation key:

<?xml version="1.0" encoding="UTF-8"?>
<command-request>
   <deployment-id>org.redhat.gss:CorrelationKeyReproducer:1.0</deployment-id>
   <ver>6.2.0.1</ver>
   <start-correlated-process processId="testWithKey">
      <correlation-key>Anton,value0</correlation-key>
     
   </start-correlated-process>
</command-request>


Actual results:
Process is started, WARN message is printed

Expected results:
Process is started, no further WARN message


Additional info: