Some map services you wish to consume in a workflow may be secured with token security. Services that are part of the Essentials site will have automatically generated tokens that you can use to connect to those services; otherwise, you will have to generate a new one.
Getting the Essentials-Generated Token
When connecting to a service that is configured in your site, you can obtain the token that was generated by Essentials for the client by using the GetMapServiceInfo activity. The Token in Out Arguments from this activity will be a valid client token.
As of Essentials 3.15, the token returned here will also work for requests made by the server.
To generate a token for a service that is not part of your site, use the GenerateToken activity to construct a new token.
In Essentials 3.14 and earlier, you should also use the GenerateToken activity for tokens that will be used in requests made by the server.
Store the resulting token value in a string variable that can be reused later.
Using the Token
In a QueryTask activity:
Set the Token argument on the Query Task activity to the variable holding the value of the token.
In a Display Form activity:
In a form, you may configure a query URL to populate items in a List Box, Combo Box, or Autocomplete Box. These components also allow you to supply a token value, but you cannot use a VB Expression (variable). Within a form, you can only use the absolute value of the token.
Instead of hard-coding the token for the form at design time, use the RuntimeModifications sequence to dynamically set the token at runtime. This allows you to use the variable for the token generated earlier in the workflow:
Use an Assign activity to set the token value.