Company is authorized for the function library and function library is promoted to production.
However, I am receiving an indexoutofbounds when the function is called. This should just return “test” in my out parameter and there is no other code being ran here.
I have thoroughly tested my custom code above - this code handles setting the parameters and based off criteria the function will either run or it wont (condition block)
if I comment out callFunc = true; then my function does not run. This does not produce any error.
If this is not commented, then my function will run as the condition will be met and I receive an indexoutofbounds error.
also yes, the function is promoted to production and company authorized in security tab of function. Function library has read/write access and custom code functions enabled.
I have left the function signature alone but this should not matter… there is only a single line in the function which is the result = “test”; and nothing from the signature other than the out variable result are being used.
Confirmed that there is a bug (or gremlins) associated with response params.
I have left the code and the BPM the exact same. The only thing changed was I removed the response parameter from the signature of the function. This now runs without issue.
The indexoutofrange exception happens as soon as I add a response parameter to the function and map it to a variable in the BPM. If the response parameter is unmapped, I do not get an error.
It doesn’t matter if you actually use this variable anywhere or not, but I receive an error as soon as I map this to any variable including a brand new one like in this example.
Just a guess, the input\output of functions used to be tuples (not sure if thats still case).
In C#, tuples, whether using the old Tuple class or the new ValueTuple syntax, have a maximum capacity of 8 elements for a single tuple.
If you want to confirm, copy your func, reduce the number of inputs\outputs to not exceed 8 (perhaps hardcode some of the inputs in test func). If it works, that’s your problem.
To get around it, you can pass in a dataset or serialized object.