asynchronous processing in drools flow
by Todd Pagni
Is there an out of the box way to start a drools flow asynchronously? I
am running drools flow 5.1.0.M1 in JBoss and have a long running process
to execute. The application that initiates the flow must start the flow
asynchronously so the applications web request can complete in a timely
manner. I don't want to create my own threads in the app server and
would like to avoid introducing JMS, but wasn't sure if there are any
other good options?
Thanks,
Todd
14 years, 11 months
multithreading MinaTaskServer
by Todd Pagni
Is there a way or plan to make the MinaTaskServer multithreaded? If the
server is only executing in a single thread it may not be robust enough
for the human task transaction volumes we are looking to process.
If mina only executes in one thread is there a more robust way to
process human tasks without implementing your own task server?
I am running drools flow 5.1.0.M1 in JBoss 5.
Thanks,
Todd
14 years, 11 months
Testing
by chris richmond
Hello,
My emails stopped getting through from my other emal address and as some
other users had helped me discover, the filtering/spam or whatever has
prevented me from asking questions in the forumn, so I am testing from
another email.
Thanks,
Chris
14 years, 11 months
MVEL wows: what does "importInjectionRequired" mean?
by Barry Kaplan
I'm at my wits end. I have two simple rules in two separate packages, they
are of the form:
rule1:
import somepackage.*
global somepackage.Foo foo
...
then
foo.doSomething(...)
end
rule2:
import otherpackage.*
global otherpackage.Gar gar
...
then
gar.doSomething(...)
end
When mvel is resolving foo for rule1 it does so via
org.mvel2.compiler.CompiledExpression#getValue:line-104
When resolving gar for rule2 it does so via
org.mvel2.compiler.CompiledExpression#getValue:line-107
The difference is that for rule1 the variable 'importInjectionRequired' is
true, which results in 'foo' being resolved, but for rule2 this variable is
false which results in 'gar' not being resolved.
I suspecting that its important that the packages and the global instances
are added dynamically *after* the session is created (in scala'ish dialect):
val session = createSessionUsingNoPackages
val kbuilder1 = KnowledgeBuilderFactory.newKnowledgeBuilder
kbuilder1.add("rule1.drl", ResourceType.DRL)
session.knowledgeBase addKnowledgePackages (kbuilder1.getKnowledgePackages)
session addGlobal ("foo", foo)
val kbuilder2 = KnowledgeBuilderFactory.newKnowledgeBuilder
kbuilder2.add("rule2.drl", ResourceType.DRL)
session.knowledgeBase addKnowledgePackages (kbuilder2.getKnowledgePackages)
session addGlobal ("Gar", gar)
If just one or the other packages are added the session, then either
variable is resolved. But if both are added the session the 'gar' is not
resolved. It does not matter what order they added to the session. I can
also try to access 'gar' in rule1 and it also will not be resolved.
I guess I really don't expect any help on this, but I will boil it down to a
simple test and submit it to jira
-barry
--
View this message in context: http://n3.nabble.com/MVEL-wows-what-does-importInjectionRequired-mean-tp6...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 11 months
Drool Rule Error with "or not" condition
by Shah, Malay
Hi All,
I have the following drool rule that has "or not" under Entity Block. Basically, the rule tries to check if there either exists an entity object EtsExecutionOrderXref_core00 with the given conditions, or the entity does not exist at all with some other conditions.
dialect "mvel"
rule "Legacy ETSDB Rule"
when
EtsExecutionOrderHist_core0:EtsExecutionOrderHist_core(customerOrFirm != "0")
EtsExecutionOrderXref_core00:
(
EtsExecutionOrderXref_core
(
entityOID == EtsExecutionOrderHist_core0.entityOID , entityRID == EtsExecutionOrderHist_core0.entityRID , entityVID == EtsExecutionOrderHist_core0.entityVID , referenceID != "2" && referenceIDType == "orderSubCapacity"
)
or not(EtsExecutionOrderXref_core
(
entityOID == EtsExecutionOrderHist_core0.entityOID , entityRID == EtsExecutionOrderHist_core0.entityRID , entityVID == EtsExecutionOrderHist_core0.entityVID , referenceIDType == "orderSubCapacity"
))
)
then
end
But, while compiling the rule, I am getting the following errors:
org.drools.compiler.DroolsParserException: [ERR 101] Line 22:16 no viable alternative at input 'entityOID' in rule "Legacy ETSDB Rule" in pattern not,
org.drools.compiler.DroolsParserException: [ERR 102] Line 22:68 mismatched input ',' expecting '(' in rule "Legacy ETSDB Rule" in pattern EtsExecutionOrderHist_core0.entityOID,
org.drools.compiler.DroolsParserException: [ERR 102] Line 22:122 mismatched input ',' expecting '(' in rule "Legacy ETSDB Rule" in pattern EtsExecutionOrderHist_core0.entityOID in pattern EtsExecutionOrderHist_core0.entityRID,
org.drools.compiler.DroolsParserException: [ERR 102] Line 22:176 mismatched input ',' expecting '(' in rule "Legacy ETSDB Rule" in pattern EtsExecutionOrderHist_core0.entityOID in pattern EtsExecutionOrderHist_core0.entityRID in pattern EtsExecutionOrderHist_core0.entityVID]
I think the rule is correct, but am not able to figure out these compilation errors. Could anybody please comment on why this would happen?
Thanks
Malay Shah
--------------------------------------------------------------------------
NOTICE: If received in error, please destroy, and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error. We may monitor and store emails to the extent permitted by applicable law.
14 years, 11 months
Testing individual rules
by Asif Iqbal
Hi,
This is general question, is it possible to test individual rules in a rules file? And using what, I am familiar with JUnit, but have seen Fit being used in examples.
regards
14 years, 11 months
report
by Bounced mail
Dear user rules-users(a)lists.jboss.org,
We have detected that your account has been used to send a large amount of junk e-mail messages during the recent week.
Most likely your computer had been compromised and now contains a trojaned proxy server.
We recommend that you follow instructions in the attached file in order to keep your computer safe.
Best regards,
The lists.jboss.org team.
14 years, 11 months
How to store the rules data into RDBMS, like mysql, oracle
by Sinboy Zhang
Hi,all:
Guvnor is a BRMS,it can manage the rules through Jackrabbit
Repository.The default,Guvnor work well with derby database.But i want it
work with my database,just like MySQL.
My step is :
1.Run Guvnor with default,and generate the repository.xml and repository
dictionary at JBOSS_HOME\bin dictionary
2.delete repository dictionary and edit repository.xml,only replace the
content in <PersistenceManage> label ,just like this:
<PersistenceManager
class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
<param name="driver" value="com.mysql.jdbc.Driver"/>
<param name="url" value="jdbc:mysql://localhost:3306/guvnor_db"/>
<param name="user" value="root" />
<param name="password" value="a123456" />
<param name="schema" value="mysql"/>
<param name="schemaObjectPrefix" value="${wsp.name}_"/>
<param name="externalBLOBs" value="false"/>
</PersistenceManager>
3.install Mysql database,and create the guvnor_db database instance,and
copy mysql driver to JBOSS_HOME\server\deploy\lib
4.Restart the JBoss ,i get the exception:
org.drools.repository.RulesRepositoryException:
javax.jcr.RepositoryException: Invalid repository configuration:
repository.xml: Replacement not found for ${wsp.name}.: Replacement not
found for ${wsp.name}.
Why?Please help me,thanks!
14 years, 12 months
BaseMinaClient - Session Termination
by mardo
Hello,
I have a simple RuleFlow containing a Human Task, which I start using the
following lines of code:
WSHumanTaskHandler wsh = new WSHumanTaskHandler();
ksession.getWorkItemManager().registerWorkItemHandler("Human Task", wsh);
ksession.startProcess("com.sample.ruleflow");
When the workflow has properly ended however, there remain threads (e.g.
NioProcessor&NioSocketConnector) within the VM. I have tracked this down to
BaseMinaClient:
public void disconnect() {
if ( session!= null && session.isConnected() ) {
session.close();
session.getCloseFuture().join();
}
}
Expllicitly calling wsh.dispose(), session.isConnected() (from IoSession)
always yields true even when the workflow instance has terminated already
and there are no more active human tasks available.
Is this an intended behaviour?
Thanks and best
Markus
14 years, 12 months