[JBoss jBPM] - Variables persistence
by oxelad
Hallo,
is this possible to not persist workflow varibles during workflow execution? Or by other words: is this possible to switch somehow from IN variables to IN-OUT variables?
I have the following problem during my 'work-through'-workflow execution: all varibales what i get for a java task execution are deserialized copies of set workflow variables. That means that variable's scope is restricted to this call; all changes what i will made will be lost after task ends. I know that it possible to make 'variable-update' via return value, but the problem is that i can return only ONE object (but i have to chage the other one (what is IN variable) as well).
Thank you.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4244343#4244343
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4244343
16 years, 8 months
[JBoss jBPM] - Re: About integrating JBPM in an existing EAR
by RonanKER
I'm giving a try but it is not easy as it seems for a newbie.
First of all, I can't find a real doc on all the config files (required or optional values, different properties ...) and I guess they are based on a IOC pattern but as I don't know what is required my test failed with a NullpointerException:
java.lang.NullPointerException
| at org.jbpm.pvm.internal.repository.DeploymentImpl.deploy(DeploymentImpl.java:89)
| at com.vc.mm.jbpm.JbpmTest.testHelloWorld(JbpmTest.java:35)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
I guess "CommandService" is not injected in "RepositoryServiceImpl" but why ?
Here it is my jbpm.cfg.xml:
| <?xml version="1.0" encoding="UTF-8"?>
| <jbpm-configuration>
|
| <!-- import resource="jbpm.default.cfg.xml" / -->
| <!-- import resource="jbpm.tx.hibernate.cfg.xml" / -->
|
| <!-- from jbpm.default.cfg.xml -->
| <process-engine-context>
|
| <repository-service />
| <repository-cache />
| <execution-service />
| <history-service />
| <management-service />
| <identity-service />
| <task-service />
|
| <!-- change here : no hibernate config for jbpm -->
| <!-- hibernate-configuration>
| <cfg resource="jbpm.hibernate.cfg.xml" />
| </hibernate-configuration -->
|
| <!-- change here : no hibernate session factory for jbpm -->
| <!-- 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>
|
| <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>
|
| <mail-template name='task-notification'>
| <to users="${task.assignee}" />
| <subject>${task.name}</subject>
| <text><![CDATA[Hi ${task.assignee},
| Task "${task.name}" has been assigned to you.
| ${task.description}
|
| Sent by JBoss jBPM
| ]]></text>
| </mail-template>
|
| <mail-template name='task-reminder'>
| <to users="${task.assignee}" />
| <subject>${task.name}</subject>
| <text><![CDATA[Hey ${task.assignee},
| Do not forget about task "${task.name}".
| ${task.description}
|
| Sent by JBoss jBPM
| ]]></text>
| </mail-template>
|
| </process-engine-context>
|
| <transaction-context>
| <repository-session />
| <db-session />
|
| <message-session />
| <timer-session />
| <history-session />
| <mail-session>
| <mail-server>
| <session-properties resource="jbpm.mail.properties" />
| </mail-server>
| </mail-session>
| </transaction-context>
|
| <!-- change here : from jbpm.tx.hibernate.cfg.xml -->
| <process-engine-context>
| <command-service>
| <retry-interceptor />
| <environment-interceptor />
| <standard-transaction-interceptor />
| </command-service>
| </process-engine-context>
|
| <transaction-context>
| <transaction />
| <!-- change here : added => current="true"-->
| <hibernate-session current="true" />
| </transaction-context>
|
| <import resource="jbpm.jpdl.cfg.xml" />
| <import resource="jbpm.identity.cfg.xml" />
| <import resource="jbpm.jobexecutor.cfg.xml" />
|
| </jbpm-configuration>
|
Thanks for any hint.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4244328#4244328
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4244328
16 years, 8 months
[JBoss jBPM] - Re: Caused by: javax.resource.ResourceException: Transaction
by Randysv
My process definition is below.
| <?xml version="1.0" encoding="UTF-8"?>
|
| <process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="ACLUpdate">
|
|
| <swimlane name="RequesterClerk"></swimlane>
|
|
| <start-state name="ACLRequestStart">
| <transition to="ACL Approval" name="ToAclApproval"></transition>
| <event type="node-leave">
| <action name="CheckForProcessVariables" class="us.secureall.workflow.handler.action.CheckForProcessVariablesAction"></action>
| </event>
| </start-state>
|
|
| <task-node name="ACL Approval" create-tasks="true" async="true">
| <task blocking="true" name="ApproveACL">
| <assignment class="us.secureall.workflow.handler.assignment.ACLUpdateAssignmentHandler"></assignment>
| <timer duedate="5 seconds" transition='TimedOut'>
| <action class="us.secureall.workflow.handler.action.ApproveACLTimeOutActionHandler">
| </action>
| </timer>
| </task>
| <transition to="ApprovalNotification" name="aclapproved"></transition>
| <transition to="TimeOutNotification" name="TimedOut"></transition>
| </task-node>
|
| <state name="ApprovalNotification">
| <transition to="ACLRequestEnd" name="ApprovalToEnd"></transition>
| </state>
|
| <state name="TimeOutNotification">
| <transition to="ACLRequestEnd" name="TimeOutToEnd"></transition>
| </state>
|
|
| <end-state name="ACLRequestEnd"></end-state>
|
|
| </process-definition>
|
The timer ejb fires successfully and my ApproveACLTimeOutActionHandler is called. But then I get the exception and the transition out of the Task Node does not happen.
Caused by: javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -3f57fd96:cdc8:4a5a8010:b3d status: ActionStatus.ABORT_ONLY >
at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:370)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
... 70 more
Why is the transaction not active anymore? I don't see any exception in my code. I hardy do anything in my ApproveACLTimeOutActionHandler other than do a System.out. This seems to be a pretty common problem and it is probably JBoss' issue. A whole lot of people seem to have this issue, but there is no explanation anywhere.
This is the piece of jboss' code where it is checking if the transaction is active and throwing an exception if it is node
Transaction tx = tm.getTransaction();
| if (tx != null && TxUtils.isActive(tx) == false)
| throw new ResourceException("Transaction is not active: tx=" + tx);
| if (!interleaving)
| trackByTransaction = tx;
|
Please help if anybody has a fix for this issue.
TIA,
Randy
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4244304#4244304
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4244304
16 years, 8 months