| | | Forum Newbie
       
Group: Forum Members Last Login: Wednesday, December 26, 2007 Posts: 4, Visits: 6 |
| | Does anyone have a sample of how you kick off a workflow from code. Start workflow and pass in data for variables |
| | | | Supreme Being
       
Group: Forum Members Last Login: Wednesday, March 05, 2008 Posts: 80, Visits: 277 |
| Hi there,
hope this helps you:
Client obj = new Client("SNITURHFormsRepository", "teste"); string ParseXML = ""; ParseXML += ""; //this is where you place your info for your xml variables //I think you need to have something in order not to get a "root element not found" error string url = ""; SynchronousActionData syncData = new SynchronousActionData(this.Context);
int idSkelta = obj.ExecuteBlocking("sqlprovider::1388943c-d70b-4494-b702-fd260b421f38", ParseXML, syncData, false, out url);
//here you need to put "yourprovider::userid" obj.Close();
This is just sample code, if you have any problem with this just say something.
I think you'll be fine with this, keep an eye on your console
Best regards
Rui
|
| | | | Supreme Being
       
Group: Forum Members Last Login: Thursday, July 31, 2008 Posts: 145, Visits: 619 |
| //To declare and pass data to the variables you need to declare the object of VariablesCollection. VariablesCollection varCol = new VariablesCollection(); // Add variables and assign values by adding each variable to the collection. varCol.Add("Couter", "number", 5); varCol.Add("MailData","string","This is a <B>Test </B> mail......"); All the data need to be accessed through XmlVariables or Contents can be passed in XML format string xmlContent = "<data>1</data>"; Workflow.NET.Engine.Client client = new Client("ImmediacyDemo", "LeaveWF"); //The last argument of the Execute method takes VariablesCollection as the argument. client.Execute(7, xmlContent,varCol); client.Close(); Hope this information was useful. Assuring you of our support at all times.
Regards, BiNo |
| |
|
|