]
Thomas Diesler reassigned JBPM-1778:
------------------------------------
Assignee: Thomas Diesler
Empty map variables on process creation is set as null
------------------------------------------------------
Key: JBPM-1778
URL:
https://jira.jboss.org/jira/browse/JBPM-1778
Project: JBoss jBPM
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: jBPM 3.2.3
Environment: JBoss 4.2.2.GA, Database HSQL, Ubuntu Linux
Reporter: Paco Avila
Assignee: Thomas Diesler
Fix For: jBPM 3.3.1 GA
If I create a ProcessInstances with an empty variables Map, it is set to null. But if I
put any value, I works fine. This below code show this behavior. Uncomment the
"vars.put("uno", "dos");" line to see it return a the right
map when it is not empty.
JbpmContext jbpmContext = JbpmConfiguration.getInstance().createJbpmContext();
try {
HashMap<String, String> vars = new HashMap<String, String>();
//vars.put("uno", "dos");
ProcessDefinition pd = ProcessDefinition.parseXmlString(
"<process-definition>" +
" <start-state>" +
" <transition to='s' />" +
" </start-state>" +
" <state name='s'>" +
" <transition to='end' />" +
" </state>" +
" <end-state name='end' />" +
"</process-definition>"
);
ProcessInstance pi = pd.createProcessInstance(vars);
TaskMgmtInstance tmi = pi.getTaskMgmtInstance();
tmi.createStartTaskInstance();
System.out.println("Created ProcessInstance Variables:
"+pi.getContextInstance().getVariables());
} catch (Exception e) {
e.printStackTrace();
} finally {
jbpmContext.close();
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: