[
https://jira.jboss.org/jira/browse/JBPM-1778?page=com.atlassian.jira.plug...
]
Thomas Diesler resolved JBPM-1778.
----------------------------------
Resolution: Done
[tdiesler@tddell core]$ mvn -o -Dtest=JBPM1778Test test
Running org.jbpm.jbpm1778.JBPM1778Test
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.354 sec
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)
Components: Core Engine
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:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira