-
1. Re: Why Uploading POJO model jar in Guvnor, case BPMN processes to exclude from list in jbpm-console? Problem!
mahdiiran Mar 28, 2012 3:03 AM (in response to mahdiiran)1 of 1 people found this helpfulHi again
I found prcoess does not list from /gwt-console-server/rs/process/definitions so the problem may be is in guvnor gwt REST Service! any idea?
-
2. Re: Why Uploading POJO model jar in Guvnor, case BPMN processes to exclude from list in jbpm-console? Problem!
stmarci Mar 28, 2012 8:22 AM (in response to mahdiiran)Unfortunately I encounter the very same problem, with no ideas or solutions so far..
-
3. Re: Why Uploading POJO model jar in Guvnor, case BPMN processes to exclude from list in jbpm-console? Problem!
stmarci Mar 29, 2012 10:39 AM (in response to stmarci)I found out the solution: you need to add the model jar into the WEB-INF/lib directory of gwt-console-server.war.
See the solution in my discussion: https://community.jboss.org/message/726120
-
4. Re: Why Uploading POJO model jar in Guvnor, case BPMN processes to exclude from list in jbpm-console? Problem!
mahdiiran Apr 3, 2012 12:52 AM (in response to mahdiiran)Thanks marton
You are at correct position, I am looking for a solution to dynamically load model in guvnor, without restarting the entire solution, or make some solution depend on some jars, do you try declarative fact model, or any guide line to make me at correct position to learn and use?
-
5. Re: Why Uploading POJO model jar in Guvnor, case BPMN processes to exclude from list in jbpm-console? Problem!
stmarci Apr 3, 2012 3:01 AM (in response to mahdiiran)1 of 1 people found this helpfulDear Mahdi,
You have the following options:
- you use guvnor to declare a declarative model using the web interface (Create New -> Declarative model).
You can then use this as an object in your process variables (Object type). The fields are accessed using getters and setters (auto generated). They use java beans notation, so for example if you have:
boolean readonly; -> boolean isReadonly(), void setReadonly(boolean)
String designatedName; -> String getDesignatedName(), void setDesignatedName()
The problem with this is that you might have a hard time using it outside the scope of the jBPM framework. I am using the REST interface of jBPM to access the variables of a process (/gwt-console-server/rs/process/instance/<instance number>/dataset) and I don't see a way to deserialize it into a Java object. This is the reason why I'm using the following:
- Upload a POJO model jar where you can declare your own classes. The problem with this is that the server side component of the jBPM console cannot deserialize the object and silently throws a RuntimeException which you cannot see in the logs.
You can circumvent this headache by exploding your jbpm-gwt-console-server.war (unzip into a directory with the same name with the .war extension like /opt/jbpm/<jboss version>/standalone/deployments/jbpm-gwt-console-server.war/). By doing this, the hot-deploy feature gets disabled so you need to create a file with 'touch' whenever you need to redeploy your applications.
In order to make jBPM work with your custom JAR you'll need to copy it into the above mentioned directory (jbpm-gwt-console-server) into the WEB-INF/lib directory. Once you are done with that, you signal jBoss to redeploy the application (int the deployments directory)
touch jbpm-gwt-console-server.war.dodeploy
Then navigate to jbpm-console in your browser and hit ctrl+r. After that you should be able to see your processes. Remember always use the same jar in guvnor and the console-server. Don't forget to build your package and setup your imports in guvnor.
If you have static classes, you might need to restart the entire jBPM framework (including jBoss), so I would suggest avoiding them in your models.
If you have further questions don't hesitate to contact me.
Best regards,
Márton
-
6. Re: Why Uploading POJO model jar in Guvnor, case BPMN processes to exclude from list in jbpm-console? Problem!
mahdiiran Apr 3, 2012 11:47 PM (in response to stmarci)Thank you very much