the id of the process is only the Id attribute in the XML file.. did you try that?
Greetings.

On Wed, Dec 29, 2010 at 11:13 AM, AleBu <aleboo@gmail.com> wrote:

Hi all,
I have some complex rule execution scenario which consists of several steps
where different groups of rules must be executed. These steps are: 'Init
Data', 'Validate Integrity', 'Stop Execution if any integrity errors found'
and 'Validate Business Logic'. Originally I implemented it by assigning
specific salience to specify an order of rules, like 'Init Data' rules has
biggest salience, and 'Validate Business Logic' rules has the smallest.
I am wondering, is designing separate rule flow (very simple) is a valid
approach and wouldyoy recomend it? It should look like:
'Start' -> 'Init Data' -> 'Validate Integrity' -> 'Stop Execution if any
integrity errors found' -> 'Validate Business Logic' -> 'End'.
Also, I tried to do it by specifing 'ruleflow-group' for each rule and
creating rule-flow, but got an error 'Unknown process ID' while executing.
The code was very simple - 1st I added rule-flow file as resource to
KnowledgeBuilders DRF resource with:
               Resource flowFileRes = ResourceFactory.newFileResource( flowFile );
               knowledgeBuilder.add( flowFileRes, ResourceType.DRF );
knowledgeBuilder.hasErrors() is false at this point, so I assume that
process was added sucessfully.
Then I am executed:
session.startProcess( MAIN_FLOW_ID );
session.fireAllRules();
MAIN_FLOW_ID constist of package defined in rule-flow file and rule-flow-ID
from the same file (<package>.<flow-ID>).
But fireAllRules() claims that no such process can be found (Unknown process
ID).
Documentation is very weak and it is the only information I found about
executing processes, so perhaps I miss something, but mailing list seems
like the only place to find more info.


--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Ordering-rules-execution-ruleflow-group-or-salience-tp2162935p2162935.html
Sent from the Drools - User mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



--
 - CTO @ http://www.plugtree.com 
 - MyJourney @ http://salaboy.wordpress.com
 - Co-Founder @ http://www.jbug.com.ar
 
 - Salatino "Salaboy" Mauricio -