Add command for editing feature to a Workflow
Hi all,
TL;DR: Does anyone have experience with using the edit.display-update-feature command in a Workflow in a Vertigis Web viewer? Giving a feature as input argument?
I'm trying to involve a basic Command in a Workflow, to have more control over the user experience, but I don't get it to work. In Studio Web I've added a standard button to edit objects. The command in that button looks like this:
I'm involving these steps in a Workflow, because it's part of a bigger proces. The steps look very simple, however, I don't see how the output of one step is forwarded to the next.
I got the capture-geometry to work, and now I'm using that as input for a Query activity.
The output of the Query is an esri.Graphic . The input of the edit.display-update-feature command should be one of:
@vertigis.arcgis-extensions.data.Feature.Feature
DisplayUpdateFeatureArgs
Can anyone help me with getting this command to work with the output of a Query activity? I guess I should transform the esri.Graphic in some way. Or, as a different solution, does anyone know how to get the output of a sketching.capture-geometry into the tasks.identify, and get that output into the edit.display-update-feature?
Simplified version of my workflow: Yannick_SimplifiedEditWorkflow - Overzicht (arcgis.com)
All in all, I think there should be an easier way to get a command that works in Web to work in a Workflow in context.
-
Jan-Jaap van Raffe
0 -
Here is some more information on command chaining.
https://developers.vertigisstudio.com/docs/web/configuration-commands-operations#command-chains
2 -
@VertiGIS, an example of the configuration of the arguments of edit.display-update-feature would be very useful.
1 -
You are absolutely right Yannick, you'll need to transform your queried arcgis graphics.
It doesn't sound like you need to worry at all about command chains here, the chain for that button is just to get a user-drawn geometry then identify it from the map whereas you already have yourself a query for that. The only interesting thing here for you is that the output of tasks.identify will be either
@vertigis.arcgis-extensions.data.FeatureSet.FeatureSet
or results, which of course mirrors the input argument you described.For what it's worth: chained VS Web commands (mentioned by Nico) and operations pull from the output of previous commands/operations in the chain or the "context" argument for the chain.
Anyway, you'll need another Run Operation activity for results.from-graphics. You probably only need the .graphics argument, but if you queried a layer in a map you might consider the .map, .layer, and .sublayer arguments as well. You can get a sense of what the results look like by running the results.display command with the output of the operation.
That brings you to the edit command. I haven't used that myself, but I would start by filling in the arguments listed in the documentation... first the .features argument (with the results from your from-graphics operation) then add others one by one until you find the behavior you want. The .parent and .attributes arguments are to place the editing UI component, you'll probably want those too. Good luck!
1 -
Thanks for your replies Nico and Zack! I got it to work :)
The important missing step was indeed the operation results.from-graphics. I use the output of that operation as inputarguments in the edit.display-update-feature command in the following way:
={
features: $runOperationResultsFromGraphics.result[0],
editAttachments: true,
editAttributes: true,
editGeometry: true,
parent: "stack-e7d03cef"
}0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
5 kommentarer