extracting variables from startup workflow
Hi--
we have an application where vital information is passed to the geocortex site (this was a web adf app we are moving to rest) via a url with the information appended via three arguments smod, project_id or contract_id.
We need to be able to:
1. recall at a later time the executing url in a workflow and extract the variables from the url string. is it possible to set the variables using MyBase.Context.Request.QueryString(<"a variable">) as the programmers to do below:
'Get the query string parameters
strParamSCIDMod = MyBase.Context.Request.QueryString("smod")
strParamSCIDProjectID = MyBase.Context.Request.QueryString("project_id")
strParamSCIDContractID = MyBase.Context.Request.QueryString("contract_id")
or a solution you could suggest.
here is the explanation from our programming staff about how the process works now: (remember its web adf)
##
This is how we get the SCID ID in the current GIS site.
1. When the main SCID application calls the GIS site to open, it appends the SCID ID to the URL of the GIS as a parameter. An example of how this looks is:
GIS Called for Projects:
https://ilmorso3gi5vm/Geocortex/Essentials/Web/Viewer.aspx?Site=SCID&ReloadKey=True&username=d2baker&smod=P&project_id=1447
Parameters are:
smod=P (SCID Module equals Project)
project_id=1447
GIS Called for Contracts/Bid Items:
https://ilmorso3gi5vm/Geocortex/Essentials/Web/Viewer.aspx?Site=SCID&ReloadKey=True&username=d2baker&smod=C&contract_id=605
smod=C (SCID Module equals Contract)
contract_id=605
2. Once the GIS page is loaded, whenever I need to find out (in code), what the parameters are, I use the following .NET code to read in the parameter values from the URL.
'Get the query string parameters
strParamSCIDMod = MyBase.Context.Request.QueryString("smod")
strParamSCIDProjectID = MyBase.Context.Request.QueryString("project_id")
strParamSCIDContractID = MyBase.Context.Request.QueryString("contract_id")
The MyBase.Context (etc) code is standard web development code, not ESRI or Geocortex related.
##
Any suggestions would be greatly appreciated!
J
-
Jeff,
Were you able to find a solution on extracting variables from startup workflow? Is so, do you mind sharing it? Thank you very much!
Regards,
Jin
0 -
You can access the QueryString (QS) Value for the Key by decalaring the QS's key as the Argument on the Workflow file.
With the example of Jeff's https://ilmorso3gi5vm/Geocortex/Essentials/Web/Viewer.aspx?Site=SCID&ReloadKey=True&username=d2baker&smod=P&project_id=1447
(1) declare your workflow as the startup workflow on your Viewer.xml
(2) On your workflow, open your workflow with WF designer, and click Arguments tab (at the bottom), add 'username', 'smod', 'project_id'
(3) then you can use those three arguments on your workflow
0 -
Munwhan,
Thank you very much for your response! Apprieciated!
Regards,
Jin
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
3 Kommentare