David Harris
2013-04-25 17:46:11 UTC
David Harris [https://community.jboss.org/people/dmwpepper] created the discussion
"XML error on process variable"
To view the discussion, visit: https://community.jboss.org/message/810374#810374
--------------------------------------------------------------
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?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/810374#810374]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
"XML error on process variable"
To view the discussion, visit: https://community.jboss.org/message/810374#810374
--------------------------------------------------------------
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?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/810374#810374]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]