Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MAS : replace update with modify

  • Loading branch information...
commit 1a2c39d2673cc3f89ba459d4963b1fafc6e3c17a 1 parent 4aaa183
@sotty sotty authored
Showing with 19 additions and 17 deletions.
  1. +19 −17 drools-mas-core/src/main/resources/org/drools/mas/acl_internal.drl
View
36 drools-mas-core/src/main/resources/org/drools/mas/acl_internal.drl
@@ -208,7 +208,7 @@ when
$cont : ResponseContent( $nodeId: nodeId, $sessionId: sessionId, messageId == $msgId, $data : data != null )
QueryResults( size > 0 ) from $data
then
- if (LoggerHelper.isDebugEnabled()) {
+ if ( LoggerHelper.isDebugEnabled() ) {
LoggerHelper.debug(" ### INTERNAL: FIXING QUERYIF RESULTS " + $msgId );
LoggerHelper.debug(" ### INTERNAL: FIXING QUERYIF RESULTS " + $nodeId );
LoggerHelper.debug(" ### INTERNAL: FIXING QUERYIF RESULTS " + $sessionId );
@@ -217,8 +217,9 @@ then
$data = GridHelper.getQueryResultRemoteClient( grid, $nodeId, $sessionId,
( (QueryResultsDescriptor) $data ).getQueryName(), ( (QueryResultsDescriptor) $data ).getQueryId() );
}
- $cont.setData( ( (QueryResults) $data ).iterator().next().get( "$queryIf" ) );
- update( $cont );
+ modify ( $cont ) {
+ setData( ( (QueryResults) $data ).iterator().next().get( "$queryIf" ) );
+ }
end
@@ -251,19 +252,20 @@ when
QueryRef( $query : query ) from $msg.body
$cont : ResponseContent($nodeId: nodeId, $sessionId: sessionId, messageId == $msgId, $data : data != null )
then
- if (LoggerHelper.isDebugEnabled()) {
+ if ( LoggerHelper.isDebugEnabled() ) {
LoggerHelper.debug(" ### INTERNAL: FIXING RESULTS FOR QUERYREF " + $msgId);
LoggerHelper.debug(" ### INTERNAL: FIXING RESULTS FOR QUERYREF " + $nodeId);
LoggerHelper.debug(" ### INTERNAL: FIXING RESULTS FOR QUERYREF " + $sessionId);
LoggerHelper.debug(" ### INTERNAL: FIXING RESULTS FOR QUERYREF " + $data);
}
- if($data instanceof QueryResultsDescriptor){
+ if( $data instanceof QueryResultsDescriptor ) {
$data = GridHelper.getQueryResultRemoteClient( grid, $nodeId, $sessionId,
( (QueryResultsDescriptor) $data ).getQueryName(), ( (QueryResultsDescriptor) $data ).getQueryId() );
}
-
- $cont.setData( MessageContentHelper.getQueryReferences( $query, (QueryResults) $data ) );
- update( $cont );
+
+ modify ( $cont ) {
+ setData( MessageContentHelper.getQueryReferences( $query, (QueryResults) $data ) );
+ }
end
@@ -294,17 +296,17 @@ when
$req : Request( $act : action, $actName : action.actionName ) from $msg.body
$cont : ResponseContent($nodeId: nodeId, $sessionId: sessionId, messageId == $msgId, $data : data != null )
then
- if (LoggerHelper.isDebugEnabled()) {
- LoggerHelper.debug(" ### INTERNAL: FIXING RESULTS FOR REQUEST " + $msgId);
- LoggerHelper.debug(" ### INTERNAL: FIXING RESULTS FOR REQUEST " + $sessionId);
- LoggerHelper.debug(" ### INTERNAL: FIXING RESULTS FOR REQUEST " + $nodeId);
- LoggerHelper.debug(" ### INTERNAL: FIXING RESULTS FOR REQUEST " + $data);
+ if ( LoggerHelper.isDebugEnabled() ) {
+ LoggerHelper.debug( " ### INTERNAL: FIXING RESULTS FOR REQUEST " + $msgId );
+ LoggerHelper.debug( " ### INTERNAL: FIXING RESULTS FOR REQUEST " + $sessionId );
+ LoggerHelper.debug( " ### INTERNAL: FIXING RESULTS FOR REQUEST " + $nodeId );
+ LoggerHelper.debug( " ### INTERNAL: FIXING RESULTS FOR REQUEST " + $data );
}
-
- $cont.setData( MessageContentHelper.getActionReferences( $act, (Map) $data ) );
-
- update( $cont );
+
+ modify ( $cont ) {
+ setData( MessageContentHelper.getActionReferences( $act, (Map) $data ) );
+ }
end
Please sign in to comment.
Something went wrong with that request. Please try again.