Workflow Soluiton

 View Only
  • 1.  How to read variables sent via URL?

    Posted Oct 27, 2010 12:24 AM

    Hi there!

    I am trying to get  workflow to use variables sent with the "GET" method.

    I want to give a link to the webpage of the workflow of this kind:

    http://server.com/myworkflow.asp?variable=value&variable2=value2

    I want to read those variable names and values for use down the track in the workflow.

    I can't find a way to do it. Is it possible?

    Cheers,

    Marcos



  • 2.  RE: How to read variables sent via URL?

    Posted Oct 27, 2010 09:29 AM

    I'd move those querystring values to be input data to your workflow. That way they're guaranteed to be available downstream.

    If thats not an option, you could try playing around with the Get HTTP Request Value component (try passing in variable/variable2 as input)



  • 3.  RE: How to read variables sent via URL?

    Posted Oct 27, 2010 11:04 AM

    I'm not entirely sure I understand the question, but try using the "Index Of Text Within Text" component in conjunction with the "Extract Text From Text" component to populate the variables.



  • 4.  RE: How to read variables sent via URL?

    Posted Oct 27, 2010 04:07 PM

    I was going to suggest something liken that, as well :)

    If you have the URL, split on the ? (the 2nd element is the QS)

    Split that section on the ampersands (a=b, c=d, e=f, etc.)

    Then loop through each if these guys and split on the equals to get key/value pairs

     

    Kind of messy :)



  • 5.  RE: How to read variables sent via URL?

    Posted Oct 28, 2010 01:04 AM

    Look for a component named something like "Get HTTP Params or Parameters".  It should do what you are describing. 

    I confess, I haven't used it, so don't burn too much time figuring it out if the usage isn't obvious.  If you can't figure out it, reply back and I'll research it Friday/Monday and post an article.



  • 6.  RE: How to read variables sent via URL?

    Posted Oct 28, 2010 04:24 AM

    If you want to start a workflow and pass varibles to it, all you need is to configure the primary models input data:

      

    Add the variables you need and call your published workflow like this:

    http://workflowserver.com/workflowname/?var1=val1&var2=val2



  • 7.  RE: How to read variables sent via URL?

    Posted Oct 28, 2010 11:17 AM

    You have several options, but the correct options depends on your setup.  Basically it comes down to if you are publishing as a Webservice or a Form Start.

     

    1) Webservice - if you are using a Workflow type project, and publishing it as a webservice you will have to set the input variables as previously mentioned.  Once doing this, when you create the connector to the webservice it will automatically recognize the input variables and will transfer that information using standard SOAP, which is not included in the URL. If you are not publishing as a Form Start this is the recommended way to pass input variables.

     

    2) Form Start - this is the case if you are using a WebForms type project, or a Workflow type project that is published as a Form Start.  Again you must first setup the input variables as mentioned above. Next, you must set the project to allow HTTP POST.  In the web.config file you will need to add the following lines:

     

     

    <configuration>

        <system.web>

        <webServices>

            <protocols>

                <add name="HttpGet"/>

                <add name="HttpPost"/>

            </protocols>

        </webServices>

        </system.web>

    </configuration>

     

    Once this is added, you will be able to pass input variables with the URL as you have shown above.  Its worth noting that this is one of the few instances where a URL is case sensitive, and your variable names must be exact.

     

    Cheers,

     

    Aaron Weisser

    Partner - Consulting & Development

    WEVO Group

    www.WEVOGroup.com