diff --git a/product/CMFActivity/skins/activity/SQLDict_processMessage.zsql b/product/CMFActivity/skins/activity/SQLDict_assignMessage.zsql
similarity index 58%
rename from product/CMFActivity/skins/activity/SQLDict_processMessage.zsql
rename to product/CMFActivity/skins/activity/SQLDict_assignMessage.zsql
index f5051f30514d7d920d3c693795614171596e5124..4e2424530d65c30a1b6802833f32e81612980ada 100755
--- a/product/CMFActivity/skins/activity/SQLDict_processMessage.zsql
+++ b/product/CMFActivity/skins/activity/SQLDict_assignMessage.zsql
@@ -1,17 +1,15 @@
 <dtml-comment>
 title:
 connection_id:erp5_sql_connection
-max_rows:1000
-max_cache:100
+max_rows:1
+max_cache:0
 cache_time:0
 class_name:
 class_file:
 </dtml-comment>
 <params>path
-method_id
 processing_node</params>
 UPDATE message
 SET processing_node=<dtml-sqlvar processing_node type="int">
 WHERE
-  path = <dtml-sqlvar path type="string">
-<dtml-if method_id>AND method_id = <dtml-sqlvar method_id type="string"></dtml-if>
+  path = <dtml-sqlvar path type="string">
\ No newline at end of file
diff --git a/product/CMFActivity/skins/activity/SQLDict_createMessageTable.zsql b/product/CMFActivity/skins/activity/SQLDict_createMessageTable.zsql
index 2cc6a0439082febcc7dadd22dcc8a98edd931a67..62f3c2e1f3489c2a6458c4f2ecd0d33e5ddae574 100755
--- a/product/CMFActivity/skins/activity/SQLDict_createMessageTable.zsql
+++ b/product/CMFActivity/skins/activity/SQLDict_createMessageTable.zsql
@@ -8,16 +8,12 @@ class_name:
 class_file:
 </dtml-comment>
 <params></params>
-# Host: 
-# Database: test
-# Table: 'stock'
-# 
 CREATE TABLE `message` (
   `path` VARCHAR(255),
   `method_id` VARCHAR(40),
+  `processing_node` INT DEFAULT -1,
   `message` BLOB,
-  `processing_node` INT DEFAULT NULL,
   KEY `path` (`path`),
-  KEY `processing_node` (`processing_node`),
   KEY `method_id` (`method_id`),
-) TYPE = InnoDB; 
+  KEY `processing_node` (`processing_node`),
+) TYPE = InnoDB;
diff --git a/product/CMFActivity/skins/activity/SQLDict_delMessage.zsql b/product/CMFActivity/skins/activity/SQLDict_delMessage.zsql
index c347a15842b2c8822b2522eb492b585d224a323d..46069df472bdfd24086469e1120b3e52644aad7e 100755
--- a/product/CMFActivity/skins/activity/SQLDict_delMessage.zsql
+++ b/product/CMFActivity/skins/activity/SQLDict_delMessage.zsql
@@ -8,10 +8,11 @@ class_name:
 class_file:
 </dtml-comment>
 <params>path
-method_id</params>
+method_id
+processing_node</params>
 DELETE FROM
   message
 WHERE
   path = <dtml-sqlvar path type="string">
 <dtml-if method_id>AND method_id = <dtml-sqlvar method_id type="string"></dtml-if>
-  
+<dtml-if processing_node>AND processing_node = <dtml-sqlvar processing_node type="int"></dtml-if>
diff --git a/product/CMFActivity/skins/activity/SQLDict_lockMessage.zsql b/product/CMFActivity/skins/activity/SQLDict_lockMessage.zsql
deleted file mode 100755
index 1d058479a3a63f5747c5e07565c033feca28c682..0000000000000000000000000000000000000000
--- a/product/CMFActivity/skins/activity/SQLDict_lockMessage.zsql
+++ /dev/null
@@ -1,11 +0,0 @@
-<dtml-comment>
-title:
-connection_id:erp5_sql_connection
-max_rows:1000
-max_cache:100
-cache_time:0
-class_name:
-class_file:
-</dtml-comment>
-<params></params>
-LOCK TABLES message WRITE
diff --git a/product/CMFActivity/skins/activity/SQLDict_readMessage.zsql b/product/CMFActivity/skins/activity/SQLDict_readMessage.zsql
index b6436bbf6410dc312372c629d47f2b51a1a6fe30..ae22571b61401485f3887bfae483573fe17f9461 100755
--- a/product/CMFActivity/skins/activity/SQLDict_readMessage.zsql
+++ b/product/CMFActivity/skins/activity/SQLDict_readMessage.zsql
@@ -7,8 +7,10 @@ cache_time:0
 class_name:
 class_file:
 </dtml-comment>
-<params></params>
+<params>processing_node</params>
 SELECT * FROM
   message
-WHERE 
-  processing_node is NULL
+<dtml-if processing_node>
+WHERE
+  processing_node = <dtml-sqlvar processing_node type="int">
+</dtml-if>
\ No newline at end of file
diff --git a/product/CMFActivity/skins/activity/SQLDict_readMessageList.zsql b/product/CMFActivity/skins/activity/SQLDict_readMessageList.zsql
index d6e23a56af614f7b5b0f545603b37f081c2c6cb6..91cd95603df3bfb84914ccbd1e668797d28120e5 100755
--- a/product/CMFActivity/skins/activity/SQLDict_readMessageList.zsql
+++ b/product/CMFActivity/skins/activity/SQLDict_readMessageList.zsql
@@ -8,12 +8,13 @@ class_name:
 class_file:
 </dtml-comment>
 <params>path
-method_id</params>
+method_id
+processing_node</params>
 SELECT * FROM
   message
-<dtml-if "path or method_id"> 
+<dtml-if "path or method_id or processing_node">
 WHERE
-<dtml-if path>  path = <dtml-sqlvar path type="string"></dtml-if>
-<dtml-if method_id>AND method_id = <dtml-sqlvar method_id type="string"></dtml-if>
-</dtml-if>
-  
+<dtml-if processing_node> processing_node = <dtml-sqlvar processing_node type="int"> </dtml-if>
+<dtml-if path><dtml-if processing_node>AND</dtml-if> path = <dtml-sqlvar path type="string"></dtml-if>
+<dtml-if method_id><dtml-if "processing_node or path">AND</dtml-if> method_id = <dtml-sqlvar method_id type="string"></dtml-if>
+</dtml-if>
\ No newline at end of file
diff --git a/product/CMFActivity/skins/activity/SQLDict_unlockMessage.zsql b/product/CMFActivity/skins/activity/SQLDict_unlockMessage.zsql
deleted file mode 100755
index 73ca876698a995ca2c9d3ded6834dad87b01e542..0000000000000000000000000000000000000000
--- a/product/CMFActivity/skins/activity/SQLDict_unlockMessage.zsql
+++ /dev/null
@@ -1,11 +0,0 @@
-<dtml-comment>
-title:
-connection_id:erp5_sql_connection
-max_rows:1000
-max_cache:100
-cache_time:0
-class_name:
-class_file:
-</dtml-comment>
-<params></params>
-UNLOCK TABLES
diff --git a/product/CMFActivity/skins/activity/SQLDict_writeMessage.zsql b/product/CMFActivity/skins/activity/SQLDict_writeMessage.zsql
index a1803e2a146c50722412bb338a3bbd913e0c0fde..5d13141a54a5ea5123cab34778f0d7d4952acc34 100755
--- a/product/CMFActivity/skins/activity/SQLDict_writeMessage.zsql
+++ b/product/CMFActivity/skins/activity/SQLDict_writeMessage.zsql
@@ -12,4 +12,4 @@ method_id
 message</params>
 INSERT INTO message
 VALUES
- (<dtml-sqlvar path type="string">,<dtml-sqlvar method_id type="string">,<dtml-sqlvar message type="string">,NULL);
+ (<dtml-sqlvar path type="string">,<dtml-sqlvar method_id type="string">,-1,<dtml-sqlvar message type="string">);