[jBPM Users] - Re: [jbpm 4.2] Finding a Process Instance
by saraswati.santanu
Name of the command service and the id-generator are to be changed in 4.2. Yours is for 4.1. But you should have got exception at some other step because of these. This is a sample cfg file for 4.2
| <jbpm-configuration>
|
| <import resource="jbpm.businesscalendar.cfg.xml" />
| <import resource="jbpm.jpdl.cfg.xml" />
|
| <process-engine-context>
| <repository-service />
| <repository-cache />
| <execution-service />
| <history-service />
| <management-service />
| <task-service />
| <identity-service />
| <command-service name="txRequiredCommandService">
| <skip-interceptor />
| <retry-interceptor />
| <environment-interceptor />
| <standard-transaction-interceptor />
| </command-service>
|
| <hibernate-configuration>
| <cfg resource="jbpm.hibernate.cfg.xml" />
| </hibernate-configuration>
|
| <hibernate-session-factory />
|
| <object class="org.jbpm.pvm.internal.id.DatabaseDbidGenerator">
| <field name="commandService"><ref object="txRequiredCommandService" /></field>
| </object>
|
| <object class="org.jbpm.pvm.internal.id.DatabaseIdComposer" init="eager" />
|
| <script-manager default-expression-language="juel" default-script-language="juel">
| <script-language name="juel" factory="org.jbpm.pvm.internal.script.JuelScriptEngineFactory" />
| </script-manager>
|
| <job-executor auto-start="false" />
|
| <types resource="jbpm.variable.types.xml" />
| </process-engine-context>
|
| <transaction-context>
| <repository-session/>
| <db-session/>
|
| <message-session/>
| <timer-session/>
| <hibernate-session current="true"/>
| </transaction-context>
|
| </jbpm-configuration>
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269842#4269842
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269842
16 years, 3 months
[jBPM Users] - Re: [jbpm 4.2] Finding a Process Instance
by mike_burton
Thanks for your reply. <environment-interceptor /> is specified in jbpm.cfg.xml. Here is my complete configuration.
<jbpm-configuration>
<process-engine-context>
<repository-service />
<repository-cache />
<execution-service />
<history-service />
<management-service />
<identity-service />
<task-service />
<command-service>
<retry-interceptor />
<environment-interceptor />
</command-service>
<hibernate-configuration>
</hibernate-configuration>
<hibernate-session-factory />
<script-manager default-expression-language="juel"
default-script-language="juel">
<script-language name="juel" factory="org.jbpm.pvm.internal.script.JuelScriptEngineFactory" />
</script-manager>
<id-generator />
<address-resolver />
</process-engine-context>
<transaction-context>
<repository-session />
<db-session />
<message-session />
<timer-session />
<history-session />
</transaction-context>
</jbpm-configuration>
Please suggest me if something wrong in this configuration.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269835#4269835
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269835
16 years, 3 months
[jBPM Users] - Re: How a pass signal from state a task or java?? I do not u
by cmjhingeniero
Thanks for answering
I want that when "response" comes in N get out of the event and pass the task, "hello". The variable "response" is filled with
| response = reposicion.verificarCarguePorReposicion(documento, caf); //RETURN N or S
|
I this error when I go out the signal executionService.signalExecutionById (execution.getId ());
When I remove executionService.signalExecutionById (execution.getId ()); I stay in an endless cycle that never goes to the next task
| public void notify(EventListenerExecution executionListener) throws Exception {
| String response = executionListener.getVariable("response")+"";
| if (response.equals(null)) {
| response = new String();
| executionListener.setVariable("response", response);
| }
| ReposicionDao reposicion = new ReposicionDao();
| response = reposicion.verificarCarguePorReposicion(documento, caf); //RETURN N or S
| if (processEngine == null) {
| processEngine = Configuration.getProcessEngine();
| executionService = processEngine.getExecutionService();
| }
| ProcessInstance processInstance = executionService.findProcessInstanceById(executionListener.getId
| ());
| Execution execution = processInstance.findActiveExecutionIn("verify");
| System.out.println("===>"+execution.getId());
| //WHEN response IS EQUAL TO N I MOVE TO ANOTHER TASK AND GET OUT OF THE TIMER
| if(executionListener.getVariable("response").toString().equals("N")){
| processInstance = executionService.signalExecutionById(execution.getId());
| }
| }
|
I hope having explained
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269789#4269789
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269789
16 years, 3 months
[jBPM Users] - Re: Entity variable
by juanignaciosl
Neat. As I read at the documentation it's likely that I should be able to save as an Hibernate entity, but Serializable is good enough for the time being.
Nevertheless, when I make it Serializable it gets stored but it can't be loaded, taskService.getVariables throws the following exception:
| org.jbpm.api.JbpmException: couldn't deserialize object
| (...)
| org.jbpm.api.JbpmException: couldn't deserialize object
| Caused by: java.lang.ClassNotFoundException
|
I'm trying to deploy the .class file inside a .bar or .jar together with the jpdl and deploying it with createDeployment() .addResourcesFromZipInputStream(zip), but the class won't get deployed.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269744#4269744
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269744
16 years, 4 months