When running a K2 workflow configured with an Email event where the event contains a mathematical sum or minimum inline function with multiple values such as “100, 200”, the workflow goes into an error state.
The error message states: “Input string was not in the correct format” or “Unable to cast result”.
This is due to the comma being used to separate each item in the array of values for inline functions.
- Ensure you have K2 4.7 installed.
- Download and Install the K2 4.7 March 2018 Cumulative Update from K2 Partner and Customer Portal.
- Get the K2 4.7 March 2018 Cumulative Update FP18 from Regional Support.
- Install the K2 4.7 March 2018 Cumulative Update FP18 to apply the fix.
- It is recommended to refresh the browser cache.
- We now provide the ability to use a split inline function in the mathematical sum or minimum inline functions to be able to use the comma.
For the fix to be applied you need to edit your workflow and edit the inline function. Remove the values from the value property and drag a split inline function into the value property. Set the values using the split inline function. Set the separator as a comma. Finish the configuration then deploy the workflow and start a new instance.