Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Force subsessions to be created remotely

  • Loading branch information...
commit deed27baf4e3f3c838ae0356b03780b66b27638b 1 parent 2cdcf9d
@sotty sotty authored
View
11 drools-mas-core/src/main/resources/org/drools/mas/acl_content_based_routing.drl
@@ -64,6 +64,10 @@ then
end
+query subLocation( String $target )
+ SessionLocator( mind == false, $target := nodeId )
+end
+
rule "Generate Session"
salience 9999
when
@@ -71,10 +75,11 @@ when
$key : String( this != "" ) from $el
not SessionMapping( $key ; )
$conf: DroolsAgentConfiguration()
- $sessionLocator: SessionLocator(mind == true)
+ $sessionLocator: SessionLocator( mind == true )
+ ?subLocation( $target ; )
then
String sid = $key;
- String targetLocation = $conf.getMindNodeLocation(); //apply load balancing policy here
+ String targetLocation = $target; // $conf.getMindNodeLocation(); //apply load balancing policy here
insert( new SessionMapping( $key, sid ) );
if( LoggerHelper.isDebugEnabled() ){
@@ -88,7 +93,7 @@ then
null, // use default changeset
targetLocation ),
GridHelper.getGrid() ).getStatefulKnowledgeSession();
- kSession.insert(new SessionLocator( targetLocation, sid , false, true) );
+ kSession.insert( new SessionLocator( targetLocation, sid , false, true) );
kSession.insert( $sessionLocator );
kSession.fireAllRules();
Please sign in to comment.
Something went wrong with that request. Please try again.