I have a basic .java file that passes in a parameter:
package com.sample.quickstarts;
import java.util.HashMap;
import java.util.Map;
import org.drools.runtime.StatefulKnowledgeSession;
import org.drools.runtime.process.ProcessInstance;
import org.jbpm.test.JbpmJUnitTestCase;
import org.junit.Test;
public class JavaServiceQuickstartTest extends JbpmJUnitTestCase{
@Test
public void testProcess () {
StatefulKnowledgeSession ksession = createKnowledgeSession("sample.bpmn2");
Map<String, Object> params = new HashMap<String, Object>();
params.put("person", new Person("krisv"));
ksession.startProcess("com.sample.bpmn2.hello", params);
}
}
In the .bpmn2 properties area, I added a Person object for the parameter I'm passing ('params.put("person", new Person("krisv"));')
When I execute the process, I get the following:
0 25/04 13:36:17,316[main] ERROR drools.xml.ExtensibleXmlParser.error - (null: 15, 54): cvc-datatype-valid.1.2.1: '' is not
a valid value for 'QName'.
0 25/04 13:36:17,316[main] ERROR drools.xml.ExtensibleXmlParser.error - (null: 15, 54): cvc-attribute.3: The value '' of
attribute 'structureRef' on element 'itemDefinition' is not valid with respect to its type, 'QName'.
person: krisv
I expected 'person:krisv'. Why is there a drools xml error and how can I get rid off it?