Discussion:
[jboss-user] [jBPM] - How to build package in Guvnor with JBPM process that use user data types ?
Anatoliy Kalenskiy
2012-08-20 15:43:40 UTC
Permalink
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" >
      <script>          
               try { 
                     ((StepAction)(actions.get("1StepAction"))).executeStepAction((Step)step);  }
               catch (Exception e) {
                         System.out.println("Exception  1StepAction: "+e);
               }
         </script>
</scriptTask>
...
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
[https://community.jboss.org/message/754591#754591]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Maciej Swiderski
2012-08-21 06:39:53 UTC
Permalink
Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion

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

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

--------------------------------------------------------------
you should upload it into guvnor as POJO model jar so guvnor can access it too while building. http://docs.jboss.org/drools/release/5.2.0.Final/drools-guvnor-docs/html/ch05.html Here you can find bit more details about it.

HTH
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/754687#754687]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Anatoliy Kalenskiy
2012-08-21 12:32:05 UTC
Permalink
Anatoliy Kalenskiy [https://community.jboss.org/people/cybiks] created the discussion

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

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

--------------------------------------------------------------
Sorry it is not what I need - I need not (or not only) a POJO model but with some interfaces in it like StepAction .
I tried as you propose and got :
Loading Image... http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/clear.cache.gif
Error: Unable to upload the file.

Sorry, I am completely new guy in Guvnor topic and possible this error connected with some configuration problem.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/754795#754795]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Maciej Swiderski
2012-08-21 15:07:58 UTC
Permalink
Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion

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

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

--------------------------------------------------------------
any errors in server log? Maybe your jar/model has some dependencies that must be uploaded as well?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/754863#754863]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Shailendra T
2013-04-02 15:07:21 UTC
Permalink
Shailendra T [https://community.jboss.org/people/stangirala] created the discussion

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

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

--------------------------------------------------------------
Hi,

Can anyone answer, how to add external jar dependencies to a process? I am able to build and run process in eclipse fine. When I try to build the process, it fails in process compile, due the fact, it doesnt find these external jars files.
I tried adding them to dependency directory and did install.demo to add these jars to the guvnor server console jar file and I can see the jars in WEB-INF/lib directory... Not sure what else I need to do... Can anybody tell?

Error is below:

| | defaultPackage | http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/clear.cache.gif (http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/clear.cache.gif) | Error importing : 'org.odata4j.consumer.behaviors.OClientBehaviors' | Open |
| | defaultPackage | http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/clear.cache.gif (http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/clear.cache.gif) | Error importing : 'org.odata4j.edm.EdmType' | Open |
| | defaultPackage | http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/clear.cache.gif (http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/clear.cache.gif) | Error importing : 'org.odata4j.jersey.consumer.ODataJerseyConsumer' | Open |
| | defaultPackage | http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/clear.cache.gif (http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/clear.cache.gif) | Error importing : 'org.odata4j.consumer.ODataConsumers' | Open |
| | defaultPackage | http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/clear.cache.gif (http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/clear.cache.gif) | Error importing : 'org.odata4j.core.OQueryRequest' | Open |
| | defaultPackage | http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/clear.cache.gif (http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/clear.cache.gif) | Error importing : 'org.odata4j.format.FormatType' | Open |
| | defaultPackage | http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/clear.cache.gif (http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/clear.cache.gif) | Error importing : 'org.odata4j.consumer.ODataConsumer' | Open |
| | defaultPackage | http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/clear.cache.gif (http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/clear.cache.gif) | Error importing : 'org.odata4j.core.OEntity' | Open |
| | defaultPackage | http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/clear.cache.gif (http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/clear.cache.gif) | Error importing : 'org.odata4j.core.OProperty' | Open |


Regards,
Shailendra
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/806038#806038]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Loading...