Troubles with Oryx designer in Guvnor - jBPM 5.1.CR1
by Dan Seaver
I'm attempting to use the Oryx designer in Guvnor, however I can't seem to
save / redisplay any diagram. I've tried it with various configurations,
including using the jBPM demo, but always get the same results. After I save
the newly created BPMN diagram, the Oryx designer refreshes to a blank
diagram. The new diagram name is on the list of Guvnor processes (for the
default package), and when I try to open it, I get the same blank diagram.
After starting the jBPM demo (5.1.CR1), I see the h2 database started, jboss
started and the human task service started. The jboss log looks pretty clean
except for an SLF4J error and a mention that the persistence provider caller
for org.jbpm.persistence.jpa does not implement the ejb3 spec correctly.
Also, there is an error regarding the log4j FileAppender.
Then I goto Guvnor with FireFox (or Chrome or IE6) and create the new BPMN
process. I get the following message in the jboss log:
2011-06-20 16:00:05,288 INFO [STDOUT] (http-localhost%2F127.0.0.1-8080-3)
(null: -1, -1): Premature end of file.
Then I create the process with the designer:
2011-06-20 16:00:02,929 ERROR [STDERR] (http-localhost%2F127.0.0.1-8080-1)
SLF4J: Class path contains multiple SLF4J bindings.
2011-06-20 16:00:02,929 ERROR [STDERR] (http-localhost%2F127.0.0.1-8080-1)
SLF4J: Found binding in [vfszip:/D:/dev/Drools/jbpm
5.1.CR1/jbpm-installer/jboss-5.1.0.GA/common/lib/slf4j-jboss-logging.jar/org/slf4j/impl/StaticLoggerBinder.class]
2011-06-20 16:00:02,929 ERROR [STDERR] (http-localhost%2F127.0.0.1-8080-1)
SLF4J: Found binding in [vfszip:/D:/dev/Drools/jbpm
5.1.CR1/jbpm-installer/jboss-5.1.0.GA/server/default/deploy/designer.war/WEB-INF/lib/slf4j-jdk14-1.5.6.jar/org/slf4j/impl/StaticLoggerBinder.class]
2011-06-20 16:00:02,929 ERROR [STDERR] (http-localhost%2F127.0.0.1-8080-1)
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
explanation.
2011-06-20 16:00:03,242 INFO [org.oryxeditor.server.EditorHandler]
(http-localhost%2F127.0.0.1-8080-1) The diagram editor is running in
development mode. Javascript will be served uncompressed
2011-06-20 16:00:05,116 INFO [STDOUT] (http-localhost%2F127.0.0.1-8080-3)
INFO 20-06 16:00:05,116 (NilAuthenticator.java:authenticate:35) All users
are guests.
2011-06-20 16:00:05,288 INFO [STDOUT] (http-localhost%2F127.0.0.1-8080-3)
(null: -1, -1): Premature end of file.
and save:
2011-06-20 16:06:51,247 INFO [STDOUT] (http-localhost%2F127.0.0.1-8080-7)
ERROR 20-06 16:06:51,247 (LoggingHelper.java:error:69)
java.lang.NullPointerException
at java.net.URLEncoder.encode(URLEncoder.java:188)
at
org.drools.guvnor.server.contenthandler.BPMN2ProcessHandler.storeAssetContent(BPMN2ProcessHandler.java:129)
at
org.drools.guvnor.server.RepositoryAssetOperations.checkinVersion(RepositoryAssetOperations.java:187)
at
org.drools.guvnor.server.RepositoryAssetService.checkinVersion(RepositoryAssetService.java:227)
...
Anybody have any ideas on what could cause this on my system and how I may
be able to solve it? Any help would be appreciated.
--
View this message in context: http://drools.46999.n3.nabble.com/Troubles-with-Oryx-designer-in-Guvnor-j...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 8 months
problems with process executions, constraints, and multiple sessions
by Jordi Alvarez
Hello,
I am involved in a project in which we are using Drools as the BPM.
We are experiencing some problems with wait state nodes. More concretely,
the problem seems to deal with
the execution of constraints in those wait states.
Let me first describe our context:
We are using JPA with Hibernate and Oracle. Our process instances are all
identified by a
business identifier (a string). This business identified would correspond to
the identifier of a case;
and a case normally has associated a process instances (and subprocesses of
that process).
Additionally, the processes we have developed make extensive
use of timers and wait states with constraints that refer to the process
instance and other facts that
we are using as events.
We have a stateful session for every case / business identifier.
We have a main process that calls subprocesses. As we said, in that process
and subprocesses we use wait states.
The constraints in those wait states are "waiting" for a fact to be inserted
in the stateful session. Once
the corresponding fact is inserted, the corresponding constraint should be
activated.
At this point is where the problem arises. All the constraints have been
unit tested with no problem at all.
But we have detected some problems that can arise when there is more that
one process waiting in the same wait state
(every process in a different Drools stateful session).
The situation is as follows:
1. There is a main process instance MPA with business id BA that has a
subprocess SPA (also with the same business id).
This subprocess is waiting in a given wait state W1 (these processes are
running in the stateful
session corresponding to the business id BA, from now on SA).
2. There is a second main process and subprocess with business id BB. The
state for these second set of processes is the
same one, and they are running in a second stateful session (the one for
business id BB), from now on SB.
3. A fact FA is inserted in SA. This fact makes the constaint in SPA true,
which makes SPA to leave the wait
state and continue with the execution.
Then, in some situations stateful session SA tries to also continue SPB,
which runs in a different stateful session
(that of SB). That, of course, produces some posterior problems that were
the origin of our investigations.
After some more deep investigations, it seems that the reason session SA
tries to continue SPB is that the constraint
in W1 for SPA gets activated twice. We have detected (and posteriorly
corrected) some situations in which this happens.
For example: the process in the constraint was associated not only to SPA
but to other processes in SA (the main process SPA for example).
we corrected this and obtained a better behaviour in which the problem is
more difficult to reproduce.
We have tried also to replace constraints with rule nodes, and set the
lock-on-active and no-loop. The results were a bit different
but seemed not to avoid the problem.
So, there is someone that has experimented situations similar to the
described above? Additionally, can someone from the drools
team give a bit of light to this situation? Why the reasonings in a stateful
session are interacting with processes running on a different
stateful session?
many thanks in advance,
Jordi Alvarez
14 years, 8 months
Question on Drools migration from 3.0 to 5.1
by Liqun Du
Hi All,
We have an issue in rule when migrating drools from 3.0 to 5.1 with "eval". To demo this error, I use the following code:
public class Info {
public String getItem(int i) {
return "item is " + i;
}
}
In Drools 3.0, the following rule is fine:
rule "test eval"
salience 1
when
info : Info()
eval(into.getItem(0) != null)
then
System.out.println("test eval");
end
But when using drools 5.1, it shows error "info can not be resolved". I found a way to resolve this issue but don't know this is the best practice.
declare Item
name : String
end
rule "insert item before eval"
salience 0
when
info : Info()
then
Item item = new Item();
item.setName(info.getItem(0));
insert( item );
end
rule "test eval"
salience 1
when
item : Item(n : name)
eval( n != null)
then
System.out.println("test eval");
end
BTW, using "declare" in rule may cause memory leaking? We are seeing heap size growing after migrated to 5.1.
Thanks,
Liqun
14 years, 8 months
Intersecting two collections in LHS
by Hezi Stern
I have in the working memory all possible sentences that can be presented to
the user ( class Sentence() ).
Each sentence holds a collection (String collection) called descriptor that
describe the sentence.
Based on various rules I populate a collection called messageFilter which
will be used to select the appropriate sentence.
The proper sentence is one that all its descriptors match the one in the
messageFilters
What I would like is something of the sort:
$sentences: ArrayList()
from collect (Sentence(descriptor contains messageFilter)
as messageFilter is a collection, this is not a valid code.
What would be the proper method to implement it.
I am using drools 5.1.1 but am willing to upgrade to 5.2 if required.
Thanks,
Hezi
14 years, 8 months
OutOfMemoryError happens when dynamic loading of Rules from Guvnor frequently
by Oliver Liu
I am using Drools 5.1.1 to design our rule engine, the rule engine need to
dynamic loading of rules from Guvnor because our marking team need to change
the rules frequently(about 40~100 times every day), we have over 5000 rules
in Guvnor.
This is my code ahout that:
public KnowledgeBase getKnowledgeBase() {
// hold a static reference in class
if(kagent != null) {
return kagent.getKnowledgeBase();
}
ResourceChangeScannerConfiguration sconf =
ResourceFactory.getResourceChangeScannerService().newResourceChangeScannerConfiguration();
sconf.setProperty("drools.resource.scanner.interval", "5");
ResourceFactory.getResourceChangeScannerService().configure(sconf);
ResourceFactory.getResourceChangeScannerService().start();
ResourceFactory.getResourceChangeNotifierService().start();
kagent = KnowledgeAgentFactory.newKnowledgeAgent("myagent");
kagent.applyChangeSet(ResourceFactory.newClassPathResource("changeset-url.xml"));
return kagent.getKnowledgeBase();
}
This is content of changeset-url.xml:
<change-set xmlns='http://drools.org/drools-5.0/change-set'
xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
xs:schemaLocation='http://drools.org/drools-5.0/change-set
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/...'
>
<add>
<resource
source='http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/Pack...'
type='PKG' />
</add>
</change-set>
After i start my service, i found each time When i rebuild package and
created new snapshot to snapshot_release, my service indeed can find the
changing and start to reload rules from guvnor, but memory increased about
50M, it didn't down even if the reloading had finished. After i reput do
this step many times(about 25 times), OutOfMemoryError happened.
So, I want to know, why memory increased continually?It sames drools didn't
do garbage collection.
Has anyone experienced this?
Thanks
- Oliver
--
View this message in context: http://drools.46999.n3.nabble.com/OutOfMemoryError-happens-when-dynamic-l...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 8 months
Filtering activations in stateless sessions
by drdaveg
Creating an AgendaFilter in stateful sessions is straightforward. Although
there are many API's that seem like they would foster discarding /filtering
rule activations in stateless sessions, each family of API seems to be
missing a key method to filter activations.
Can anyone suggest a way that works to filter rules from firing in stateless
sessions?
Command executors can use FireAllRules on a stateless session, but not with
an AgendaFilter.
Event listeners can detect rule activation events, but there doesn't seem a
way to ignore (e.g., not "accept") an activation.
Perhaps this can be accomplished by explicitly disposing of an activation
from a listener that detects this, but this approach seems like it could
have other consequences. Thanks!
--
View this message in context: http://drools.46999.n3.nabble.com/Filtering-activations-in-stateless-sess...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 8 months
What does guvnor do when importing a global DSL? a snapshot or a link?
by James Gu
Hi,
I am using guvnor-5.2.0.CR1-jboss-as-5.1.
I created a DSL file in global area and imported it into package
"testpackage". I created a business rule based on it in package.
Today I added some new items in the DSL file and found I can't use it in the
business rule in package, the new item is not in the select list. I created
a business rule in global area and I can see the new item. It seems that the
package keeps a snapshot for global area, not a link. Is this a bug? If not,
how can I update the snapshot for package. I tried to import it again but
get error "the assert is already imported."
Thanks,
James
--
View this message in context: http://drools.46999.n3.nabble.com/What-does-guvnor-do-when-importing-a-gl...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 8 months
Guvnor 5.2 CR1 under IE8
by Vincent LEGENDRE
Hi all
I was using firefox for Guvnor, every thing was well.
But here, users use IE 8, and under IE8, Guvnor displays some strange list of icons in place of some other icons :
- validate rule dialog : in place of the check (or error icon) : a big image containing all icons
- new rule dialog : category icons are replaced by the same big image
- history part of a rule : one more time the same big image
Does anyone has the problem ?
Does anyone uses IE :) ?
I suspect something like GWT using a big image as a cache, and some javascript to display only a small part of it, and this javascript is not compatible with IE. Make sense ? If yes, is there a workaround ?
14 years, 8 months