New System.Collections.Generic.Dictionary(Of String, Object) to Invoked Workflow
I am collecting three sets of parameters to feed to an invoked async workflow.
The first two are objects and the last one is the result of a multi selection from a form, which is also an object.
I'm using a Cast<IEnumerable<Object> and assigning the objects selected in the form to be:
IEnumerableLocations = SelectedLocations
When I invoke the second workflow, the inputs to the second workflow are pasted as such:
New System.Collections.Generic.Dictionary(Of String, Object) From { { "Extent", SelectedExtentobj.ToString }, {"Chem_Name", AEF_Chemical_ToProcess.Tostring},{"AEFLocation", iEnumerable2_AEFLocations.ToString} }
But the conversion of this part of the line above is not yielding any values:
{"AEFLocation", iEnumerable2_AEFLocations.ToString}
My Questions:
1. How do you pass a list of objects contained in the IenumerableLocations as string values to the invoked workflow?
2. The invoke activity requires a (IDictionary<String,Object>) input
Walter
0
-
Hi Walter,
Just to confirm, iEnumerable2_AEFLocations is the iEnumerable from your Cast activity, correct (IEnumerableLocations), correct?
I think you've maybe assumed that everything going to the Invoked Workflow needs to be a string, but that isn't the case. Strings are just used for the argument names. Use:
New System.Collections.Generic.Dictionary(Of String, Object) From { { "Extent", SelectedExtentobj.ToString }, {"Chem_Name", AEF_Chemical_ToProcess.Tostring},{"AEFLocation", iEnumerable2_AEFLocations} }
to pass in iEnumerable2_AEFLocations as is, without the string conversion. Have an input argument with the corresponding name (AEFLocation) and type (IEnumerable<Object>?) on the workflow that gets invoked. Then maybe test by logging the value of AEFLocation(0).Tostring in the invoked workflow.
Hope that helps,
-Amanda0
Please sign in to leave a comment.
Comments
1 comment