Several times now I've run into situation in which I wanted to use Input Parameters within a Workflow Script or SDK Script (Workflow 10.2), but for some reason the GetTokenValue() method doesn't seem to work as expected.
I usually work around this by putting the input parameter into a separate token and referencing that token in the script instead, but I figured it was time I mention it here to see if it might be a bug or if there is something I am missing.
From what I've seen, when I use GetTokenValue().ToString() on an Input Parameter, I always ended up with "System.String[]"
I tried the following instead:
string[] parameter = GetTokenValue("Test") as string[]; string test = parameter[0];
This seemed to work, but I'm hesitant to actually use this approach as it doesn't seem like intended behavior and my current workaround seems less likely to break if this ever changes.
Are Input Parameters meant to behave this way when using GetTokenValue?