cancel
Showing results for 
Search instead for 
Did you mean: 

Long string stored as serialised byte array

kethur
Champ in-the-making
Champ in-the-making
Hi,

in my workflow i have a long string (around 1000 characters) and when i use the below statement it stores the value in ge_byte_array table.  I really need to read this value using HQL query in my java code.

execution.setVariable("", "Long string with some special characters");

Why is it storing a string as byte array.  The size of the column for text_ is 4000 in my postgres database.

Thanks,
Raj
4 REPLIES 4

trademak
Star Contributor
Star Contributor
Can you post the code you are actually using? Are you sure it's a string?

Best regards,

kethur
Champ in-the-making
Champ in-the-making
Yes, its a string in a groovy script task.
<code>
      def details = "User Id:${userId}; Actioned by = ${actionedBy}; Role:${matchRole}; Access Right: ${accessRole}; Group:${groupId}; Request Type:${requestTypeM}; Priority:${priorityM}; &lt;br&gt;Reason Text:${reasonM};Request#:${workflowItemId.minus('_TEMP')}; ";
      execution.setVariable("recDetails", details);
</code>
     
recDetails is the one that is stored in GE_BYTE_ARRAY.

trademak
Star Contributor
Star Contributor
Okay, could you create a unit test for this and attach it to a JIRA?

Thanks,

kethur
Champ in-the-making
Champ in-the-making
I have figured out that the string i am defining has other variables concatinated to it.  That makes my string a GString object.  Hence thats stored as byte array.  to avoid this i had to use toString method on Gstring object which returns a string in groovy.

Raj