[rules-users] RuleFlow only calling first RuleFlowGroup when called through drools-server

rtmacphail rtmacphail at gov.pe.ca
Thu Feb 17 11:04:47 EST 2011


I am new to Drools and I am having the exact same problem. Have you found any
resolution yet? How are you starting the ruleflow? I'm creating a
StartProcessCommand object and adding it to the BatchExecution Command. I am
not sending a FireAllRules command as this seems to make the rules fire
independently of the flow.

Basically I do something like this:

		//create an insertCommand object and insert the passed in fact model into
it.
		InsertObjectCommand insertCommand = (InsertObjectCommand) 
CommandFactory.newInsert(factModel);
		insertCommand.setObject(factModel);
		//set the out identifier. This is a string that will be used to identify
		//this particular fact model in the execution result response.
		insertCommand.setOutIdentifier(factHandle);
		insertCommand.setEntryPoint("DEFAULT"); //not sure what this does.
		//tell the drools server to pass the fact model back to the client
		//as part of the response
		insertCommand.setReturnObject(true);

		StartProcessCommand startProcessCommand = new StartProcessCommand();
		startProcessCommand.setProcessId(processId);
		commandList.add(startProcessCommand);
		//add the command to the passed in array list
		commandList.add(insertCommand);

		BatchExecutionCommand batchCommand =
CommandFactory.newBatchExecution(commandList,knowledgeSession);
		//Use the BatchExecutionHelper class to convert the batch command to an
XML stream to be sent to the
		//drool-server's rest api.
		String commandXML =
BatchExecutionHelper.newXStreamMarshaller().toXML(batchCommand);

Then I send the commandXML to the server using HttpClient. Is this similar
to what you do?
-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/RuleFlow-only-calling-first-RuleFlowGroup-when-called-through-drools-server-tp2514244p2520132.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list