Setting and Getting External Values
Essentials 4.1.1 HTML5 2.2
I want to pass a MapPoint value from one workflow to another. Having located an address in one workflow, I'd like to use the map point value of the address in a separate workflow to identify a Council District, zoom out to the full extent of the district and place a pushpin on the map point.
I use the Set External Value activity to set the value of the map point to a key named "AddressMapPoint". In the second workflow, I;m trying to use the Get External Value to retrieve the "AddressMapPoint" value, but the workflow compiler doesn't recognize the name of this key. When I create a MapPoint variable to hold the value, the compiler keeps insisting that the mapPoint variable of <T> mappoint cannot be converted to a string. As far as I can tell, I'm not trying to convert anything to a string - the key is defined as an ESRI.ArcGIS.Geometry.MapPoint and so is the value.
Can someone please help me understand what the Get External Value is trying to get me to do? How do I tell the activity about the existence of the "AddressMapPoint" value set in the previous workflow when it won't recognize anything not defined in the current workflow itself?
Help.
-
Hi Sean
as far as your issue of using one workflow from another check out this thread:
https://support.geocortex.com/SupportForums/Thread.aspx?thread=55662&mid=2&pageid=0&ItemID=20
For the KeyValuePair that you are tring to set, I suggest that you use something much simpler as the Key such as the string "AddressMapPoint".
Think of it as an entry in a (word) disctionary. You have the Key in the Dictionary being the word. Easy to sort, index and find again by most humans but the definition can be verbose, include pictures etc which get much more interesting to sort, index and find.
Regards
Ralph
0 -
Ralph -
I'm not sure I understand your post. I'm not trying to invoke one workflow from another. I'm trying to store a value known to one workflow to be used later by another workflow which may or may not ever be called at any time subsequent to the first workflow in the same session.
I also am confused by the naming convention suggestion - are you saying my name for the dicitonary key "AddressMapPoint" is too complicated or are you suggesting I use the name I am already using?
My problem is not understanding the syntax in the second workflow for retrieving the value set in the previous workflow. I can't reference the dicitonary key because it is not declared in the second workflow. When I try to create a variable to hold the second value, it complains that I'm trying to convert a MapPoint variable to a string when I'm setting a MapPoint variable to a MapPoint value. I can't seem to find any combination of arguments to fill the Get External Value activity that don't raise an error.
Please clarify.
Thanks,
Sean
0 -
Hi Sean,
Try using an Argument instead of a Variable. Set the type to an object as In/Out. What Ralph is suggesting is correct. I use Get and Set External values all the time to hold on to "variables" between workflows.
Ryan
0 -
Thanks, Ryan.
This morning, I stepped through the same process I was using Friday to show my co-worker the issue I was having and it just worked as designed. I used the name of my key and set it to the variable that would not work under any curcumstances on Friday. Not sure what the issue was three days ago that doesn't exist today using the same variables in the same workflows. [insert Twilight Zone theme here].
0 -
Hi Sean
I guess I was (unclearly) trying to answer two questions at once:
- how to call one workflow from another
- why an external value was not available.
Glad to hear you have got it working
Regards
Ralph
0
Please sign in to leave a comment.
Comments
5 comments