Re: [rules-users] [rules-dev] Technical Rules
by Wolfgang Laun
There is a short hint in the Expert Manual, subsection 4.11.3, where
conversion between DRL and XML using classes such as DrlParser and XmlDumper
is discussed. A .brk is just the "native" Drools XML format.
-W
On 14 September 2010 01:17, Leonardo Gomes <leonardo.f.gomes(a)gmail.com>wrote:
> Hi Amisha,
>
> You should use the user's list: <rules-users(a)lists.jboss.org> for this
> sort of question.
>
> AFAIK, no you can't convert technical rules (manually written drl) to
> business rules (.brl) generated with the graphical editor using Guvnor.
>
> Cheers,
> Leo.
>
>
> On Mon, Sep 13, 2010 at 10:42 PM, apatel <apatel(a)ondeckcapital.com> wrote:
>
>>
>> Hi,
>>
>> Is it possible to port Technical Rules in Drools to Business Rules? Is the
>> procedure posted somewhere?
>>
>> Also is it possible to apply Drools Categories to Technical Rules?
>>
>> Thanks for your help,
>> Amisha
>> --
>> View this message in context:
>> http://drools-java-rules-engine.46999.n3.nabble.com/Technical-Rules-tp146...
>> Sent from the Drools - Dev mailing list archive at Nabble.com.
>> _______________________________________________
>> rules-dev mailing list
>> rules-dev(a)lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-dev
>>
>
>
> _______________________________________________
> rules-dev mailing list
> rules-dev(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
>
15 years, 10 months
Guvnor Asset versioning vs Package snapshot versioning
by Abdel Dridi
I am using Guvnor packaging and snapshot creation.
I have three environment DEV, UAT and Production, I configured each
environment with a package snapshot to listen to, each time the package
change, I build it then overwrite the snapshot for that particular
environment. This was working great for me, however when my server fail to
deploy the new updated snapshot package, I want to roll back to the old
working one which was overwritten already - this is a problem.
Why Guvnor does not provide package versioning, just like asset versioning?
I took a look at the code and was thinking to add a control before
overwriting the package snapshot to prevent the user to backup his package
snapshot before overwriting it which will lead to a package clone before the
overwrite happen.
What do you guys think?
I will volunteer to add this feature if you think it make sense.
Thoughts?
Abdel
15 years, 10 months
Performance differeneces using "before" or "after"
by Tina Vießmann
Hi,
I've mentioned the test case I'm working on before. It's: If a certain
value exceeds a limit more than X times within Y minutes/hours, do
something.
~> Count = X , time = Y
During a talk with other developers it came up that by intuition the men
would have chosen a other approach than the women. We can not agree if
in Drools both approaches are the same in performance or if one is more
performant.
Male approach: If a new event with a limit violation is received,
check if within the last time Y already X events with limit
violations are contained in the knowledge base .
Female approach: If a new event with a limit violation is received,
check if the following events contain X events with limit violation.
This is limited to a monitoring time of /maximal /Y. (If there have
been X events registered, before the time Y is elapsed, the window
will be closed right away.)
In code with Y = 1h it would be:
Male:
// determine new event as $triggeringEvent
$otherEvent : Value (this before[0ms,1h] $triggeringEvent)
Female:
// determine event that opened the window as $triggeringEvent
$otherEvent : Value (this after[0ms,1h] $triggeringEvent)
This is just a extract so that that the comments are in fact
meaningless. The focus lies on _before_ and _after_.
Is one solution more efficient?
Thanks! :)
Tina
15 years, 10 months
Guvnor declarative model and ASM deserialization
by Abdel Dridi
In my application I am using the following flow:
1. I am using Guvnor to allow customer to define business event structure
through the "Declarative Model" feature.
2. After defining the model, customers write rules and package them into
a snapshot where my event-driven-application-server can see.
3. My server load successfully the customer packages (couple hundreds of
them).
4. Customer uses HornetQ client to produce events that respects the model
that has been created using Guvnor.
5. I have HornetQ listeners in my application that listens to new events.
6. HornetQ listeners tries to deserialize the message bytes to an event
object to insert it to the customer ksession
The problem is that my server classloader has no idea about the model, so I
use ASM to inject the class definition when ClassNotFoundException is thrown
however this was not enough as serialVersionUID of client side object is
going to be different from the ASM default injected one.
I know some of you might say why cant I use the same static final
serialVersionUID in the client side as well as in the server side - the
answer is I want to give control to customers to define whatever business
model they want using Guvnor.
Using jar file model will not give freedom to business users that Guvnor
provide.
I am wondering if some of you were facing the same issue while using the
fusion message queue streaming gate?
I am thinking to extend the Java ObjectInputStream and implement my own
deserialization.
Could Drools ksession accept bytes along side with objects (I mean in the
future) - Something like; "ksession.insert(bytes)"
Any ideas?
Abdel
15 years, 10 months
Verify if an objects attribute exists
by lnguyen
I'm having difficulty writing this rule.
Background information:
A User can have a supervisor but it's not required.
When viewing User information I want to verify that the logged in user is
either the current user or the currentUser's supervisor but I throw an
exception when the supervisor object is null on the currentUser.
The target is the User being viewed and I have a global object that is the
current user. How can I check to see if the supervisor exists before
evaluating if the currentUser and the supervisor are equal?
rule 'CanViewUserData'
dialect 'mvel'
when
$user : User()
$supervisor : User( ) from $user.userProfile.supervisor
$check: PermissionCheck(target == $user, action == "viewUserData")
eval(isUserMatching($user)) || eval (isUserMatching($supervisor))
then
System.out.println("The currentUser CanViewUserData");
$check.grant();
end
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Verify-if-an-objects-...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 10 months
User Permissions - at rules/DSL level possible?
by Vignesh
Hi,
I am aware that we can provide user permissions at Package/Category level
and restrict the users, but i want to know whether its possible to restrict
the users by providing permissions at rules/DSL level, because we dont want
the user to modify the DSL which would be defined by the Admin and other
users would simply be using the entries in DSL for defining their rules.
Is there any way to achieve this kind of permissions and also what is the
minimum granular level of permission that we can restrict a user from? if
any one has tried this kindly help me in this regard.
Thanks,
Vignesh
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/User-Permissions-at-r...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 10 months
Drools list test
by Gustavo Tenrreiro
HI,
This is a test email.
My emails to the list don't seem to be getting there.
If anyone gets this, can you please let me know if you got it.
Thanks
15 years, 10 months