Re: [jboss-user] [jBPM] - [JBPM 4] Process variable
by Dan Mihai Ile
Dan Mihai Ile [http://community.jboss.org/people/mihai007] replied to the discussion
"[JBPM 4] Process variable"
To view the discussion, visit: http://community.jboss.org/message/543150#543150
--------------------------------------------------------------
Hello.
my problem I think is related as the suggestion here, I am unable to create a custom variable:
I edited the jbpm.variable.types.xml and added my class (basically just pointed the serializable line to my class which is a exact copy of the BlobVariable)
But even so it says:
org.hibernate.HibernateException: instance not of expected entity type: org.jbpm.pvm.internal.type.variable.Blob64Variable is not a: org.jbpm.pvm.internal.type.Variable
at org.hibernate.persister.entity.AbstractEntityPersister.getSubclassEntityPersister(AbstractEntityPersister.java:3663)
at org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1374)
at org.hibernate.engine.ForeignKeys.isTransient(ForeignKeys.java:203)
at org.hibernate.event.def.AbstractSaveEventListener.getEntityState(AbstractSaveEventListener.java:535)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:103)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:534)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:526)
at org.hibernate.engine.CascadingAction$5.cascade(CascadingAction.java:241)
at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:291)
at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:239)
at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:192)
at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:319)
at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:265)
at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:242)
at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:192)
at org.hibernate.engine.Cascade.cascade(Cascade.java:153)
at org.hibernate.event.def.AbstractFlushingEventListener.cascadeOnFlush(AbstractFlushingEventListener.java:154)
at org.hibernate.event.def.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:145)
at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:88)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:49)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)
at org.jbpm.pvm.internal.tx.HibernateSessionResource.prepare(HibernateSessionResource.java:56)
at org.jbpm.pvm.internal.tx.StandardTransaction.commit(StandardTransaction.java:107)
at org.jbpm.pvm.internal.tx.StandardTransaction.complete(StandardTransaction.java:64)
at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:61)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
at org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)
at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.setVariable(ExecutionServiceImpl.java:145)
at expediente_generico.test.TestExpedienteAssincrono3.testNoSubProcess(TestExpedienteAssincrono3.java:41)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:164)
at org.jbpm.test.BaseJbpmTestCase.runTest(BaseJbpmTestCase.java:80)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Iam using v4.3, If I made exact copy of the BlobVariable, how come it does not work?
(I also teste extending BlobVariable instead of directly Variable, but still no success)
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/543150#543150]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 11 months
Re: [jboss-user] [jBPM] - jBPM 4.3, Spring 2.5, Oracle, start process, process instance have a null id
by Topiltzin Dominguez
Topiltzin Dominguez [http://community.jboss.org/people/topiltzin] replied to the discussion
"jBPM 4.3, Spring 2.5, Oracle, start process, process instance have a null id"
To view the discussion, visit: http://community.jboss.org/message/543134#543134
--------------------------------------------------------------
Excellent, I was trying to solve this 2 days ago, thanks!!!
As you said, I just add: *<object class="org.jbpm.pvm.internal.id.DatabaseIdComposer" init="eager" />*
to my *jbpm.cfg.xml* file
Here is the configuration:
<?xml version="1.0" encoding="UTF-8"?><jbpm-configuration> <import resource="jbpm.jpdl.cfg.xml" /> <import resource="jbpm.identity.cfg.xml" /> <process-engine-context> <repository-service /> <repository-cache /> <execution-service /> <history-service /> <management-service /> <identity-service /> <task-service />
<object class="org.jbpm.pvm.internal.id.DatabaseIdComposer" init="eager" /> <command-service name="txRequiredCommandService"> <retry-interceptor /> <environment-interceptor /> <spring-transaction-interceptor /> </command-service> <script-manager default-expression-language="juel" default-script-language="juel" read-contexts="execution, environment, process-engine, spring" write-context=""> <script-language name="juel" factory="org.jbpm.pvm.internal.script.JuelScriptEngineFactory" /> </script-manager> <authentication /> <id-generator /> <types resource="jbpm.variable.types.xml" /> <address-resolver /> <business-calendar> <monday hours="9:00-12:00 and 12:30-17:00" /> <tuesday hours="9:00-12:00 and 12:30-17:00" /> <wednesday hours="9:00-12:00 and 12:30-17:00" /> <thursday hours="9:00-12:00 and 12:30-17:00" /> <friday hours="9:00-12:00 and 12:30-17:00" /> <holiday period="01/07/2008 - 31/08/2008" /> </business-calendar> </process-engine-context> <transaction-context> <repository-session /> <db-session /> <message-session /> <timer-session /> <history-session /> <hibernate-session current="true" /> <transaction type="spring" /> </transaction-context></jbpm-configuration>
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/543134#543134]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 11 months
[jBPM] - jBPM 4.3, Spring 2.5, Oracle, start process, process instance have a null id
by Topiltzin Dominguez
Topiltzin Dominguez [http://community.jboss.org/people/topiltzin] created the discussion
"jBPM 4.3, Spring 2.5, Oracle, start process, process instance have a null id"
To view the discussion, visit: http://community.jboss.org/message/543124#543124
--------------------------------------------------------------
When I try to start a new process instance, and then go to next state, the process instance its created
as I can see it in the DataBase, but the ID of the process instance is null, I need some help, why is this happenning?
The code:
ProcessInstance processInstance = getExecutionService()
.startProcessInstanceByKey(processDefinitionId);
String processInstanceId = processInstance.getId();
logger.debug("processInstanceId: " + processInstanceId);
and ... processInstanceId is null as I can see in the DB, thanks in advance
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/543124#543124]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 11 months