BACKGROUND
The Feb 2020 release of VertiGIS Studio Mobile 5.5 introduces two changes that will impact Apps that were created prior. You may need to update your app configs according to the following instructions.New Layout structure
When you try to load a 5.4 or earlier app into the 5.5 Designer – you will be presented with a dialog which encourages you to Automatically Update your app. Unless you have manually edited your layout you should be able to let Designer update your app for you This action will only affect the Development instance of your app (won’t affect Production apps) and you can easily choose to Save As to test the result of the automatic update.
If, however, you have manually changed your layout, you can use the Download App button to get a zip file which contains your app.json and 2 layout files (landscape.XML and portrait.XML). For each of the layout files – open them and apply the follow modifications to update your layout so that it works in version 5.5.
<split id="split-0d0c5844" config="5edd58c6-6db3-4ede-922b-86c38176b6c0"> <taskbar xmlns="https://geocortex.com/layout/mobile/v1" id="taskbar" config="9ca67faa-122c-4149-99ba-08650840cd96"> <panel>…</panel> <panel>…</panel> <panel>…</panel> <panel>…</panel> </taskbar> <map id="default-map" config="map-config-1"> … </map> </split>
xmlns="https://geocortex.com/layout/v1" slot="main"
Your layout should now be similar to the layout below.<split id="split-0d0c5844" config="5edd58c6-6db3-4ede-922b-86c38176b6c0">
<taskbar xmlns="https://geocortex.com/layout/mobile/v1" id="taskbar" config="9ca67faa-122c-4149-99ba-08650840cd96">
<panel>…</panel>
<panel>…</panel>
<panel>…</panel>
<panel>…</panel>
<map xmlns="https://geocortex.com/layout/v1" slot="main" id="default-map" config="map-config-1">
…
</map>
</taskbar>
</split>
Upgrading Workflow Templates to VertiGIS Studio Mobile 5.5
If you have created a workflow that you run from VertiGIS Studio Mobile that runs from a feature context (such as the results details component) and uses the feature input in their workflow, then you will need to update your workflow before it will work after the upgrade to 5.5.WHY
VertiGIS Studio Mobile 5.5 introduced a breaking change to the shape of the feature objects that are passed into workflows. This breaking change enables more powerful mobile workflows to be created that leverage this new feature object.
WHAT
A feature passed into a mobile workflow can be accessed through the “context” property on the workflow inputs. Previously, a singular feature was passed in, and feature properties such as attributes and geometry could be accessed with expressions such as
$getWorkflowInputs1.inputs.context.attributes
$getWorkflowInputs1.inputs.context.geometry
$getWorkflowInputs1.inputs.context.features[0].Source.Layer
This “context” property has been turned from a single feature into an array of features, which include the original properties and the advanced properties. In VertiGIS Studio Mobile 5.5, the above expressions would look as follows:
$getWorkflowInputs1.inputs.context[0].attributes
$getWorkflowInputs1.inputs.context[0].geometry
$getWorkflowInputs1.inputs.context[0].Source.Layer
The impact this change has on existing workflows is twofold.
- Any expressions involving the $getWorkflowInputs1.inputs.context expression will have to be updated to access the context as an array instead of a single feature.
- Since the shape of the features composing the context object has changed =, in order to use the feature in any activities that expect an Esri Feature (e.g., Buffer Geometry, Update Features, or Set Feature Attribute), the feature objects with advanced properties in the context array must be first converted into Features that workflow activities can consume.
- Examine your application for workflows that run from a feature context. Any workflow that runs from the results detail’s component will receive a feature as it’s input – so all workflows running from the results details run from a feature context.
- In each workflow, check if the “Get Workflow Inputs” activity is used. If it isn’t, this workflow won’t be impacted by the breaking change.
- Examine each workflow where the “Get Workflow Inputs” activity is used. After the “Get Workflow Inputs” activity, add a “Run Operation” activity that runs the results.to-graphics operation with the “Get Workflow Inputs” context as it’s input.
- Trace where the output of “Get Workflow Inputs” is used in expressions throughout the workflow.
-
If only the basic properties of the context object are accessed, or no properties are accessed, replace the $getWorkflowInputs expression with the output of the results.to-graphics operation.
- For example,
-
$getWorkflowInputs.inputs.context becomes $runResultsToGraphicsOperation.result[0]
- $getWorkflowInputs.inputs.context.attributes becomes $runResultsToGraphicsOperation.result[0].attributes
- $getWorkflowInputs.inputs.context.geometry becomes $runResultsToGraphicsOperation.result[0].geometry
- If an advanced property of the context is accessed (i.e. $getWorkflowInputs.inputs.context.features.XXX, replace the expression with the corresponding expression on the new workflow input feature context that includes the advanced feature properties.
- For example,…
- $getWorkflowInputs.inputs.context.features.Source.Layer.Id becomes $getWorkflowInputs.inputs.context[0].Source.Layer.Id
RESOURCES
Here’s an example of a workflow that accesses context properties in Mobile 5.4, with a sibling workflow that accesses the same properties in mobile 5.5 for comparison purposes.
Comments
0 comments
Article is closed for comments.