Regarding BPEL
by Sumeet Karawal
Hi,
I required some information whether jBPM supports BPEL. I searched and
found something regarding its use in jBPM v3.x. But got nothing regarding
BPEL for versions 4.x and 5.x. Is jBPM compatible with BPEL or is there
anyway to have BPEL functionality with jBPM.
jBPM creates the process using JPDL. Is it better in someway or the other
than BPEL ? Could anybody please help me on this.
Thanks & Regards,
Sumeet Karawal
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
14 years, 8 months
How to use lists in RHS when using MVEL?
by zstlaw
I want to make an array and pass it to a method in the RHS but can't when I
use mvel. If I use mvel then java new Object[3] causes compile errors. If
I use the mvel syntax the object is not an real array, only a string in
mvel's special array notation which is not useful for the functions I am
trying to call. Working example:
rule "Array bug"
dialect "java" // explicit java or mvel barfs on new Object[];
when
Message( )
then
Object[] logArgs = new Object[3];
logArgs[0] = "Sample string";
logArgs[1] = "Another string";
logArgs[2] = "And done";
System.out.println( "Array was "+$m );
end
If you change dialect above to mvel the code no longer compiles. If you
change it to mvel and use the mvel list syntax ["Sample string", "Another
string", "And done"] you don't have an array so methods requiring an array
do not work. Concrete example: I want to log 3 values using a logging
framework. Many logging frameworks (like sl4j) support a notation like
Logger.warn("My name is {} and you killed my {}", array); where array has
"Inigo Montonya" and "father" for values.
Thanks for any advice!
Zack
--
View this message in context: http://drools.46999.n3.nabble.com/How-to-use-lists-in-RHS-when-using-MVEL...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 8 months
How to use GlobalArea enum inside package defined rules
by pravinborekar
Hi,
Would like to use GlobalArea enumeration ----- 'Member.title': ['Mr.',
'Miss']
in my custom package rule. Am trying to access it in DSL rule (as we want
guided editor to use enum), like---- {title:ENUM:Member.title}
If I create above enum in custom package, am able to do it cleanly.
Also tried using --- {title:ENUM:GlobalArea.Member.title} , but it didnt
work.
Need help on how to access the global area enum, as we need to use the same
across many packages.
Regards, Pravin
--
View this message in context: http://drools.46999.n3.nabble.com/How-to-use-GlobalArea-enum-inside-packa...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 8 months
Performance: Stateful vs. Stateless Session
by tonytang
Can anybody help me to explain the performance between Stateful and Stateless
session?
I write a very simple test code to test the performance:
Just a message,if the id is odd then set a attribute to "odd"
if it is even then set to "even".
insert message one by one, and insert 1,000,000 times.
Rule:
rule "even"
when
message: Message()
eval((message.getId() % 2) == 0)
then
message.setOddOrEven("odd");
end
rule "odd"
when
message: Message()
eval((message.getId() % 2) == 1)
then
message.setOddOrEven("even");
end
message class just id and oddOrEven
public class Message {
private int id;
private String oddOrEven;
public Message(int id){
this.id = id;
}
// getter and setter
}
My test code:
// create statefulSession and statelessfulSession out of KnowledgeBase
StatefulKnowledgeSession statefulSession =
kbase.newStatefulKnowledgeSession();
StatelessKnowledgeSession statelessfulSession =
kbase.newStatelessKnowledgeSession();
int messageNumber = 1000000; // total message number
Random random = new Random(); // to generate id
long begin = System.currentTimeMillis();
for(int i = 0; i < messageNumber; i++){
FactHandle handle = statefulSession.insert(new Message(random.nextInt()));
statefulSession.retract(handle);
}
statefulSession.dispose();
long end = System.currentTimeMillis();
long statefulTime = end - begin;
begin = System.currentTimeMillis();
for(int i = 0; i < messageNumber; i++){
statelessfulSession.equals(new Message(random.nextInt()));
}
end = System.currentTimeMillis();
long statelessTime = end - begin;
System.out.println("Stateful session time: " + statefulTime + " Stateless
session time: " + statelessTime);
The result: "Stateful session time: 12158 Stateless session time: 46"
oh my god...
Is there any place is wrong in my code ?
--
View this message in context: http://drools.46999.n3.nabble.com/Performance-Stateful-vs-Stateless-Sessi...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 8 months
Connection with Active Directory multiple organizational units
by G3
I am able to authenticate with Active Directory but with only a single
organizational unit but not with users of multiple organizational units
This is my organizational structure
+cn=test,cn=con
--+ou=Sample1
-----uid:user1,uid:user2
--+ou=Sample2
-----uid:user3,uid:user4
--+roles
-----admin:uid:user1,user3
-----user:uid:user2,user4
I have set the admin rights accordingly in Guvnor.
I am using Jboss Guvnor standalone 4.2.3 and I am trying to connect
multiple organizational units using JAAS
my login-config.xml
---------------------
<application-policy name="adConnection">
<authentication>
<login-module code="org.jboss.security.auth.spi.LdapExtLoginModule"
flag="required" >
<module-option
name="java.naming.provider.url">ldap://c.test.com:389/</module-option>
<module-option
name="java.naming.security.authentication">simple</module-option>
<module-option
name="bindDN">CN=Administrator,CN=Users,dc=test,dc=com</module-option>
<module-option name="bindCredential">password</module-option>
<module-option name="baseCtxDN">OU=Sample1,dc=test,dc=com</module-option>
<module-option name="baseFilter">(CN={0})</module-option>
<module-option name="rolesCtxDN">OU=roles,dc=test,dc=com</module-option>
<module-option name="uidAttributeID">member</module-option>
<module-option name="matchOnUserDN">true</module-option>
<module-option name="roleFilter">(member={1})</module-option>
<module-option name="roleAttributeID">CN</module-option>
<module-option name="roleRecursion">-1</module-option>
</login-module>
<login-module code="org.jboss.security.auth.spi.LdapExtLoginModule"
flag="required" >
<module-option
name="java.naming.provider.url">ldap://c.test.com:389/</module-option>
<module-option
name="java.naming.security.authentication">simple</module-option>
<module-option
name="bindDN">CN=Administrator,CN=Users,dc=test,dc=com</module-option>
<module-option name="bindCredential">password</module-option>
<module-option name="baseCtxDN">OU=Sample2,dc=test,dc=com</module-option>
<module-option name="baseFilter">(CN={0})</module-option>
<module-option name="rolesCtxDN">OU=roles,dc=test,dc=com</module-option>
<module-option name="uidAttributeID">member</module-option>
<module-option name="matchOnUserDN">true</module-option>
<module-option name="roleFilter">(member={1})</module-option>
<module-option name="roleAttributeID">CN</module-option>
<module-option name="roleRecursion">-1</module-option>
</login-module>
</authentication>
</application-policy>
and my component.xml
-------------------------
<security:identity authenticate-method="#{authenticator.authenticate}"
jaas-config-name="adConnection"/>
I donot get any errors in server console during deployment but when login
,I cannot login into Guvnor and I get password or user name incorrect.Can
some one help me out
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Connection-with-Activ...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 8 months
JBRULES-3260: Events forced to zero expirationOffset
by Robert Crawford
It seems like ever since I found this, I can't stop tripping this condition.
Basically, while adding the DRL files to the KnowledgeBuilder,
ReteooRuleBase decides it has to reconcile event definitions from different
"packages", so it looks for any that are assignable. At first I thought this
was just a guard against having a parent expire quicker than a child class
and breaking rules for the child. But now I'm getting this condition for A
SINGLE CLASS WITH NO INHERITANCE.
At the root of the problem is ReteooRuleBase line 477:
node.setExpirationOffset( Math.max( node.getExpirationOffset(),
typeDeclaration.getExpirationOffset()+1 ) );
Since neither node nor typeDeclaration have declared expirations, they both
have expirationOffset values of -1. The code evaluates:
max(-1, -1 + 1)
sets the expirationOffset for node to zero, and from then on my objects are
expired literally as I insert them.
If someone could more clearly state the conditions that trip this code, I'd
do my best to avoid them. I've already eliminated inheritance among my
events, but that doesn't seem to be enough.
--
View this message in context: http://drools.46999.n3.nabble.com/JBRULES-3260-Events-forced-to-zero-expi...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 8 months
Define global variables at the top of a rules file
by Martin A
Hello,
I'd like to set global rules variables at the top of a rules file, like so:
global int WELCOME_SCREEN = 1;
so that I may easily refer to them from inside the rules, instead of
hardcoding them somewhere in code. Is this possible?
Best regards,
Martin
14 years, 8 months
Re: [rules-users] check if a Enum object is present in condition
by Ansgar Konermann
Am 22.10.2011 20:28 schrieb "Martin A" <wmlsub(a)gmail.com>:
>
> Hello,
>
> I try to put a condition in my LHS, such as:
>
> rule "initial_playground_dialog"
> #agenda-group "firstTimeUser"
> #salience 99
> when
> $gst :
GameStateController(!hasEventOccurred("initial_playground_dialog"))
> $list : List()
> $screen : FrontendScreen.PLAYGROUND
> then
> ....
> end
>
> where 'FrontendScreen' is an enum and PLAYGROUND is its property.
Is it actually a property of an enum or rather one of the enum literals?
If it is actually a property, you will need to obtain an instance of the
FrontendScreen enum first. If PLAYGROUND is actually an enum literal and you
want to bind this literal to a variable, use:
$screen: FrontendScreen( this == FrontendScreen.PLAYGROUND )
Regards
Ansgar
> However I get a syntax error. What's the proper way to check for and
assign such a session object?
>
> Any help is appreciated!
>
> Best regards,
> Martin
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
14 years, 8 months