[JBoss jBPM] - Using Drools for jBPM decision
by turpin_vincent
Hi,
I'm starting to use Seam and i've got some problems using Drools in order to manage decisions in my process and nobody is able to help me on Seam forum.
Configuration Jboss 5.0.0 GA Seam 2.1.1 GA Ant 1.7 Jboss Tool Eclipse 3.4
When i use Drools to manage assignment, it works fine, but now i would like to use it for decison managment and i got this error:
Exception during request processing:
| Caused by javax.el.ELException with message: "org.jbpm.JbpmException: decision 'decision69' selected non existing transition 'null'"
I give you a part of my code but if something else is needed tell me.
Process:
| <task-node name="PlaceOrder">
| <task name="placeOrderTask">
| <assignment class="org.jboss.seam.drools.DroolsAssignmentHandler">
| <workingMemoryName>securityRulesWorkingMemory</workingMemoryName>
| <assertObjects>
| <element>#{orderStock}</element>
| </assertObjects>
| </assignment>
| </task>
| <transition name="cancel" to="error" />
| <transition to="decision69" name="todecision"></transition>
| </task-node>
|
| <decision name="decision69">
|
| <handler class="org.jboss.seam.drools.DroolsDecisionHandler">
| <workingMemoryName>accountApprovalWorkingMemory</workingMemoryName>
| <assertObjects>
| <element>#{actor}</element>
| <element>#{orderStock}</element>
| </assertObjects>
| </handler>
|
| <transition to="Deliver" name="toDeliver">
| <action class="org.jboss.seam.drools.DroolsActionHandler">
| <workingMemoryName>accountApprovalWorkingMemory</workingMemoryName>
| <assertObjects>
| <element>#{actor}</element>
| <element>#{orderStock}</element>
| </assertObjects>
| </action >
| </transition>
| <transition to="end" name="toend"></transition>
| </decision>
|
|
| <task-node name="Deliver">
| <task name="getFromStock">
| <assignment actor-id="#{actor.id}" />
| </task>
| <transition name="next" to="end" />
| <transition name="cancel" to="error" />
| </task-node>
|
Component.xml:
<persistence:managed-persistence-context name="entityManager"
| auto-create="true"
| entity-manager-factory="#{testEntityManagerFactory}"/>
|
| <persistence:entity-manager-factory name="testEntityManagerFactory"
| persistence-unit-name="test"/>
|
| <drools:rule-base name="securityRules">
| <drools:rule-files><value>/security.drl</value></drools:rule-files>
| </drools:rule-base>
|
| <drools:managed-working-memory name="securityRulesWorkingMemory" auto-create="true" rule-base="#{securityRules}"/>
|
| <security:rule-based-permission-resolver security-rules="#{securityRules}"/>
|
| <drools:rule-base name="accountApprovalRules">
| <drools:rule-files>
| <value>/accountApproval.drl</value>
| </drools:rule-files>
| </drools:rule-base>
|
| <drools:managed-working-memory name="accountApprovalWorkingMemory" auto-create="true" rule-base="#{accountApprovalRules}"/>
|
AccountAproval.drl:
| package AccountApproval;
|
|
| import org.jboss.seam.bpm.Actor;
| import org.domain.test.session.OrderStock;
| import org.jboss.seam.drools.Decision;
|
| global Decision decision
|
| rule "Approve Order For Loyal Customer"
| when
| OrderStock ( processQuantity >= 0 )
| then
| System.out.println("plooooooooooop");
| decision.setOutcome("toDeliver");
| end
|
So i would like to know if someone can tell me why it happends.
thank's in advance
And i'm sorry for my english witch isn't as fine sa i would like (I'm a french student)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4217182#4217182
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4217182
17 years, 1 month
[JBoss jBPM] - Re: MSSQL Exceptions
by robro99
I start jboss, no errors. I open up jBPM. I start the websale example process. I enter my order data. I click OK. Then when it hits the timer associated with the evaluate order task node I get the following exception.
2009-03-11 12:56:29,037 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCFindByPrimaryKeyQuery.TimerEntityBean#findByPrimaryKey] Executing SQL: SELECT t0_TimerEntityBean.ID_ FROM JBPM_JOB t0_TimerEntityBean WHERE t0_TimerEntityBean.ID_=?
2009-03-11 12:56:29,037 WARN [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.disallow] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.disallow] Adding multiple last resources is disallowed. Current resource is org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@672bb3
2009-03-11 12:56:29,067 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.parentTraceEnabled=true
2009-03-11 12:56:29,067 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.nestedTraceEnabled=false
2009-03-11 12:56:29,067 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.detectDuplicateNesting=true
2009-03-11 12:56:29,067 ERROR [org.jboss.ejb.plugins.cmp.jdbc.JDBCFindByPrimaryKeyQuery.TimerEntityBean#findByPrimaryKey] Find failed
org.jboss.util.NestedSQLException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: a226452:ab8:49b7ec92:5f status: ActionStatus.ABORT_ONLY >); - nested throwable: (org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: a226452:ab8:49b7ec92:5f status: ActionStatus.ABORT_ONLY >))
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:225)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:144)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCFindByPrimaryKeyQuery.execute(JDBCFindByPrimaryKeyQuery.java:155)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntityCommand.execute(JDBCFindEntityCommand.java:61)
... lots more ...
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4217132#4217132
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4217132
17 years, 1 month