Guvnor User Authentication
by apatel
Hi,
I have sucessfully setup Guvnor and created rules, but now I want to setup
user authentication. I have taken the following step to enable it:
(1) added the following to component.xml
<security:identity authenticate-method="#{Authenticator.authenticate}"
jaas-config-name="guvnor" />
and commented out:
<security:identity
authenticate-method="#{defaultAuthenticator.authenticate}"/ >
(2) added the following to $JBOSS_SERVER/conf/login-config.xml:
<application-policy name = "guvnor">
<authentication>
<login-module
code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag = "required">
<module-option
name="usersProperties">users.properties</module-option>
<module-option
name="rolesProperties">roles.properties</module-option>
</login-module>
</authentication>
</application-policy>
(3) added users.properties and roles.properties to
$JBOSS_SERVER/conf/login-config.xml
The admin user defined in the properties has admin, manager, and user roles
assigned to it, but when i login with that user in Guvnor none of the
Packages are available to view and no new ones can be created. Futhermore,
when I navigate to Adminstration -> User permission none of the user that I
created are able to access this page. The message states "TIP: To enable or
disable authorization, open components.xml in WEB-INF".
Have I missed a step? Any help is much appreciated.
Regards,
Amisha
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Guvnor-User-Authentic...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 2 months
Drools Fusion High Availability
by Thomas Peuß
Hello!
We are thinking about using Drools Fusion 5.1 for Complex Event Processing. We have a prototype running that consumes events from a Tibco JMS server. Everything works as expected. My boss is now asking about HA features that are available. I have read the documentation and found nearly nothing about HA features. In the case of Fusion you have long running threads working on fireUntilHalt(). So when the node goes down you loose all the events that live in the ksession memory. What possibilities do you see to run Fusion in an HA environment?
Thanks for your ideas
Thomas
14 years, 2 months
ForEach element cannot see CollectionExpression
by sam.squire@paretopartners.com
Hello there,
I am experimenting with Drools. I seem to be having problems with making
the ForEach element to work. It cannot 'see' the mappings created when I
start the process. I am hand coding the XML flow files and using the
schema (and documentation) to help me.
The problem seems to be in the flow file before the rule file is even
executed. Is this the correct way to pass a collection to the process?
// the collection to iterate over
Collection<BusinessObject> pending = new ArrayList<BusinessObject>();
pending.add(new BusinessObject());
pending.add(new BusinessObject());
// the parameters for the process
Map<String, Object> params = new HashMap<String, Object>();
params.put("pending", pending);
ksession.startProcess("org.processor", params);
ksession.fireAllRules();
In the rule file, I have:
<forEach id="2" name="processor" variableName="current"
collectionExpression="pending" >
<in-ports>
<in-port type="DROOLS_DEFAULT" nodeId="6"
nodeInType="DROOLS_DEFAULT" />
</in-ports>
<out-ports>
<out-port type="DROOLS_DEFAULT" nodeId="8"
nodeOutType="DROOLS_DEFAULT" />
</out-ports>
<nodes>
<start id="6" name="test" />
<actionNode id="7">
<action type="expression" dialect="mvel">
System.out.println(current);
</action>
</actionNode>
<end id="8" name="done"/>
</nodes>
<connections>
<connection from="6" to="7" />
<connection from="7" to="8" />
</connections>
</forEach>
I cannot tell if the scope inside the ForEach > nodes is separate from the
outer-scope, can I use the same IDs?
The error I receive:
Exception in thread "main" java.lang.IllegalArgumentException: Could not
find collection params
What am I doing wrong?
Regards,
S. Squire
This message may contain confidential and privileged information and is intended solely for the use of the named addressee. Access, copying or re-use of the e-mail or any information contained therein by any other person is not authorised. If you are not the intended recipient please notify us immediately by returning the e-mail to the originator and then immediately delete this message. Although we attempt to sweep e-mail and attachments for viruses, we do not guarantee that either are virus-free and accept no liability for any damage sustained as a result of viruses.
Please refer to http://www.bnymellon.com/disclaimer/piml.html for certain disclosures.
14 years, 2 months
garbage collected in process?
by marton.bokor
Hi All,
I have the following code:
Map<String, Object> map = new HashMap<String, Object>();
map.put("form", form);
map.put("error", new Integer(0));
map.put("transaction_id", new Integer(0));
ProcessInstance pi = ksession.startProcess(id, map);
ksession.insert(pi);
ksession.fireAllRules();
Where all map parameters and inserted facts are local variables which will
be destroyed by java garbage collector. My question is, if I have one
session for all processess, will these be freed in the process instance as
well or I need manual disposal?
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/garbage-collected-in-...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 2 months
Complete Solutions Tabu Question
by Steve Ronderos
Hello Drools Users.
Do Solution objects need to implement equals() and hashCode() methods in
order to take advantage of the completeSolutionsTabuSize configuration?
I did a little digging through the code and it appears that Solution
objects are being compared with their clones (implicitly that is, they are
being used as map keys). AbstractTabuAcceptor:87
The documentation mentions that moves need to implement equals and
hashCode, but doesn't talk about Solution needing it.
Thanks in advance,
Steve
14 years, 2 months
Schema Error with Drools spring xsd
by Mohod, Akash
Hi ,
I am using Drools 5.1 with Srping 3.0 . I am getting these errors working in Eclipse :-
org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-containe...', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195) [na:1.6.0_19]
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.warning(ErrorHandlerWrapper.java:96) [na:1.6.0_19]
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:380) [na:1.6.0_19]
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318) [na:1.6.0_19]
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaErr(XSDHandler.java:2541) [na:1.6.0_19]
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaWarning(XSDHandler.java:2532) [na:1.6.0_19]
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:1836) [na:1.6.0_19]
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:531) [na:1.6.0_19]
Any help is appreciated.
Regards,
Akash
--------------------------------------------------------------------------
NOTICE: If you have received this communication in error, please destroy all electronic and paper copies and notify the sender immediately. Mistransmission is not intended to waive confidentiality or privilege. Morgan Stanley reserves the right, to the extent permitted under applicable law, to monitor electronic communications. This message is subject to terms available at the following link: http://www.morganstanley.com/disclaimers. If you cannot access these links, please notify us by reply message and we will send the contents to you. By messaging with Morgan Stanley you consent to the foregoing.
14 years, 2 months
Fixing the "Discouraged access" Eclipse warnings makes all org.drools.* import unresolved
by maurizio
Hi all,
within Eclipse I'm getting several warnings like "Discourages access: the
type SessionPseudoClock is not accessible due to restriction on required
library drools-core.jar". I cannot really understand why using
SessionPseudoClock just as explained in the Fusion manual should be
avoided. Anyway in another thread Kris Verlaenen suggested "You can easily
turn them off by doing: Windows - Preferences -> select Drools on the left
and change the Internal rule classes setting to accessible." Unfortunatly by
doing so I only get a lot of "The import org.drools cannot be resolved"
errors : all drools imports are no more resolved.
Any comment and suggestion will be most welcome.
Thanks and Best regards,
Maurizio
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Fixing-the-Discourage...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 2 months
drools quirks
by Matt Young
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I just started using drools and this is my first time implementing a
rules engine. Everything has been pretty smooth but I have some
quirks that I am not sure I can live with.
1) for some reason, if I execute the Knowlege session against an
object, the knowlege session never returns. The only way I can get
the ksession to return is to make IF (obj == null) part of the LHS and
make modify($input){setObj("complete")} part of the RHS
This seems like a deficiency since I have users writing their own
rules, I can see them forgetting this requirement. IS their a way to
get the ksession to firerules only once? If so what does that look like?
2) It seems that any code I want can be executed in the RHS. I could
literally execute something like the following in the RHS.
byte[] b= new byte[10000000000000]; // Really big memory waste
I also could just start a bunch of threads.
The point is that I am intending to let the users write their own
rules but I can't do that if there are no restrictions on how/what can
be done inside the rules. Any suggestions? Are there sandboxes or
filters I can activate to restrict the RHS?
- --
Cheers,
Matt Young
solid(a)youngdev.net
http://youngdev.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBAgAGBQJMlMmHAAoJEO5jycTTPEzclUwQAJdLYF183A5fSo9cN0a1gkkR
bRyIEgUBUZGQVZi+W7vezQMVqLtV1/+HkfDj5EdylD9fGS6/OsBzOKMCKb4IIuOe
j8xgp4Z85G5JmowhWDh9AYfHMwcOJ/QSjrPm4ABs3ZQilBEeSKcYBNZ/YNX9WhVN
ZMeLwx9+VJqK1Wj4Aue6zdG4XiSA+CTNL309xLgyGkoiWtnp3+wY4Q3q1WGArWti
uIq0tN1xGk9mRkSGepdAjycv5mc+9BCjh6/5UqSIMsWSTqKzm6ce96YQIMgMV77m
J6/ya91eTGiqXXpXsrSKJSHUFe7ExAJjjVZFzXT55FSNRBzrInCXDIyMfH6hX00E
KFQyQWHi3lLRPSKnBpkBGQj1ZPB3WMBvq8Kfjjszzoa3MjmsfNy21YdrSdLUnJPC
NNdBCwYmNbntRu+6fhk8D5OxlLXqAY+OcuVLjySKdBq6eA+Q20XN8+GLWwAjSD8K
vc0/6HAICKzOXhpSiPEFsPSOxT/FSVBXPOmoO0fMoxjOLpEHU2G5CB6lIn8zZngQ
GodDE6s9uOWLsEyxsBCp7Nb9uLNEFXVW91SsYcGQuzCrVgwPR4Dc/KUzOdYUPIaM
RC1laZbdEfrhisZrHAkZDaMSzaYZO48Vb4ZpCJTqCVESdwjRbBLtTG7YNAFBKQQw
BN9Qjq6IJUUJDzfawsrr
=1xoA
-----END PGP SIGNATURE-----
14 years, 2 months
calling a function from "when"
by Kripa Nathwani
Hello,
I need to know whether it is possible to call a function from within a "when" condition?
I am currently trying with a simple print function just for checking but it is not working.
Best Regards,
Kripa
________________________________
This Email may contain confidential or privileged information for the intended recipient (s) If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system.
______________________________________________________________________
14 years, 2 months
Flow Timer causes exception: Caused by: java.util.concurrent.RejectedExecutionException
by Gustavo Tenrreiro
Hi,
I have a flow and a set of rules.
In the flow I have a wait state. If the wait state has a timer, when
the flow reaches the node it blows up with the following exception (
See Below ), if I remove the timer everything works.
INFO 2010-09-18 16:26:28 [ERROR]
com.kgcontrols.services.raytheon.standardsRequests.workflow.managers.DroolsEventsManager
Could not commit session
java.lang.RuntimeException: Could not commit session
at org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:292)
at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.execute(CommandBasedStatefulKnowledgeSession.java:434)
at com.kgcontrols.services.raytheon.standardsRequests.workflow.managers.DroolsEventsManager.sendEvent(DroolsEventsManager.java:43)
at com.kgcontrols.services.raytheon.standardsRequests.workflow.Rule_domainLeadReject_0.defaultConsequence(Rule_domainLeadReject_0.java:10)
at com.kgcontrols.services.raytheon.standardsRequests.workflow.Rule_domainLeadReject_0DefaultConsequenceInvoker.evaluate(Rule_domainLeadReject_0DefaultConsequenceInvoker.java:34)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:917)
at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:856)
at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1071)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:785)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:751)
at org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:218)
at org.drools.command.runtime.rule.FireAllRulesCommand.execute(FireAllRulesCommand.java:99)
at org.drools.command.runtime.rule.FireAllRulesCommand.execute(FireAllRulesCommand.java:33)
at org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:279)
at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.fireAllRules(CommandBasedStatefulKnowledgeSession.java:201)
at com.kgcontrols.services.raytheon.standardsRequests.workflow.listeners.VoteCreatedEventListener.onMessage(VoteCreatedEventListener.java:78)
at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:854)
at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:99)
at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:166)
at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:117)
at org.apache.activemq.thread.PooledTaskRunner.access$100(PooledTaskRunner.java:26)
at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:44)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.util.concurrent.RejectedExecutionException
at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1768)
at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:767)
at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:216)
at java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:379)
at org.drools.time.impl.JDKTimerService.schedule(JDKTimerService.java:102)
at org.drools.time.impl.JDKTimerService.scheduleJob(JDKTimerService.java:80)
at org.drools.process.instance.timer.TimerManager.registerTimer(TimerManager.java:60)
at org.drools.workflow.instance.node.StateBasedNodeInstance.internalTrigger(StateBasedNodeInstance.java:56)
at org.drools.workflow.instance.node.CompositeNodeInstance.internalTrigger(CompositeNodeInstance.java:86)
at org.drools.workflow.instance.node.StateNodeInstance.internalTrigger(StateNodeInstance.java:48)
at org.drools.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:117)
at org.drools.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:178)
at org.drools.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:144)
at org.drools.workflow.instance.impl.ExtendedNodeInstanceImpl.triggerCompleted(ExtendedNodeInstanceImpl.java:53)
at org.drools.workflow.instance.node.StateBasedNodeInstance.triggerCompleted(StateBasedNodeInstance.java:117)
at org.drools.workflow.instance.node.StateBasedNodeInstance.triggerCompleted(StateBasedNodeInstance.java:98)
at org.drools.workflow.instance.node.WorkItemNodeInstance.triggerCompleted(WorkItemNodeInstance.java:201)
at org.drools.workflow.instance.node.WorkItemNodeInstance.workItemCompleted(WorkItemNodeInstance.java:258)
at org.drools.workflow.instance.node.WorkItemNodeInstance.signalEvent(WorkItemNodeInstance.java:234)
at org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent(WorkflowProcessInstanceImpl.java:337)
at org.drools.persistence.processinstance.JPAWorkItemManager.completeWorkItem(JPAWorkItemManager.java:99)
at org.drools.process.workitem.email.EmailWorkItemHandler.executeWorkItem(EmailWorkItemHandler.java:104)
at org.drools.persistence.processinstance.JPAWorkItemManager.internalExecuteWorkItem(JPAWorkItemManager.java:45)
at org.drools.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:101)
at org.drools.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:117)
at org.drools.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:178)
at org.drools.workflow.instance.node.SplitInstance.internalTrigger(SplitInstance.java:94)
at org.drools.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:117)
at org.drools.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:178)
at org.drools.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:144)
at org.drools.workflow.instance.node.JoinInstance.triggerCompleted(JoinInstance.java:152)
at org.drools.workflow.instance.node.JoinInstance.internalTrigger(JoinInstance.java:52)
at org.drools.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:117)
at org.drools.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:178)
at org.drools.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:144)
at org.drools.workflow.instance.node.EventNodeInstance.triggerCompleted(EventNodeInstance.java:66)
at org.drools.workflow.instance.node.EventNodeInstance.signalEvent(EventNodeInstance.java:50)
at org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent(WorkflowProcessInstanceImpl.java:351)
at org.drools.command.runtime.process.SignalEventCommand.execute(SignalEventCommand.java:95)
at org.drools.impl.StatefulKnowledgeSessionImpl.execute(StatefulKnowledgeSessionImpl.java:879)
at org.drools.impl.StatefulKnowledgeSessionImpl.execute(StatefulKnowledgeSessionImpl.java:862)
at org.drools.command.ExecuteCommand.execute(ExecuteCommand.java:50)
at org.drools.command.ExecuteCommand.execute(ExecuteCommand.java:31)
at org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:279)
... 24 more
INFO 2010-09-18 16:26:28 [ERROR]
com.kgcontrols.services.raytheon.standardsRequests.workflow.listeners.VoteCreatedEventListener
Unable to consume Vote created event: Could not commit session or
rollback
java.lang.RuntimeException: Could not commit session or rollback
at org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:289)
at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.fireAllRules(CommandBasedStatefulKnowledgeSession.java:201)
at com.kgcontrols.services.raytheon.standardsRequests.workflow.listeners.VoteCreatedEventListener.onMessage(VoteCreatedEventListener.java:78)
at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:854)
at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:99)
at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:166)
at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:117)
at org.apache.activemq.thread.PooledTaskRunner.access$100(PooledTaskRunner.java:26)
at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:44)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: Unable to rollback transaction
at org.drools.persistence.session.JtaTransactionManager.rollback(JtaTransactionManager.java:181)
at org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:287)
... 11 more
Caused by: java.lang.IllegalStateException: no transaction started on
this thread
at bitronix.tm.BitronixTransactionManager.rollback(BitronixTransactionManager.java:111)
at org.drools.persistence.session.JtaTransactionManager.rollback(JtaTransactionManager.java:178)
... 12 more
Can someone point me in the right direction.
Thanks
14 years, 2 months