[jboss-user] [jBPM] - How to build package in Guvnor with JBPM process that use user data types ?

Anatoliy Kalenskiy do-not-reply at jboss.com
Mon Aug 20 11:43:40 EDT 2012

Anatoliy Kalenskiy [https://community.jboss.org/people/cybiks] created the discussion

"How to build package in Guvnor with JBPM process that use user data types ?"

To view the discussion, visit: https://community.jboss.org/message/754591#754591

I have business process described in bpmn file. It has scriptTasks that use some project types.

<itemDefinition id="_stepItem" structureRef="project.model.Step" />
<itemDefinition id="_actionsItem" structureRef="java.util.Map" />

<process processType="Private" isExecutable="true" id="com.sample.id" name="EXAMPLE" tns:packageName="defaultPackage" tns:version="1" >
|  | <extensionElements> |
|   | <tns:import name="project.model.StepAction" /> |
|   | <tns:import name="project.model.Step" /> |
|  | </extensionElements> |
<!-- process variables -->
    <property id="step" itemSubjectRef="_stepItem"/>
    <property id="actions" itemSubjectRef="_actionsItem"/>

<scriptTask id="_2" name="1FakedStepAction" scriptFormat=" http://www.java.com/java http://www.java.com/java" >
               try {  
                     ((StepAction)(actions.get("1StepAction"))).executeStepAction((Step)step);  }
               catch (Exception e) {
                         System.out.println("Exception  1StepAction: "+e);
In Java code I put 
Map<String, Object> params = new HashMap<String, Object>();
params.put("step", <some real instance of Step>);
params.put("actions", <some actions map like 1StepAction -> real instance of StepAction>);
ksession.startProcess("com.sample.id", params)

It works fine when I put such file in class path and spring configuration uploads it from this file. I put it to Guvnor. And application successfully load such process from it and run.
But when I try to build package in Guvnor with such process it complains :

Unable to generate action invoker. project.model.Step cannot be resolved to a type

Process Compilation error project.model.Step cannot be resolved to a type
 StepActioncannot be resolved to a type

So, how Guvnor can access to my types deployed in my project? Is it possible?

Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120820/306aed5a/attachment.html 

More information about the jboss-user mailing list