Passing Arguments to WorkflowRest Endpoint
Hi,
I have tried searching for this answer on these forums and looked in the sample code librarys etc, but I just can't get this working.
I am pretty new to this, so I started with a workflow that sends myself an email. I was able to call this via the rest endpoint and got the email successfully.
Next I want to add a parameter to the workflow so I can pass in who I want to send the email too, instead of it being static.
This is how the parameter looks from the XAML:
<x:Members>
<x:Property Name="Arg1" Type="InArgument(x:String)">
<x:Property.Attributes>
<RequiredArgumentAttribute />
</x:Property.Attributes>
</x:Property>
</x:Members>
I have tried loads of different ways to call this workflow and pass in the parameter, but it just wont accept it, it keeps saying value for Arg1 was not supplied.
Attempts included:
Basic URL call:
http://MYSERVER/Geocortex/Essentials/REST/sites/MYSITE/workflows/Test_Email/run?f=pjson&Arg1=MYEMAIL
C# Attempt:
byte[] response = client.UploadValues(url,
new NameValueCollection() {
{ "Arg1", "MYEMAIL" }
});
thanks for any help!!!
Glenn
-
If anyone is interested, the solution to this problem was:
http://MYSERVER/Geocortex/Essentials/REST/sites/SITE_NAME/workflows/Test_Email/Run?inArgs=[%20{%22name%22%20:%20%22Arg1%22,%22typeName%22%20:%20%22System.String,%20mscorlib%22,%22runtimeTypeName%22%20:%20%22System.String,%20mscorlib%22,%22value%22%20:%20%22MYEMAILADDRESS%22}%20]&f=pjson
ie. basically the rest url with an inArgs parameter passing in an array of values.
Glenn
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar