Drools mvel consequence if (logEnabled) discussion/disabled if statement
by AberAber
I know I've seen other posts saying that if statement in consequence has been
disabled due to it being poor practice, but I see the use in logging.
Lets say in consequence I have a complicated rule with 5 conditions and an
action:
modify($score) {
value = $score.value + 1;
}
if (log.debugEnabled) // errors since no if statement
{
log.debug("Added score + 1 for file " + $file + " now has updated
score of "+ $score.value);
}
This is impossible in mvel as if statement is disabled. I still want my
rule to fire if debug is disabled, so I can't add eval(log.debugEnabled) to
rule.
A stupid workaround is
for (int x = 0; ((x < 1) && log.debugEnabled); x = x + 1) {
I have a bunch of rules with different log change statements, so I see the
use of adding if statement back for mvel.
Is there a better workaround?
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-mvel-consequence-if-logEnabled-d...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years
Call for Papers, edBPM11, 5th International Workshop on Event-Driven Business Process Management, collocated with BPM 2011
by Adrian Paschke
----------------------------------------------------------------------------
-----------------
Dear colleagues (with apologies for cross-posting),
you are invited to submit papers for the 5th International Workshop on
Event-Driven Business Process Management to be held alongside the Busines
Process Management Conference on August 29th 2011 in Clermont-Ferrand,
France
<Event-Driven Business Process Management> (EDBPM) is an enhancement of
Business Process Management (BPM) by new concepts of Service Oriented
Architecture (SOA), Event Driven Architecture (EDA), Software as a Service
(SaaS), Business Activity Monitoring (BAM) and Complex Event Processing
(CEP). In this context, BPM means a software platform which provides
companies the ability to model, manage, and optimize these processes for
significant gain. As an independent system, CEP is a parallel running
platform that analyses and processes events. The BPM- and the CEP-platform
correspond via events which are produced by the BPM-workflow engine and by
the - if distributed -- IT services which are associated with the business
process steps. Also events coming from different event sources in different
forms can trigger a business process or influence the execution of the
process or a service, which can result in another event. Even more, the
correlation of these events in a particular context can be treated as a
complex, business level event, relevant for the execution of other business
processes or services closing the loop of insight-to-action. A business
process - arbitrarily fine or coarse grained - can be seen as a service
again and can be "choreographed" with other business processes or services,
even between different enterprises and organisations.
Loosely coupled event-driven architecture for BPM provides important
benefits:
. Responsiveness. Events can occur at any time from any source and processes
respond to them immediately, whenever they happen and wherever they happen.
. Agility. New processes can be modeled, implemented, deployed, and
optimized more quickly in response to changing business requirements.
. Flexibility. Processes can span heterogeneous platforms and programming
languages. Participating applications can be upgraded or changed without
breaking the process model.
TOPICS
Authors are invited to submit novel contributions in the above mentioned
problem domain. Specifically, the relevant topics include, but are not
limited to:
. Event-driven BPM: Concepts
e.g. role of event processing in BPM, business events: types and
representation, vent stream processing in business processes, process event
processing in CEP, data- and event-driven business processes, event and
process interaction patterns
. Design-time CEP and BPM
e.g. modelling modelling events in human-oriented tasks,
semantics/ontologies for event-driven BPM, BPMN and event processing,
interaction modelling of process model and event processing network.
. Run-time CEP and BPM
e.g. event pattern detection, BPEL and event processing, reasoning about
unknown/ similar events
. Applications/ Use use cases for event-driven BPM
e.g. event-driven monitoring/ BAM , event-driven SLA monitoring,
context-aware BPM
The Workshop is planned as a full-day event, including a keynote, paper
presentations, lightning talks, demos, posters, and a moderated, open
discussion with the clear goal of agreeing upon a research roadmap for
event-driven Business Process Management research, by taking into account
new challenges, described earlier.
SUBMISSION
The following types of submission are solicited:
. Long paper submissions, describing substantial contributions of novel
ongoing work. Long papers should be at most 12 pages long.
. Short paper submissions, describing work in progress. These papers should
be at most 6 pages long.
. Use case submissions, describing results from an edBPM use case. These
papers should be at most 4 pages long.
Papers should be submitted in the new LNBIP format
(http://www.springer.com/computer/lncs?SGWID=0-164-7-487211-0). Papers have
to present original research contributions not concurrently submitted
elsewhere. The title page must contain a short abstract, a classification of
the topics covered, preferably using the list of topics above, and an
indication of the submission category (Long Paper/ Short Paper / Use case).
Papers can be uploaded via the workshop page on easychair, the address can
be found on the workshop homepage.
Papers will be published in the postconference proceeding (Springer Verlag)
IMPORTANT DATES
Deadline paper submissions: May 6, 2011
Notification of acceptance: June 2, 2011
Camera-ready papers: June 17, 2011
Workshops: August 29, 2011
ORGANISING COMMITTEE:
Dr. Nenad Stojanovic
FZI - Research Center for Information Technologies at the University of
Karlsruhe
Germany
Nenad.Stojanovic(a)fzi.de
Dr. Opher Etzion
Senior Technical Staff Member, Master Inventor
Event Processing Scientific Leader
IBM Research Lab in Haifa
OPHER(a)il.ibm.com
Prof. Dr. Adrian Paschke
Corporate Semantic Web, Free University Berlin, Germany and
RuleML Inc., Canada
paschke(a)inf-fu-berlin.de
Dr. Christian Janiesch
Senior Researcher
SAP Research Center Brisbane
Australia
Christianc.Jjaniesch(a)sap.com
Additional information
A complete overview about relevant topics, detailed workshop information and
contact addresses can be found on the workshop website
http://icep-edbpm11.fzi.de
----------------------------------------------------------------------------
--------------------------------------------------------
13 years
Re: [rules-users] How to use KnowledgeBase
by FrankVhh
Hi,
In theory, you can do it both ways. Depending on your situation, you will
have to assess which approach will be the best solution.
Regarding the fact that creation of a kbase takes some time, you will
probably want to avoid doing it multiple times per transaction or, at least,
cache them. Also, when your rules are part of a continupus flow, you
probably want only 1 kbase.
In your situation, mortgages, I assume your rules are following eachother
with no or very little interaction from the user. In that case, I think one
would normally use 1 knowledgebase.
Theoretically, multiple knowledgebases should be used when dealing with
completely different rulesets, with one ruleset not influencing the other
(or execution of ruleset one happening in a totally different timeframe as
to justify the use of another kbase).
I hope this makes it clear.
Regards,
Frank
ismaximum wrote:
>
> Hi
>
> I am new to Drools and just want to start developing our app with Drools.
> I have some questions regarding KnowledgeBase instantiation.
>
> Can we create a single instance of KB across the application and use it to
> create any stateful or stateless session?
> In this case, do we need to add all the rules available in our application
> or we need to create one instance for each set of rules? In other words,
> consider we have many rules including mortgage calculation/ validation,
> auditing process, interest rate calculation and many others, do we need to
> create one instance of KB for each rule or just one KB and add all the
> rules to it?
>
--
View this message in context: http://drools.46999.n3.nabble.com/How-to-use-KnowledgeBase-tp2819308p2819...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years
Rule ambiguity & Rule completeness
by Guy Moas
Could you please help with the following questions?, whether Drools
supporting it
* Rule ambiguity - Checking if multiple rules are ambiguous
* Rule completeness - Checking if the set of rules cover all the
population
Regards,
Guy Moas - Technical Project Manager
tel: +972 (73) 2608276 | mobile: +972 (52) 3624583 | X-Lite: 8276 | fax:
+972 (73) 2608205
GMoas(a)fis-software.com | http://www.fis-software.com
<http://www.fis-software.com/>
13 years
Drools - notation
by Guy Moas
Hi All,
Could you please let me know whether Drools can support the following
notation
Client.GetAge().age? (just example), 3 notations
Regards,
Guy Moas - Technical Project Manager
tel: +972 (73) 2608276 | mobile: +972 (52) 3624583 | X-Lite: 8276 | fax:
+972 (73) 2608205
GMoas(a)fis-software.com | http://www.fis-software.com
<http://www.fis-software.com/>
13 years
spring-drools api exception: Invalid property 'knowledgeAgent'
by mmjose26
Hi,
Im runnung test cases in Spring Drools 5.2M1
and I have this exception:
Exception in thread "main"
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'ksession2': Error setting property values; nested exception is
org.springframework.beans.NotWritablePropertyException: Invalid property
'knowledgeAgent' of bean class
[org.drools.container.spring.beans.StatefulKnowledgeSessionBeanFactory]:
Bean property 'knowledgeAgent' is not writable or has an invalid setter
method. Does the parameter type of the setter match the return type of the
getter?
it happens with testAgents method
If you change the source code located in the drools-spring component in
class
org.drools.container.spring.namespace.KnowledgeSessionDefinitionParser.java:
// find any kagent's for the current kbase and assign
for ( String beanName :
parserContext.getRegistry().getBeanDefinitionNames() ) {
BeanDefinition def =
parserContext.getRegistry().getBeanDefinition( beanName );
if ( KnowledgeAgentBeanFactory.class.getName().equals(
def.getBeanClassName() ) ) {
PropertyValue pvalue =
def.getPropertyValues().getPropertyValue( "kbase" );
RuntimeBeanReference tbf = (RuntimeBeanReference)
pvalue.getValue();
if ( kbase.equals( tbf.getBeanName() ) ) {
factory.addPropertyValue( "knowledgeAgent",
new RuntimeBeanReference(
beanName ) );
}
}
}
modifying: if ( kbase.equals( tbf.getBeanName() ) && "stateless".equals(
sessionType ) )
it works, becasue only stateless sessions have knowledgeAgent property.
is It Correct?
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/spring-drools-api-exc...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years
what is the difference between process variable & global variables?
by gs76pl
hi,
this seems like a basic question i should know the answer to after reading
some documentation but unfortunately after doing some tests with
onExitActions there seems to be some discrepancy between what doc reads and
how the process/action behaves. Could anyone verify my observations:
1. while documentation in "4.4. Data" reads "...Actions can access variables
directly, simply by using the name of the variable as a parameter name" in
fact this is INCORRECT as at that point actions expect a global object to be
in the session!! e.g. below code in onExitAction throws an exception if
tracker obj hasn't been defined as a global variable and entered into the
session (it doesn't matter that the process has tracker variable defined)
tracker.addVisitedNode("dasdf");
2. the only way of accessing process variables is via context object as
below
context.getVariable("tracker")
3. inserting/updating object in the session can be done
a) context.getKnowledgeRuntime().insert("myFact");
b) insert("myFact");
looks like there is no difference here and the second one is simple a
shorter version of doing the same
--
View this message in context: http://drools.46999.n3.nabble.com/what-is-the-difference-between-process-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years
KnowledgeAgent and Guvnor restart
by Gerret Hansper
Hello,
I have got an issue with the KnowledgeAgent that seems not to survive a Guvnor
restart. The scenario is as follows:
* We use Drools 5.0
* On our application server we create a KnowledgeAgent
applying a ChangeSet that points to a package binary on a separate Guvnor server
like so:
SystemEventListenerFactory.setSystemEventListener(new
SystemEventLogger());
ResourceFactory.getResourceChangeNotifierService().start();
ResourceFactory.getResourceChangeScannerService().start();
KnowledgeAgent agent =
KnowledgeAgentFactory.newKnowledgeAgent(workflowName);
agent.applyChangeSet(changeSet);
* Creating the kbase, registering globals and running sessions works fine.
* We shut down Guvnor (or the connection goes down, this was how we spotted the
problem) and restart it after a minute
* We then try to run sessions from the
same agent as above via
kagent.getKnowledgeBase().newStatefulKnowledgeSession();
which returns a ksession, but then setting a global we get
java.lang.RuntimeException: Unexpected global [log]
at
org.drools.common.AbstractWorkingMemory.setGlobal(AbstractWorkingMemory.java:5
50)
at
org.drools.impl.StatefulKnowledgeSessionImpl.setGlobal(StatefulKnowledgeSessio
nImpl.java:284)
>From the debugger I can see that indeed the ruleBase's globals map is empty. The
SystemEventLogger indicates that the KnowledgeAgent unsubscribes from its
resource when Guvnor is down and rebuilds its kbase. Also, it stops scanning the
resource and does not find it once Guvnor is up again. (See log snippet below).
Wouldn't it be better in these cases to keep the resource as is in memory and
try to rescan? I figure that as long as the resource is specified in the
changeSet it should be considered part of the kbase and not be removed if it
cannot be found.
For the time being, does anyone have a suggestion how to avoid these problems?
We could catch the RuntimeException and recreate the KnowledgeAgent, but perhaps
there is a better way?
Thanks, Gerret
-- SystemEventLog --
# Guvnor is up here
07:58:01,881 ResourceChangeScanner attempt to scan 1 resources
07:58:02,209 ResourceChangeScanner thread is waiting for 60
07:58:15,067 ResourceChangeScanner attempt to scan 1 resources
# Guvnor goes down here
07:58:16,738 ResourceChangeScanner removed resource=[UrlResource
path='http://localhost:7080/drools-
guvnor/org.drools.guvnor.Guvnor/package/com.foo.bar/LATEST']
07:58:16,738 ResourceChangeNotification received ChangeSet notification
07:58:16,738 ResourceChangeScanner thread is waiting for 60
07:58:16,738 ResourceChangeNotification processing ChangeSet
07:58:16,738 ResourceChangeNotification ChangeSet removed resource=[UrlResource
path='http://localhost:7080/drools-
guvnor/org.drools.guvnor.Guvnor/package/com.foo.bar/LATEST'] for
listener=org.drools.agent.impl.KnowledgeAgentImpl@1053d6d
07:58:16,738 ResourceChangeNotification ChangeSet removed resource=[UrlResource
path='http://localhost:7080/drools-
guvnor/org.drools.guvnor.Guvnor/package/com.foo.bar/LATEST'] for
listener=org.drools.agent.impl.KnowledgeAgentImpl@b71c17
07:58:16,738 KnowledgeAgent received ChangeSet changed notification
07:58:16,738 KnowledgeAgent received ChangeSet changed notification
07:58:16,738 KnowledgAgent applying ChangeSet
07:58:16,738 ResourceChangeNotification thread is waiting for queue update
07:58:16,738 KnowledgAgent applying ChangeSet
07:58:16,738 KnowledgeAgent unsubscribing from resource=[UrlResource
path='http://localhost:7080/drools-
guvnor/org.drools.guvnor.Guvnor/package/com.foo.bar/LATEST']
07:58:16,738 ResourceChangeNotification unsubscribing
listener=org.drools.agent.impl.KnowledgeAgentImpl@1053d6d to
resource=[UrlResource path='http://localhost:7080/drools-
guvnor/org.drools.guvnor.Guvnor/package/com.foo.bar/LATEST']
07:58:16,738 KnowledgeAgent rebuilding KnowledgeBase using ChangeSet
07:58:16,738 KnowledgeAgent unsubscribing from resource=[UrlResource
path='http://localhost:7080/drools-
guvnor/org.drools.guvnor.Guvnor/package/com.foo.bar/LATEST']
07:58:16,738 ResourceChangeNotification unsubscribing
listener=org.drools.agent.impl.KnowledgeAgentImpl@b71c17 to
resource=[UrlResource path='http://localhost:7080/drools-
guvnor/org.drools.guvnor.Guvnor/package/com.foo.bar/LATEST']
07:58:16,738
KnowledgeAgent rebuilding KnowledgeBase using ChangeSet
07:58:16,738 KnowledgeAgent new KnowledgeBase now built and in use
07:58:16,738 KnowledgeAgent new KnowledgeBase now built and in use
07:59:02,202 ResourceChangeScanner attempt to scan 0 resources
07:59:02,202 ResourceChangeScanner thread is waiting for 60
# Guvnor back up here
07:59:16,731 ResourceChangeScanner attempt to scan 0 resources
07:59:16,731 ResourceChangeScanner thread is waiting for 60
--
Nur noch bis 31.01.2010: DSL-Komplettpaket für 16,99 Euro/mtl.!*
http://portal.gmx.net/de/go/dsl02
13 years
Drools & jBPM Workshops (May 2011) - New York and Washington DC
by Mark Proctor
http://blog.athico.com/2011/04/drools-jbpm-workshops-may-new-york-and.html
After JBoss World we have two Drools and jBPM5 workshops in May for New
York and Washington. These are free events open to all in the public:
The events will be a mixture of talks with lots of time for questions
and discussions.
Speakers:
Mark Proctor - Drools co-creator and Project Lead
Kris Verlaenen - jBPM Project Lead
Edson Terelli - Drools technical lead.
Event: New York- Registration page and agenda
<http://www.jboss.org/events/workshops/drools.html>*
Date: *Tuesday, May 10, 2011
*Time*: 8:30am -- 5:30pm (breakfast, lunch, afternoon snack provided)
*Cost*: Free but register as seats are very limited.
*Location*: Affinia Manhattan Hotel
371 Seventh Avenue,
New York, NY 10001
Event: Washington -Registration page and agenda
<http://www.carahsoft.com/event-detail/846/redhat/>*
Date: *Thursday, May 12, 2011
*Time*: 8:30am -- 4:00pm
*Cost*: Free but register as seats are very limited.
*Location*: Renaissance Washington
999 Ninth Street, NW
Washington, DC 2000
13 years