Drools Flow / Declarative process definition
by Jaroslav Pullmann
Dear Drools team,
I like much the approach of Drools Flow and would appreciate to learn more.
The documentation states the extended rule engine having knowledge of the process model
and instance state derives the next process execution step. I am wondering, whether the
overall flow is reactive, even the procedural constructs like sequence, branching/joining
are implemented through firing rule actions ? For example, does Drools Flow converts the
sequence of steps A -> B into sth. like "when A.passed then B.start()" ?
When the prevoius holds, does Drools Flow allows to create (desgin) and execute declarative processes
omiting any explicit sequencing ? The steps/tasks were ordered partially by data- or event-based
dependency conditions or even activated independently of each other.
Drools Flow/Expert provide a thight integration with Java (e.g. representing facts as Java classes).
Are there future plans for supporting a higher-level processing with XML/XPath/XQuery like in YAWL ?
Many thanks
Jaro
--
Jaroslav Pullmann
Web Compliance Center - Fraunhofer FIT
Schloss Birlinghoven, D-53757 Sankt Augustin, Germany
Phone: +49-2241-142623 Fax: +49-2241-142065
14 years, 9 months
Process with subprocesses don't continue after finish work items in the subprocesses
by Dirk
Hey Drools-Users,
I've got a big and urgent problem with my drools process. I have a complex
process with many decisions and subprocesses. These subprocesses could even
contains more subprocesses so that i have a four-level flow.
I testet each subprocess isolated in a mock environment and now i get my
problem when they are combined in a big "super-process". I create the
process with the JPAKnowledgeService (and VariablePersistenceStrategy) and
everything works as expected. The process execute some actions, a
validation-subprocess and another subprocess with a human task (with a
custom handler). The process stops and persist all the variables (except
Integers; Must be a bug?). Perfect. Now I load the session with the
JPAKnowledgeService and complete the workitem with the
ksession.getWorkItemManager().completeWorkItem method. The subprocess now
execute to the end and then the engine stopps without an error. But there
are more steps in the superprocess todo. All subprocesse are "independent =
true" with "wait for completion = true" and don't have timers.
Has anybody an idea? Is this a known problem? I'm using the last
successfully build form the 21.02.2010. Do you need the process? (Then i
have to remove some internal information and could post it...)
Many thanks in advance
Dirk
--
View this message in context: http://n3.nabble.com/Process-with-subprocesses-don-t-continue-after-finis...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 9 months
Using DeadLines in Human Task
by ramram
Hi All,
I am trying to use the DeadLine option in the human task but I am having
the following exception once trying to run the task: I am trying to run the
task from the eclipse. Any Ideas????
[2010:02:55 13:02:118:exception] Uncaught exception on client
org.apache.mina.filter.codec.ProtocolDecoderException:
org.apache.mina.core.buffer.BufferDataException:
java.io.InvalidClassException: failed to read class descriptor (Hexdump:
...........)
at
org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:231)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:431)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$5(DefaultIoFilterChain.java:426)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:787)
at
org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:431)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:423)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:635)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:595)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:584)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.access$7(AbstractPollingIoProcessor.java:581)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:966)
at
org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:61)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.mina.core.buffer.BufferDataException:
java.io.InvalidClassException: failed to read class descriptor
at
org.apache.mina.core.buffer.AbstractIoBuffer.getObject(AbstractIoBuffer.java:1984)
at
org.apache.mina.filter.codec.serialization.ObjectSerializationDecoder.doDecode(ObjectSerializationDecoder.java:92)
at
org.apache.mina.filter.codec.CumulativeProtocolDecoder.decode(CumulativeProtocolDecoder.java:178)
at
org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:221)
... 15 more
Caused by: java.io.InvalidClassException: failed to read class descriptor
at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.util.ArrayList.readObject(Unknown Source)
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 java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at
org.apache.mina.core.buffer.AbstractIoBuffer.getObject(AbstractIoBuffer.java:1982)
... 18 more
Caused by: java.lang.ClassNotFoundException:
org.hibernate.PersistentObjectException
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at
org.apache.mina.core.buffer.AbstractIoBuffer$3.readClassDescriptor(AbstractIoBuffer.java:1962)
... 42 more
--
View this message in context: http://n3.nabble.com/Using-DeadLines-in-Human-Task-tp412870p412870.html
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 9 months
Refreshing RuleBase using the Guvnor
by Jeffrey Schneller
I posted about caching and after some more investigation it appears the problem lies in just refreshing the rulebase.
I created a simple package that contains 1 excel decision table which has 1 rule [row] in it. I ran my application. Then rebuilt the package in the Guvnor and my application refreshed the rule base correctly.
I have other packages which contain many 100 rules if not 1000 rules all based on multiple excel based decision tables. If I run my application, then rebuild the package in the Guvnor, my application throws the exception.
RuleAgent(Assembly) EXCEPTION (Fri Feb 26 12:02:32 EST 2010): java.lang.ClassCastException: org.drools.util.ObjectHashMap cannot be cast to org.drools.reteoo.BetaMemory. Stack trace should follow.
org.drools.RuntimeDroolsException: java.lang.ClassCastException: org.drools.util.ObjectHashMap cannot be cast to org.drools.reteoo.BetaMemory
It appears the problem occurs where there are many rules. Any ideas?
Thanks.
14 years, 10 months
Caching RuleBase
by Jeffrey Schneller
I saw some old thread about caching the rule base on your own. I have a singleton which contains a hashmap to do the caching. I am using the Guvnor to pull my rules from. This works fine except when the rules change on the Guvnor. When the rule base tries to refresh in my application, I am getting a ClassCastException. Any ideas?
RuleAgent(Assembly) EXCEPTION (Fri Feb 26 12:02:32 EST 2010): java.lang.ClassCastException: org.drools.util.ObjectHashMap cannot be cast to org.drools.reteoo.BetaMemory. Stack trace should follow.
org.drools.RuntimeDroolsException: java.lang.ClassCastException: org.drools.util.ObjectHashMap cannot be cast to org.drools.reteoo.BetaMemory
My code to do the caching is below:
private HashMap<String, RuleBase> ruleBaseMap = new HashMap<String, RuleBase>();
// check to see if we already set up this rule base
if (ruleBaseMap.containsKey(product.getConfigurationRule())) {
rb = ruleBaseMap.get(product.getConfigurationRule());
} else {
try {
InitialContext context = new InitialContext();
url = (String) context.lookup("java:comp/env/rules.url");
url = url + product.getConfigurationRule() + "/LATEST";
} catch (NamingException e1) {
}
Properties config = new Properties();
config.setProperty("newInstance", "false");
config.setProperty("url", url);
config.setProperty("poll", "300");
config.setProperty("name", "Assembly");
RuleAgent agent = RuleAgent.newRuleAgent(config);
rb = agent.getRuleBase();
ruleBaseMap.put(product.getConfigurationRule(), rb);
}
14 years, 10 months
Problem running drools-verifier ant task
by deaddowney
I'm trying to run the verifier against a simple rule file I've created. My
rules live in a directory called "rules". The rules files are directly
under rules/.
rules/rule1.drl
rules/rule2.drl
My ant target looks like:
<target name="verifier" depends="compile">
<verifier
srcdir="rules"
tofile="${outputdir}"
classpathref="classpath-compile-deploy">
<include name="*.drl" />
</verifier>
</target>
I'm getting this exception:
java.lang.NullPointerException
at java.io.Reader.<init>(Reader.java:61)
at java.io.InputStreamReader.<init>(InputStreamReader.java:55)
at
org.drools.contrib.DroolsVerifierAntTask.compileAndAnalyzeFile(DroolsVerifierAntTask.java:125)
at
org.drools.contrib.DroolsVerifierAntTask.execute(DroolsVerifierAntTask.java:105)
The error occurs in compileAndAnalyzeFiles:
http://grepcode.com/file/repository.jboss.com/maven2/org.drools/drools-an...
The line it's bombing out seems to be trying to find my rules file relative
to the Verifier class:
org.drools.lang.descr.PackageDescr descr = (new DrlParser()).parse(new
InputStreamReader(org/drools/verifier/Verifier.getResourceAsStream(filename)));
Why does it do that? Why not just read the file I specify? Do I have to
muck with the classpath to get the verifier to work?
Thanks,
Adam
--
View this message in context: http://n3.nabble.com/Problem-running-drools-verifier-ant-task-tp417853p41...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 10 months
Re: [rules-users] Rule Templates and null values
by Pavel Tavoda
Enlighten us. Where is this method and how to use it? I'm also interested.
Palo
2010/2/26 Bernd Rücker <bernd.ruecker(a)camunda.com>:
> Okay, digging more into the source code I found the method
> “replaceOptionals” which does exactly what I need. So despite the missing
> docs, a line IS skipped if the according parameter used in that line is
> null. Perfect :-)
>
>
>
> Sorry for the interruption…
>
>
>
> Von: rules-users-bounces(a)lists.jboss.org
> [mailto:rules-users-bounces@lists.jboss.org] Im Auftrag von Bernd Rücker
> Gesendet: Freitag, 26. Februar 2010 12:30
> An: rules-users(a)lists.jboss.org
> Betreff: [rules-users] Rule Templates and null values
>
>
>
> Hi all.
>
>
>
> I question myself if I can get the Rule Templates to works like it is in
> Excel: If one “parameter” is not set (null), the whole line of the template
> is skipped?
>
>
>
> Since we want to build a template for a lot of rules, fed from a database.
> There some conditions can be null, so they should not be included in the
> rule at all. Has anybody an idea to this? I haven’t found anything, neither
> in the docs, nor in the testcases…
>
>
>
> Thanks a lot
>
> Bernd
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
14 years, 10 months
Rule Templates and null values
by Bernd Rücker
Hi all.
I question myself if I can get the Rule Templates to works like it is in
Excel: If one parameter is not set (null), the whole line of the
template is skipped?
Since we want to build a template for a lot of rules, fed from a database.
There some conditions can be null, so they should not be included in the
rule at all. Has anybody an idea to this? I havent found anything,
neither in the docs, nor in the testcases
Thanks a lot
Bernd
14 years, 10 months