I have discovered that workflow parameters are not the same as tokens in a workflow when it comes to using them in a SDK Script. Worse than that, in the script editor, GetToken works fine to get values that are parameters into the script but when run in the workflow server, the workflow parameters are not fetchable by the SDK Script. The error messages that show are related to the invalid string values that arrive in your script. If you are passing a SQL WHERE clause, then the SQL statement will not be composed correctly from the GetToken(parameter value).
Tokens need to be created in the workflow and their values can be set using the parameter values to work around this. Some documentation could include clarification and a warning for those of use that spend days trying to find out why a script runs fine in the editor but fails to get the token values when they are workflow parameters.
Arggh.