Gwt Console in JBPM
by srinivasasanda
Hi,
I'm using JBPM5.1 installer,with JBOSS 5.1.0GA,Drools 5.3
I'm integrating Drools with JBPM.Before that,this is issue arised with
JBPM5.I've dowloaded the source code for jbpm console in
*https://github.com/bpmc/bpm-console*.I followed instructions and succesfuly
made 2 war files gwt-console.war,gwt-console-server.war.
But,When I'm deploying them in my JBOSS,it is generating exception and I'm
unable to open the console.The server log is
2012-01-10 12:47:17,303 INFO
[org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main) deploy,
ctxPath=/default-bpm-console
2012-01-10 12:47:18,156 ERROR [org.reflections.Reflections] (main) could not
create Vfs.Dir from url. ignoring the exception and continuing
org.reflections.ReflectionsException: could not create Dir using
org.jboss.errai.bus.server.service.metadata.VFSUrlType from url
vfszip:/D:/jbpm-installer/jboss-5.1.0.GA/server/default/deploy/gwt-console.war/WEB-INF/classes/..
When I'm opening http://localhost:8080/jbpm-console:It is generating 404
page not found error.Please suggest me how to achieve it.Even I posted in
other forums,but couldnt able to get solution.Could you please suggest me
--
View this message in context: http://drools.46999.n3.nabble.com/Gwt-Console-in-JBPM-tp3647313p3647313.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 2 months
Template Key in DSL
by srinivasasanda
Hi,
I created a rule template.I also created the DSL.
When the Person occupation is {s} = Person(occupation == "{s}").
In the rule template I inserted DSL statement and it is displayed as When
the person occupation is----
Now,I need to Load Template Data.But as there is no template key,I'm unable
to add rows in load template data option.Please suggest me how to load
template data in the rule template with DSL.
Thanks
--
View this message in context: http://drools.46999.n3.nabble.com/Template-Key-in-DSL-tp3634710p3634710.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 2 months
Where could I get drools binary or source versioning 5.3.2.final?
by Miles Wen
Hello,
I submitted some issues to the issue tracker and browsed the issue tracker
site. Found that there is a bug fix version for drools 5.3 final which
named '5.3.2.final'. But I can't find where to download it.I searched for
the droolsjbpm/drools github repos too, but still couldn't find.
So if somebody knows where to find the drools 5.3.2.final version, please
tell me.
Thanks.
--
Regards.
Miles. Wen
13 years, 2 months
does "dialect" really have an effect?
by ronalbury
Drools 5.3
Given the following rule:
rule "EasyApp Family Term Rider Max Value"
dialect "java"
#ruleflow-group "values-group"
when
$ea : EasyApp(
getFoo1AsBoolean()==true
&& (getFoo2AsInt() > 25000
|| getFoo2AsInt() > getFoo3().getCurrentAmtAsInt()/5))
)
then
$ea.addError(drools.getRule().getName());
end
The method getFoo3().getCurrentAmtAsInt() returns null, and so I get a null
pointer error. I can accept that. However, the traceback shows I am deep in
MVEL code:
Caused by: java.lang.NullPointerException
at org.mvel2.ast.IntDiv.getReducedValueAccelerated(IntDiv.java:16)
at
org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:38)
at
org.mvel2.ast.Substatement.getReducedValueAccelerated(Substatement.java:43)
at
org.mvel2.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:116)
at org.mvel2.ast.Or.getReducedValueAccelerated(Or.java:31)
at org.mvel2.MVELRuntime.execute(MVELRuntime.java:87)
at
org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:122)
at
org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:115)
at org.mvel2.MVEL.executeExpression(MVEL.java:930)
at
org.drools.base.mvel.MVELPredicateExpression.evaluate(MVELPredicateExpression.java:100)
at
org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:291)
... 17 more
I know you can use java syntax inside MVEL ... does Drools even look at the
dialect, or does it always just run everything in MVEL?
--
View this message in context: http://drools.46999.n3.nabble.com/does-dialect-really-have-an-effect-tp36...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 2 months
Instantiate fact class declared only in drl
by MarcoMojana
Hi,
I have declared a fact in a drl file as follows:
package a.b.c
declare MyFact
vehicle : Vehicle
end
The corresponding class file doesn't exists: it is created on the fly by
drools at runtime. The class name should be a.b.c.MyFact, but the
classloader cannot find it by using:
Class c = Class.forName("a.b.c.MyFact");
Is it possible to do that and how? I don't want to create the class because
it is used only by rules inside the drl file, but I would like to write a
test case for them.
Thank you
--
MM
--
View this message in context: http://drools.46999.n3.nabble.com/Instantiate-fact-class-declared-only-in...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 2 months
Unable to do Guvnor Authentiation with MySQL
by Sumeet Karawal
Hi All,
I am trying to enable authentication in Guvnor using MySQL. I am using
MySQL 5.1, Guvnor 5.2 and JBoss AS 5.0.4
I searched over a lot of docs and tried to do as mentioned below :
I have created a GuvnorDB in MySQL with two tables
create table Principals(principal_id VARCHAR(64),password VARCHAR
(64));
create table roles(principal_id VARCHAR(64),user_role VARCHAR
(64),role_group VARCHAR(64));
and have entered some values accordingly (admin, admin123) and (admin,
admin, admin);
My components.xml in drools-guvnor.war is as follows :
<?xml version="1.0" encoding="UTF-8"?>
<components xmlns="http://jboss.com/products/seam/components"
xmlns:core="http://jboss.com/products/seam/core"
xmlns:security="http://jboss.com/products/seam/security"
xmlns:web="http://jboss.com/products/seam/web"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:transaction="http://jboss.com/products/seam/transaction"
xsi:schemaLocation="http://jboss.com/products/seam/core
http://jboss.com/products/seam/core-2.0.xsd
http://jboss.com/products/seam/security
http://jboss.com/products/seam/security-2.0.xsd
http://jboss.com/products/seam/components
http://jboss.com/products/seam/components-2.0.xsd
http://jboss.com/products/seam/web
http://jboss.com/products/seam/web-2.0.xsd
http://jboss.com/products/seam/transaction
http://jboss.com/products/seam/transaction-2.0.xsd">
<core:init transaction-management-enabled="false" />
<transaction:no-transaction />
<component name="repositoryConfiguration">
<!-- JackRabbit -->
<property name="properties">
<key>org.drools.repository.configurator</key><value>org.drools.repository.jackrabbit.JackrabbitRepositoryConfigurator</value>
</property>
</component>
<!-- SECURITY IDENTITY CONFIGURATION -->
<security:identity authenticate-method="#{authenticator.authenticate}"
jaas-config-name="mysql"/>
<!-- SECURITY AUTHORIZATION CONFIGURATION -->
<component name="org.jboss.seam.security.roleBasedPermissionResolver">
<property name="enableRoleBasedAuthorization">true</property>
</component>
</components>
I have also changed my login-config.xml accordingly and added a
application policy :
<application-policy name="mysql">
<authentication>
<login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule"
flag="required">
<module-option name="dsJndiName">java:/MySqlDS</module-option>
<module-option name="principalsQuery">select password from principals
where principal_id=?</module-option>
<module-option name="principalsQuery">select user_role,'Roles' from roles
where principal_id=?</module-option>
</login-module>
</authentication>
</application-policy>
I have also created a mysql-ds.xml and saved it in the default/deploy
folder; its contents :
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>MySqlDS</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/GuvnorDB</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>root</user-name>
<password></password>
<valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</local-tx-datasource>getting an exceptiogetting
</datasources>
After all these changes, when I run guvnor and try to login, I am
getting an exception thrown at the console:
01:36:41,212 INFO [STDOUT] INFO 10-01 01:36:41,211
(SecurityServiceImpl.java:login:57) Logging in user [admin]
01:36:41,360 INFO [STDOUT] ERROR 10-01 01:36:41,357
(SecurityServiceImpl.java:login:77) Unable to login.
javax.security.auth.login.FailedLoginException: Password Incorrect/Password
Required
at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login
(UsernamePasswordLoginModule.java:213)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at javax.security.auth.login.LoginContext.invoke
(LoginContext.java:784)
at javax.security.auth.login.LoginContext.access$000
(LoginContext.java:203)
at javax.security.auth.login.LoginContext$4.run
(LoginContext.java:698)
at javax.security.auth.login.LoginContext$4.run
(LoginContext.java:696)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv
(LoginContext.java:695)
at javax.security.auth.login.LoginContext.login
(LoginContext.java:594)
at org.jboss.seam.security.Identity.authenticate(Identity.java:335)
at org.jboss.seam.security.Identity.authenticate(Identity.java:324)
at org.drools.guvnor.server.security.SecurityServiceImpl.login
(SecurityServiceImpl.java:75)
at org.drools.guvnor.server.SecurityServiceServlet.login
(SecurityServiceServlet.java:71)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:57)......
.................
I tried a lot but not getting through on how to do this.
It would really helpful if somebody could guide me on this.
Thanks & Regards,
Sumeet
Mailto: sumeet.karawal(a)tcs.com
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
13 years, 2 months
xls decisiontable -> unable to resolve method using strict-mode
by ollem
Hello!
I'm using a knowledgeagent to point out a changeset XML which contains the
following DTABLE:
...
<resource source='file:/../templatetest.xls' type='DTABLE' />
...
when I compile I get the following error:
Unable to Analyse Expression request == "/":
[Error: unable to resolve method using strict-mode:
ultra.Default.ultra.MYHTTPD.request()]
[Near : {... request == "/" ....}]
^
[Line: 7, Column: 10] : [Rule name='print the incoming query_9']
The weird this is that MYHTTPD class is a javabean and contains getRequest
and setRequest methods.
notice that it tries a no getter method
ultra.Default.ultra.MYHTTPD.request().
If I do the same logic from a normal DRL rules file it works fine.
MYHTTPD is generated so I cannot past the source here, but it's correct and
as I mentioned working in DRL files.
this is how the XSL file looks like:
RuleSet A rules test
Import ultra.Default.ultra.MYHTTPD
RuleTable print the incoming query
CONDITION ACTION
MYHTTPD
request System.out.println($param);
Matcher Logger
/ "webserver root"
Anybody who knows what this is about?
Thanks // Olle
--
View this message in context: http://drools.46999.n3.nabble.com/xls-decisiontable-unable-to-resolve-met...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 2 months
Re: [rules-users] FactType returns null when creating a java client on Eclipse invoking a rule in Guvnor
by Andre Fonseca
Hi, another comment
When I try to access my own package using
http://localhost:8090/drools-guvnor/org.drools.guvnor.Guvnor/package/mypa...
I am getting
java.lang.NullPointerException
java.io.OutputStream.write(Unknown Source)
org.drools.guvnor.server.files.FileManagerUtils.loadBinaryPackage(FileManagerUtils.java:189)
But when I try using http://localhost:8090/drools-guvnor/org.drools.guvnor.Guvnor/package/mypa... I can download the drl file TIA
----- Original Message -----
From: Andre Fonseca
Sent: 01/08/12 06:34 PM
To: Rules Users List
Subject: Re: [rules-users] FactType returns null when creating a java client on Eclipse invoking a rule in Guvnor
Hi Kachan, thanks for your reply! I took a look in your post and tried to adapt my code, this is below: # Strategy 1 KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent("myagent"); kagent.applyChangeSet(ResourceFactory.newUrlResource("http://localhost:8090/drools-guvnor/org.drools.guvnor.Guvnor/package/mort...")); KnowledgeBase kbase = kagent.getKnowledgeBase(); FactType appType = kbase.getFactType("mortgages", "LoanApplication"); I copied the URL "http://localhost:8090/drools-guvnor/org.drools.guvnor.Guvnor/package/mort..." and past it on the browser, it downloads the file mortgages.pkg, so its correct right? But executing this code I got "(null: 1, 1): Content is not allowed in prolog." So I changed the line 2 to use #Strategy 2 kagent.applyChangeSet(ResourceFactory.newClassPathResource("src/main/resources/mortgage-changeset.xml")); The mortgage-charset.xml is below
<?xml version="1.0" encoding="UTF-8"?>
<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:8090/drools-guvnor/org.drools.guvnor.Guvnor/package/mort..."
type="PKG" basicAuthentication="enabled" username="admin" password="admin" />
</add>
</change-set>With this change I dont have error, but the variable appType returns null again. The point here is, I am using Guvnor with guest user (no authentication) this could be the problem? The URL from Strategy1 is corrected, I tested it. The file in Stragety2 is corrected to, I debug it and see the file inputstream. TIA
----- Original Message -----
From: kachaps4u
Sent: 01/08/12 05:54 PM
To: rules-users(a)lists.jboss.org
Subject: Re: [rules-users] FactType returns null when creating a java client on Eclipse invoking a rule in Guvnor
http://drools.46999.n3.nabble.com/urlResource-applyChangeset-and-authenti... Hey, Please read the above and see whether it can help you. I had the same problem returning null. Then I stopped it and now doing in ESB to access the resources using its rules processor. But sometimes the above discussion can help you and if you have anything positive please let me know too. I was trying my own example in fact and not the mortgage. I think this would help both of us. Thank you. Kachan -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-FactType-returns-null-when-... Sent from the Drools: User forum mailing list archive at Nabble.com. _______________________________________________ rules-users mailing list rules-users(a)lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
13 years, 2 months