Handling of String Variables in Script Task with more than 4k characters [VF 20.2 RN]

Vidispine

Handling of String Variables in Script Task with more than 4k characters [VF 20.2 RN]

Prior version 20.2, string variables with more than 4048 characters could not be handled in script tasks. VidiFlow now provides special script task functions for reading the content from such variables, and writing more than 4048 characters into string variables.

Behavior

In practice, strings might have large content, e.g. when a Read File Content task was used which creates such a string as output.
In order to read the content of a string with more than 4048 characters ("long string" called in the following), you can now use the function

  • com.s4m.dmm.platform.utility.VpmsStringVariableUtil.toString

For writing long string into another string variable you can use

  • com.s4m.dmm.platform.utility.VpmsStringVariableUtil.createV-pmsLongString

Examples:

Read long string into a string variable

var data = com.s4m.dmm.platform.utility.VpmsStringVariableUtil.toString(execution.getVariable("longString"));


Create a long string variable

var data = com.s4m.dmm.platform.utility.VpmsStringVariableUtil.createVpmsLongString("longString");