JBoss Community

User defined class type process variables

created by Rahul Agrawal in jBPM - View the full discussion

Hi,

 

How to define the process variables that are the of some user defined java class.

 

For example, I have a java class Foo. I want to have a process variable that is Foo class type.

 

Does anyone has any idea how the process definition(.bpmn2 file) will look like?

 

 

<itemDefinition id="_numberItem" structureRef="Foo" />

 

  

  

<process processType="Private" isExecutable="true" name="BPMN_Process" id="BPMN_Process">

 

<!-- process variables -->

<property id="number" itemSubjectRef="_numberItem"/>

 

 

Unable to generate action invoker. : org.drools.lang.descr.ProcessDescr@497062

org/drools/bpmn2/Process_org_drools_bpmn2_BPMN_ProcessReturnValueEvaluator1Invoker.java (12:385) : Foo cannot be resolved to a type

 

 

Do I need to import something extra? If so, how to do that. Please help.

When I try to load this process definition using

 

kbuilder.add(ResourceFactory.newFileResource(process),

ResourceType.

BPMN2);

 

return kbuilder.newKnowledgeBase();

 

I get the following exception.#####

 

 

 

 

Reply to this message by going to Community

Start a new discussion in jBPM at Community