how to access data in the results area in a workflow
I have created a result with the selection command in a collection called "mystery_collection1" i want to create a workflow that will download that data to a text file for downloading. how do i tell the workflow to find the right collection for downloading? i want to put a workflow link on the tab to do that. (its a user requirement they ask for!)
Also how can add geometry i have "captured" with the capture geometry activity but give the data its own name, and then later write the geometry out to json?
J
-
> I have created a result with the selection command in a collection called "mystery_collection1" i want to create a workflow that will download that data to a text file for downloading. how do i tell the workflow to find the right collection for downloading?
I tried to answer your first question first based on what I understand your issue: You have the selected feature using Identity or select tool on the Result panel. Then you want to achieve a user to download csv file about a chosen feature to download.
To achieve this, there are serveral pieces to work together.
(1) configure the Feature Description on the Layer on the REST Manager to execute a command to run a Workflow (refer section 6.5 -Viewer Commands in Hyperlinks on Geocortex Essentials Adminsitrator Guide). Using RunWorkflowWithArgumetns you can pass the attributes value of the feature from the Results. So pass "workflowID" which you will create at step2, and mapserviceID where a layer is belonged, and a lauer name or id, and whereClause like 'OBJECT IN ({OBJECTOD})' where I assumed OBJECTID field is the OIDfield of the layer since on the workflow, you need to execute QueryTask to find out a interesting feature to export, and you can pass {$Graphics} or {$Feature} to the workflow.
(1) create a workflow using the workflow designer, where you set up the Arguments which should match all queryStrings configured on the FeatureDescription at step 1
1-1 check the query string parameters through Arguments are passed correctly first
1-2 execute Query Task using all values you get from 1-1 like 'mapservice Id', 'layer name', 'whereclause'. You can get the query URl using Get mapservice Info activity using 'mapserviceId' and 'layer name'.
1-3 you have the query result with one feature to export, which is a FeatureSet
1-4 there are several conversion activity to get .csv string like 'Convert FeatureSet to DataTable', -- 'DataTable To CSV'
1-5 now you have few options how a user to get the feature's csv string. I would send it as the attachment of the Send Mail. Or save it to the server, and use Hyperlink for a user to download.
> i want to put a workflow link on the tab to do that. (its a user requirement they ask for!)
I am not sure which tab you want to a link to inistate a workflow? Can you use a link (hyperlink) through the Feature Description explained on (1)?
0 -
this seems complicated, can you provide a workflow snippet that i can hack?
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
2 Kommentare