Code Fix: A workflow containing a mathematical sum or minimum inline function, goes into an error state
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 Five (5.1) installed.
- Download the K2 Five (5.1) FP15 from K2 Partner and Customer Portal.
- Install the K2 Five (5.1) FP15 to apply the fix.
- It is recommended to clear 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.
ConsiderationsFor 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.