Hide Forgot
Help Desk Ticket Reference: https://c.na7.visual.force.com/apex/Case_View?id=500A0000006Hir2&sfdc.override=1 Steps to Reproduce: Based off example jBPM included in JBDS, run this as a JUnit: ********************************************************************************************************************** HashMap<String,Object> params = new HashMap<String, Object>(); params.put("AString", new String("AString_value")); params.put("AnotherString", new String("AnotherString_value")); // Extract a process definition from the processdefinition.xml file. ProcessDefinition processDefinition = ProcessDefinition.parseXmlResource("simple/processdefinition.xml"); // Create an instance of the process definition. ProcessInstance instance = new ProcessInstance(processDefinition, params); instance.getContextInstance().setVariable("userId", new String("userId_Value")); String var1 = (String)instance.getContextInstance().getVariables().get("userId"); assertEquals("Process Variable didn't match as expected", "userId_Value", var1); instance.setKey("MyKey"); // Uh-oh! This causes trouble String var2 = (String)instance.getContextInstance().getVariables().get("userId"); // same test that passed a moment ago... assertEquals("Process Variable didn't match as expected", "userId_Value", var2); ************************************************************************************************************************** Workaround: Workaround Exists Workaround Description: Don't set the key after instance construction. (Not usable for some legacy customers upgrading.) project_key: SOA Setting the key on a process instance causes variables to be mis-handled. See JUnit example in 'steps to reproduce' below.
Link: Added: This issue Cloned to SOA-3019
Link: Removed: This issue Cloned to JBPM-3171
Link: Added: This issue is a dependency of JBPM-3171
Workaround Description: Removed: Don't set the key after instance construction. (Not usable for some legacy customers upgrading.) Also, it is suspected that persisting the instance will alleviate the problem. This will be investigated. Added: Don't set the key after instance construction. (Not usable for some legacy customers upgrading.)
Link: Added: This issue is related to SOA-3030
Fixed in 3.2.11
Release Notes Docs Status: Added: Documented as Resolved Issue Writer: Added: dlesage Release Notes Text: Added: https://issues.jboss.org/browse/SOA-2914 Setting the key on process instances was causing instance variables to be misplaced. A code fix has now been applied so that variables are stored correctly.
Fixed in 3.2.11, included in SOA-P 5.2.