diff --git a/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/production_packing_list_causality_workflow/scripts/PackingList_afterEdit.xml b/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/production_packing_list_causality_workflow/scripts/PackingList_afterEdit.xml
index 4f7f1e7fd01339db6d7be9c9cb353667e0ed5410..ff20c6a7a9ebe58cb780461d3e1bcb30a2aabbb7 100644
--- a/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/production_packing_list_causality_workflow/scripts/PackingList_afterEdit.xml
+++ b/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/production_packing_list_causality_workflow/scripts/PackingList_afterEdit.xml
@@ -3,11 +3,8 @@
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.PythonScripts.PythonScript</string>
-          <string>PythonScript</string>
-        </tuple>
-        <none/>
+        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
@@ -69,8 +66,7 @@
         <item>
             <key> <string>_body</string> </key>
             <value> <string>context = state_change[\'object\']\n
-if context.getSimulationState()!=\'draft\':\n
-  context.activate().updateCausalityState()\n
+context.activate().updateCausalityState()\n
 </string> </value>
         </item>
         <item>
diff --git a/bt5/erp5_mrp/bt/change_log b/bt5/erp5_mrp/bt/change_log
index 32e8ca35d590383a67a08b2349d4cea3d487269f..dc3b19176a781acdf39b4a4b5ec2b0c9c44e91f5 100644
--- a/bt5/erp5_mrp/bt/change_log
+++ b/bt5/erp5_mrp/bt/change_log
@@ -1,3 +1,6 @@
+2007-11-14 kazuhiko
+* check if simulation state is draft or not before calling 'calculate' workflow method otherwise causality state can remain calculating.
+
 2007-09-25 yo
 * Set module group on portal types.
 
diff --git a/bt5/erp5_mrp/bt/revision b/bt5/erp5_mrp/bt/revision
index 2e66562e2705f8e5c5ddccceeecaab861194f30a..c5b431b6cba29540b4b284840ff229bce0460886 100644
--- a/bt5/erp5_mrp/bt/revision
+++ b/bt5/erp5_mrp/bt/revision
@@ -1 +1 @@
-49
\ No newline at end of file
+50
\ No newline at end of file
diff --git a/bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_report_causality_workflow/scripts/PackingList_afterEdit.xml b/bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_report_causality_workflow/scripts/PackingList_afterEdit.xml
deleted file mode 100644
index 4f7f1e7fd01339db6d7be9c9cb353667e0ed5410..0000000000000000000000000000000000000000
--- a/bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_report_causality_workflow/scripts/PackingList_afterEdit.xml
+++ /dev/null
@@ -1,148 +0,0 @@
-<?xml version="1.0"?>
-<ZopeData>
-  <record id="1" aka="AAAAAAAAAAE=">
-    <pickle>
-      <tuple>
-        <tuple>
-          <string>Products.PythonScripts.PythonScript</string>
-          <string>PythonScript</string>
-        </tuple>
-        <none/>
-      </tuple>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <item>
-            <key> <string>Python_magic</string> </key>
-            <value>
-              <none/>
-            </value>
-        </item>
-        <item>
-            <key> <string>Script_magic</string> </key>
-            <value> <int>3</int> </value>
-        </item>
-        <item>
-            <key> <string>__ac_local_roles__</string> </key>
-            <value>
-              <none/>
-            </value>
-        </item>
-        <item>
-            <key> <string>_bind_names</string> </key>
-            <value>
-              <object>
-                <klass>
-                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
-                </klass>
-                <tuple/>
-                <state>
-                  <dictionary>
-                    <item>
-                        <key> <string>_asgns</string> </key>
-                        <value>
-                          <dictionary>
-                            <item>
-                                <key> <string>name_container</string> </key>
-                                <value> <string>container</string> </value>
-                            </item>
-                            <item>
-                                <key> <string>name_context</string> </key>
-                                <value> <string>context</string> </value>
-                            </item>
-                            <item>
-                                <key> <string>name_m_self</string> </key>
-                                <value> <string>script</string> </value>
-                            </item>
-                            <item>
-                                <key> <string>name_subpath</string> </key>
-                                <value> <string>traverse_subpath</string> </value>
-                            </item>
-                          </dictionary>
-                        </value>
-                    </item>
-                  </dictionary>
-                </state>
-              </object>
-            </value>
-        </item>
-        <item>
-            <key> <string>_body</string> </key>
-            <value> <string>context = state_change[\'object\']\n
-if context.getSimulationState()!=\'draft\':\n
-  context.activate().updateCausalityState()\n
-</string> </value>
-        </item>
-        <item>
-            <key> <string>_code</string> </key>
-            <value>
-              <none/>
-            </value>
-        </item>
-        <item>
-            <key> <string>_filepath</string> </key>
-            <value>
-              <none/>
-            </value>
-        </item>
-        <item>
-            <key> <string>_params</string> </key>
-            <value> <string>state_change,**kw</string> </value>
-        </item>
-        <item>
-            <key> <string>errors</string> </key>
-            <value>
-              <tuple/>
-            </value>
-        </item>
-        <item>
-            <key> <string>func_code</string> </key>
-            <value>
-              <object>
-                <klass>
-                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
-                </klass>
-                <tuple/>
-                <state>
-                  <dictionary>
-                    <item>
-                        <key> <string>co_argcount</string> </key>
-                        <value> <int>1</int> </value>
-                    </item>
-                    <item>
-                        <key> <string>co_varnames</string> </key>
-                        <value>
-                          <tuple>
-                            <string>state_change</string>
-                            <string>kw</string>
-                            <string>_getitem_</string>
-                            <string>context</string>
-                            <string>_getattr_</string>
-                          </tuple>
-                        </value>
-                    </item>
-                  </dictionary>
-                </state>
-              </object>
-            </value>
-        </item>
-        <item>
-            <key> <string>func_defaults</string> </key>
-            <value>
-              <none/>
-            </value>
-        </item>
-        <item>
-            <key> <string>id</string> </key>
-            <value> <string>PackingList_afterEdit</string> </value>
-        </item>
-        <item>
-            <key> <string>warnings</string> </key>
-            <value>
-              <tuple/>
-            </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-</ZopeData>
diff --git a/bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_report_causality_workflow/scripts/PackingList_calculate.xml b/bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_report_causality_workflow/scripts/PackingList_calculate.xml
index c6aeb19ea371cd2b61f1ac578fa407d70a052ff8..771ed8627bdb575229d62afbfba3bd09f58c788c 100644
--- a/bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_report_causality_workflow/scripts/PackingList_calculate.xml
+++ b/bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_report_causality_workflow/scripts/PackingList_calculate.xml
@@ -3,11 +3,8 @@
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.PythonScripts.PythonScript</string>
-          <string>PythonScript</string>
-        </tuple>
-        <none/>
+        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
@@ -69,8 +66,7 @@
         <item>
             <key> <string>_body</string> </key>
             <value> <string>context = state_change[\'object\']\n
-if context.getSimulationState()!=\'draft\':\n
-  context.activate().updateCausalityState()\n
+context.activate().updateCausalityState()\n
 </string> </value>
         </item>
         <item>
diff --git a/bt5/erp5_project/bt/change_log b/bt5/erp5_project/bt/change_log
index 3ee9507036137b7eb40d128fa7b4fe059812efef..88e82eb1a8228dbaad183d590f0141f64e003540 100644
--- a/bt5/erp5_project/bt/change_log
+++ b/bt5/erp5_project/bt/change_log
@@ -1,3 +1,6 @@
+2007-11-14 kazuhiko
+* check if simulation state is draft or not before calling 'calculate' workflow method otherwise causality state can remain calculating.
+
 2007-09-20 yo
 * Set Source Project on Task Report, if all lines share the same Source Project.
 * Show Source Project in Task Report Module.
diff --git a/bt5/erp5_project/bt/revision b/bt5/erp5_project/bt/revision
index 4f36264f98ddc28fc47c7d1838508927951e7552..6c0c8340ea7a0cd49ae705eace128ab18a729ec4 100644
--- a/bt5/erp5_project/bt/revision
+++ b/bt5/erp5_project/bt/revision
@@ -1 +1 @@
-360
\ No newline at end of file
+362
\ No newline at end of file
diff --git a/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_causality_workflow/scripts/PackingList_afterEdit.xml b/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_causality_workflow/scripts/PackingList_afterEdit.xml
index 4f7f1e7fd01339db6d7be9c9cb353667e0ed5410..ff20c6a7a9ebe58cb780461d3e1bcb30a2aabbb7 100644
--- a/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_causality_workflow/scripts/PackingList_afterEdit.xml
+++ b/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_causality_workflow/scripts/PackingList_afterEdit.xml
@@ -3,11 +3,8 @@
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.PythonScripts.PythonScript</string>
-          <string>PythonScript</string>
-        </tuple>
-        <none/>
+        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
@@ -69,8 +66,7 @@
         <item>
             <key> <string>_body</string> </key>
             <value> <string>context = state_change[\'object\']\n
-if context.getSimulationState()!=\'draft\':\n
-  context.activate().updateCausalityState()\n
+context.activate().updateCausalityState()\n
 </string> </value>
         </item>
         <item>
diff --git a/bt5/erp5_trade/bt/change_log b/bt5/erp5_trade/bt/change_log
index 667913772fda9d2d821ed0b165a69b354a1c835a..6ddf959133e1c8138aedfdf8b79cfe8f276da9bd 100644
--- a/bt5/erp5_trade/bt/change_log
+++ b/bt5/erp5_trade/bt/change_log
@@ -1,3 +1,6 @@
+2007-11-14 kazuhiko
+* check if simulation state is draft or not before calling 'calculate' workflow method otherwise causality state can remain calculating.
+
 2007-10-30 yo
 * Set pricing_interaction_workflow to Container, Container Line, Internal Packing List Line, Inventory Line, Purchase Order Line, Purchase Packing List Line, Returned Sale Packing List Line, Sale Order Line, and Sale Packing List Line.
 
diff --git a/bt5/erp5_trade/bt/revision b/bt5/erp5_trade/bt/revision
index aa59885c836ad82e8a621dbdde0bf9fb7a80c346..70e1a64c23f0dc1eb79598f64221bd0c38f18b97 100644
--- a/bt5/erp5_trade/bt/revision
+++ b/bt5/erp5_trade/bt/revision
@@ -1 +1 @@
-143
\ No newline at end of file
+144
\ No newline at end of file