fixed bug 15739: In Oracle, I get an error when disabling Heartbeat
authorAsier Lostalé <asier.lostale@openbravo.com>
Mon, 24 Jan 2011 12:34:13 +0100
changeset 10087 e81caae0b006
parent 10086 b071c4b4756f
child 10088 0da38d38879c
fixed bug 15739: In Oracle, I get an error when disabling Heartbeat

Changed log column from varchar2(4000 byte) to CLOB in this way there is no
size restrictions.
Removed log truncation done for issue #15115, as now is no longer needed.
src-db/database/model/tables/AD_PROCESS_RUN.xml
src/org/openbravo/scheduling/ProcessRunner.java
--- a/src-db/database/model/tables/AD_PROCESS_RUN.xml	Mon Jan 24 10:32:00 2011 +0100
+++ b/src-db/database/model/tables/AD_PROCESS_RUN.xml	Mon Jan 24 12:34:13 2011 +0100
@@ -61,7 +61,7 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <column name="LOG" primaryKey="false" required="false" type="VARCHAR" size="4000" autoIncrement="false">
+      <column name="LOG" primaryKey="false" required="false" type="CLOB" size="4000" autoIncrement="false">
         <default/>
         <onCreateDefault/>
       </column>
--- a/src/org/openbravo/scheduling/ProcessRunner.java	Mon Jan 24 10:32:00 2011 +0100
+++ b/src/org/openbravo/scheduling/ProcessRunner.java	Mon Jan 24 12:34:13 2011 +0100
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2008-2009 Openbravo SLU 
+ * All portions are Copyright (C) 2008-2011 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -91,16 +91,9 @@
     } finally {
       final String duration = ProcessMonitor.getDuration(endTime - startTime);
       ProcessRequestData.update(conn, COMPLETE, requestId);
-
-      // Get process log and truncate to 4000 characters if it is bigger
-      String processLog = bundle.getLog();
-      if (processLog.length() > 4000) {
-        processLog = processLog.substring(0, 3997) + "...";
-      }
-      ProcessRunData.update(conn, ctx.getUser(), status, duration, processLog, executionId);
+      ProcessRunData.update(conn, ctx.getUser(), status, duration, bundle.getLog(), executionId);
     }
 
     return executionId;
   }
-
 }