Rules Flow Eclipse editor
by Prafull Kumar
Hi All,
I would like to know how we can modify the Rules flow eclipse editor look and
feel and functionality. e.g. If we have a Embedded Sub-Process in the flow and
reduce the size of it, the arrows are still displayed in the main canvas. Please
see the attached snapshot for reference.
How we can fix it? also if we want to open the Embedded Sub-Process in a new
window for easy maintainability/readability of the very complex processes, how
we can achieve it?
Going forward we are also looking to create the custom editor for the nodes.
Please guide us if its possible and there is any document for this.
Note: It seems that I can not attach files in the mailing list. Let me know if
its possible to share the image.
Regards, Prafull
13 years, 7 months
Deploying Guvnor on a existing repository DB
by maav
Hi!
I'm trying to get Guvnor to deploy on a pre-existing existing DB. The use
case beeing that we wan't to be able to bring up a backup instance of guvnor
in case the primary goes down.
But if a deploy guvnor on a "fresh" DB schema all tables get created along
with trigger and sequences (using Oracle 11).
But when I un-deploy guvnor.war and remove the repository-folder and then
deploy it again I get the following exception:
Caused by: java.sql.SQLException: ORA-00001: unique constraint
(ID_VERIFICATION.G_DEFAULT_BUNDLE_IDX) violated
at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
at
oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:219)
at
oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:970)
at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1190)
at
oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3370)
at
oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3476)
at
org.apache.jackrabbit.core.persistence.bundle.ConnectionRecoveryManager.executeStmtInternal(ConnectionRecoveryManager.java:371)
at
org.apache.jackrabbit.core.persistence.bundle.ConnectionRecoveryManager.executeStmtInternal(ConnectionRecoveryManager.java:298)
at
org.apache.jackrabbit.core.persistence.bundle.ConnectionRecoveryManager.executeStmt(ConnectionRecoveryManager.java:261)
at
org.apache.jackrabbit.core.persistence.bundle.ConnectionRecoveryManager.executeStmt(ConnectionRecoveryManager.java:239)
at
org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager.storeBundle(BundleDbPersistenceManager.java:1207)
... 59 more
What do I need to do to prevent this?
This is my repository.xml:
<?xml version="1.0"?>
<!DOCTYPE Repository
PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit
2.0//EN"
"http://jackrabbit.apache.org/dtd/repository-2.0.dtd">
<Repository>
<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
</FileSystem>
<DataStore class="org.apache.jackrabbit.core.data.FileDataStore">
</DataStore>
<Security appName="Jackrabbit">
<SecurityManager
class="org.apache.jackrabbit.core.security.simple.SimpleSecurityManager"
workspaceName="security">
</SecurityManager>
<AccessManager
class="org.apache.jackrabbit.core.security.simple.SimpleAccessManager">
</AccessManager>
<LoginModule
class="org.apache.jackrabbit.core.security.simple.SimpleLoginModule">
</LoginModule>
</Security>
<Workspaces rootPath="${rep.home}/workspaces"
defaultWorkspace="default"/>
<Workspace name="${wsp.name}">
<FileSystem class="org.apache.jackrabbit.core.fs.db.OracleFileSystem">
</FileSystem>
<PersistenceManager
class="org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManager">
</PersistenceManager>
<SearchIndex
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
</SearchIndex>
</Workspace>
<Versioning rootPath="${rep.home}/version">
<FileSystem
class="org.apache.jackrabbit.core.fs.db.OracleFileSystem">
</FileSystem>
<PersistenceManager
class="org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManager">
</PersistenceManager>
</Versioning>
<SearchIndex
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
</SearchIndex>
</Repository>
--
View this message in context: http://drools.46999.n3.nabble.com/Deploying-Guvnor-on-a-existing-reposito...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 7 months
Drools 5.1 - exception when trying to use incremental KB updates.
by Stephen Mcgruer
Just moved to Drools 5.1, using a Guvnor package as the base for a
Knowledge Base with incremental updating enabled. Our resource is a
Guvnor PKG. We encounter the following error when a snapshot is made:
[2010:08:224 16:08:903:debug] KnowledgeAgent: Diffing: [UrlResource
path='http://localhost:1337/drools-guvnor/org.drools.guvnor.Guvnor/package/TEST...']
[2010:08:224 16:08:935:debug] BinaryResourceDiffProducerImpl:
Comparing [Rule name=Resource Null-Checker, agendaGroup=MAIN,
salience=0, no-loop=false] against [Rule name=Resource Null-Checker,
agendaGroup=MAIN, salience=0, no-loop=false]
Exception in thread "Thread-30" org.drools.RuntimeDroolsException:
java.lang.reflect.InvocationTargetException : [Rule name=Resource
Null-Checker, agendaGroup=MAIN, salience=0, no-loop=false]
at org.drools.core.util.ReflectiveVisitor.visit(ReflectiveVisitor.java:56)
at
org.drools.agent.impl.BinaryResourceDiffProducerImpl.diff(BinaryResourceDiffProducerImpl.java:63)
at
org.drools.agent.impl.KnowledgeAgentImpl.incrementalBuildResources(KnowledgeAgentImpl.java:785)
at
org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:586)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:185)
at
org.drools.agent.impl.KnowledgeAgentImpl$ChangeSetNotificationDetector.run(KnowledgeAgentImpl.java:1106)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
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 org.drools.core.util.ReflectiveVisitor.visit(ReflectiveVisitor.java:47)
... 6 more
Caused by: java.lang.RuntimeException: this MVELReturnValueExpression
must be compiled for equality
at
org.drools.base.mvel.MVELReturnValueExpression.equals(MVELReturnValueExpression.java:123)
at
org.drools.rule.ReturnValueRestriction.equals(ReturnValueRestriction.java:306)
at
org.drools.rule.ReturnValueConstraint.equals(ReturnValueConstraint.java:121)
at java.util.Arrays.equals(Unknown Source)
at org.drools.rule.OrConstraint.equals(OrConstraint.java:132)
at java.util.AbstractList.equals(Unknown Source)
at org.drools.rule.Pattern.equals(Pattern.java:317)
at org.drools.rule.GroupElement.equals(GroupElement.java:273)
at
org.drools.agent.impl.BinaryResourceDiffProducerImpl.compareRules(BinaryResourceDiffProducerImpl.java:258)
at
org.drools.agent.impl.BinaryResourceDiffProducerImpl.visitRule(BinaryResourceDiffProducerImpl.java:117)
... 11 more
The rule in question is quite straight-forward, works on the initial
load up and worked in 5.0.1 fine. It is not the rule that was just
changed. If I remove that rule, another is just substituted in its
place in the error message.
What might be causing this? If you need more information, please ask.
Stephen
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
13 years, 7 months
How do I validate my DRL file
by Vijeth Raj
Hi ,
I am working on a Grails project where I have a web UI where the user
can define rules with all the conditions and the .DRL file will be
generated. Finally when the user clicks on a validate button ,my
application should validate the defined rules (which is in .DRL file) to
check for errors.
So now my question is :How do I validate my DRL file?
Can any one please guide me how can I achieve this?
Thanks in advance.
Vijeth Raj K
vijethrajk(a)gmail.com
13 years, 8 months
5.2.0.M2 issue using import functions
by wendy
Hi,
I've been using Drools 5.1 and I'm in the process of switching over to
5.2.0.M2. I have a file containing many custom public static functions that
our rules use. With 5.1 I could just "import function MyRuleFunction.*;"
and then use them in the 'when' part of the rule:
$example: ArrayList(size>3) from collect ($p: Person( eval (
exampleImportedFunction( name, "Bob")))
but with 5.2.0.M2 I'm getting an "unable to resolve method using
strict-mode: Person.exampleImportedFunction(java.lang.String,
java.lang.String)
which makes it look like it is only searching for functions on Person but
not in the 'import functions'.
If I add "import function MyRuleFunction.exampleImportedFunction;" it works
fine but I don't want to have to do that for every function in my file.
Functions used in the consequent don't seem to need to be imported
specifically (* works fine).
Has something changed between 5.1 and 5.2.0.M2 that effects this?
Thank you,
Wendy
--
View this message in context: http://drools.46999.n3.nabble.com/5-2-0-M2-issue-using-import-functions-t...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 8 months
Authorisation of Guvnor users on Glassfish
by Chris Selwyn
I am using Guvnor 2.1.1 on Glassfish 2.1 and mostly it seems to work
very well.
However, I am now looking to setup authentication of users to the Guvnor
server and this is where I am finding problems.
I tried writing a class with an "authenticate" method to authenticate
against a Glassfish realm using ProgrammaticLogin but (as far as I can
tell) this class is not being used by Guvnor.
Looking at the source, Guvnor appears to only use the
org.jboss.seam.security.Identity.authenticate method which uses only the
jaas-config-name value from the components.xml file.
So I then tried setting the jaas-config-name to "fileRealm" (which
exists in Glassfish's default login.conf) but now I get
"javax.security.auth.login.LoginException: No credentials." logged in my
server.log (and the user get a fail message, naturally).
Has anyone out there managed to configure Guvnor to authenticate against
a Glassfish realm or JAAS context and would be willing to help me through?
Chris Selwyn
13 years, 8 months
Dynamic updates of stateful sessions
by Mattias Avelin
We have a application in which we have both stateless & stateful sessions
running. We're using the KnowledgeAgent and ChangeSets to automatically
update our knowledge bases when the rules are changed.
This works fine for our stateless sessions for which we are creating a new
session for each request and if the rules have been updated this is
reflected in next session we create.
But for stateful sessions I'm not quite as sure on how to get it working. I
can see in the logs that the KnowledgeBase is re-built when the
KnowledgeAgent detects the updated rule files. But my "long running" session
is does not reflect these changes (which it shouldn't right?). But how do we
apply these changes to the stateful session without loosing all the facts I
accumulated?
The way I've solved it now is to keep a "last updated" timestamp for the
knowledgeBase and a "created" timestamp for the session and then compare
these before using the session. If the knowledgeBase's "update timestamp" is
later that the sessions "creation timestamp" I create a new Session and then
"manually" copy all facts from the former to the latter.
Is this the way you would do this or is there a better way?
Best Regards
Mattias Avelin
13 years, 8 months
Format of model for guvnor
by azahra
I am trying to use Guvnor with an existing model. I am having class
dependency issues even though I have created a jar with dependencies.
I noticed that the demo package seems to have its model declared in some
non-java way like so:
declare LoanApplication
amount: Integer
approved: Boolean
...
end
Is the use of this format discussed somewhere?
Are there any other alternatives to building a jar with full dependencies?--
View this message in context: http://drools.46999.n3.nabble.com/Format-of-model-for-guvnor-tp2878374p28...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 8 months