GetCurrentOperationalMap

Node Action:

The GetCurrentOperationalMap node action captures a resource representing the user's current operational map.

Parameters:

se_type

GetCurrentOperationalMap

se_type = GetCurrentOperationalMap

se_resultVariable

Name of the result variable to store the operational map resource.

Example:

Create Session: The following workflow gets the current operational map then creates a new session using its Feature Service URI and Operational Map ID.

digraph workflow {
  
  entry[
    se_type0 = SessionManagerToolTrigger,
    se_displayName0 = "Create Session"
    se_sortOrder0 = 0,
    se_visibilityCondition0 = "(ctx, log) => {
      return true;
    }",
  ]
  
  createSession[
    label="Create Session"
    
    se_type0 = GetMapExtent,
    se_resultVariable0 = CurrentMapExtent
  
    se_type1 = GetCurrentOperationalMap,
    se_resultVariable1 = CurrentMap,
        
    se_type3 = Api,
    se_method3 = POST,
    se_modifyRequest3 = "(request, ctx, log) => {
        var sessionId = Guid.NewGuid().ToString();
        var data = new {
            name = ctx.State.SessionName ?? sessionId,
            description = ctx.State.SessionDescription ?? sessionId,
            featureServiceUri = ctx.State.CurrentMap.url,
            operationalMapId = ctx.State.CurrentMap.id,
            sessionBounds = ctx.State.CurrentMapExtent.extent,
            workflowSessionId = sessionId, // not required to be a Guid.
        };
        
        request.RequestUri = new Uri(\"api/v1/Sessions\", UriKind.RelativeOrAbsolute);
        request.Content = new StringContent(JsonConvert.SerializeObject(data), Encoding.UTF8, \"
    }"
  ]

  exit[
    shape = invhouse, 
    color = "#22FF44", 
    style = filled
  ]
  
  entry->createSession->exit;
}
QR Code is a registered trademark of DENSO WAVE INCORPORATED in Japan and other countries.

Was this helpful?