How do I pass a Boolean value in a URL Argument?
Essentials 4.6.1 HTML5 Viewer 2.7.0
I'm trying to run a workflow from a URL parameter, but I'm getting an error trying to pass a "True" value to a Boolean argument defined in the workflow. My URL looks like this:
http://amandacortexdev.coacd.org/AmandaGVH/?viewer=amandagis&runWorkflow=AddressSearchByText&arSkipSearch=True&arAddress=2404%20Trailside%20Dr
The workflow launches, but I get an error that says:
Unable to retrieve the input arguments to execute the workflow Unable to serialize an input parameter. Unable to deserialize json to create ArgumentInfo. Unable to deserialize object of type 'System.Boolean'. There was an error deserializing the object of type System.Boolean. The value 'True' cannot be parsed as the type 'Boolean'. The value 'True' cannot be parsed as the type 'Boolean'. The string 'True' is not a valid Boolean value.
So how do I pass a Boolean value in a URL parameter?
0
-
If I default the value of "True" for the argument, I still get this error:
There was a workflow error running activity: Exception has been thrown by the target of an invocation. The values provided for the root activity's arguments did not satisfy the root activity's requirements: 'DynamicActivity': Expected an input parameter value of type 'System.Boolean' for parameter named 'arSkipSearch'. Parameter name: rootArgumentValues
How do I make the workflow argument Optional?0 -
The answer is to use a 1 for True and a 0 for False 0 -
Heads up that if you are setting the default value for the Boolean argument when you configure the workflow paramters from within Site Mnager, then you need to use True/False instead of 0/1.
And then even bigger heads up in case you have any legacy Silverlight viewer apps: annoyingly, the Silverlight viewer seems to require that you use True/False instead of 1/0 like the HTML5 viewer. You would expect this to be independent of the viewer technology as promised, but apparently not....so you need to be careful if you have workflows you use in both Silverlight and HTML5 viewers.0 -
Sorry I see perhaps quick clarification on setting the default parameter. If you are using Silverlight viewer then you need to use True/False. If HTML5 then 0/1. 0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
4 Kommentare