[portal-commits] JBoss Portal SVN: r11928 - branches/JBoss_Portal_2_6_6_JBPORTAL-2109/cms/src/main/org/jboss/portal/cms/workflow.

portal-commits at lists.jboss.org portal-commits at lists.jboss.org
Thu Sep 18 02:20:52 EDT 2008


Author: sohil.shah at jboss.com
Date: 2008-09-18 02:20:52 -0400 (Thu, 18 Sep 2008)
New Revision: 11928

Modified:
   branches/JBoss_Portal_2_6_6_JBPORTAL-2109/cms/src/main/org/jboss/portal/cms/workflow/ApprovePublishImpl.java
   branches/JBoss_Portal_2_6_6_JBPORTAL-2109/cms/src/main/org/jboss/portal/cms/workflow/FinalizePublish.java
Log:
JBPORTAL-2159 - ApprovePublish workflow throws exception when updated content exceeds column width of JBPM_VARIABLEINSTANCE.STRINGVALUE_ (255 bytes)

Modified: branches/JBoss_Portal_2_6_6_JBPORTAL-2109/cms/src/main/org/jboss/portal/cms/workflow/ApprovePublishImpl.java
===================================================================
--- branches/JBoss_Portal_2_6_6_JBPORTAL-2109/cms/src/main/org/jboss/portal/cms/workflow/ApprovePublishImpl.java	2008-09-18 04:12:53 UTC (rev 11927)
+++ branches/JBoss_Portal_2_6_6_JBPORTAL-2109/cms/src/main/org/jboss/portal/cms/workflow/ApprovePublishImpl.java	2008-09-18 06:20:52 UTC (rev 11928)
@@ -464,7 +464,7 @@
          }
 
          processInstance.getContextInstance().setVariable("approved", new Boolean(true));
-         processInstance.getContextInstance().setVariable("modifiedContent", modifiedContent);
+         processInstance.getContextInstance().setVariable("modifiedContent", modifiedContent.getBytes());
 
          Collection allTasks = processInstance.getTaskMgmtInstance().getTaskInstances();
          if (allTasks != null)

Modified: branches/JBoss_Portal_2_6_6_JBPORTAL-2109/cms/src/main/org/jboss/portal/cms/workflow/FinalizePublish.java
===================================================================
--- branches/JBoss_Portal_2_6_6_JBPORTAL-2109/cms/src/main/org/jboss/portal/cms/workflow/FinalizePublish.java	2008-09-18 04:12:53 UTC (rev 11927)
+++ branches/JBoss_Portal_2_6_6_JBPORTAL-2109/cms/src/main/org/jboss/portal/cms/workflow/FinalizePublish.java	2008-09-18 06:20:52 UTC (rev 11928)
@@ -54,7 +54,7 @@
    {
       Content content = (Content)executionContext.getContextInstance().getVariable("content");
       boolean approved = ((Boolean)executionContext.getContextInstance().getVariable("approved")).booleanValue();
-      String modifiedContent = (String)executionContext.getContextInstance().getVariable("modifiedContent");
+      byte[] modifiedContent = (byte[])executionContext.getContextInstance().getVariable("modifiedContent");
       long processId = executionContext.getProcessInstance().getId();
       CMS cms = this.getCMSService();
 
@@ -83,9 +83,9 @@
                new Locale(language));
             File file = (File)cms.execute(command);
             
-            if(modifiedContent != null && modifiedContent.trim().length()>0)
+            if(modifiedContent != null)
             {
-               file.getContent().setBytes(modifiedContent.getBytes());
+               file.getContent().setBytes(modifiedContent);
             }
 
             //now publish this




More information about the portal-commits mailing list