www.skelta.com
Home      Members   Calendar   Who's On

Welcome Guest ( Login | Register )
      

Home » BPM.NET 2007/Sharepoint Accelerator 2007 » BPM.NET 2007/Sharepoint Accelerator 2007 » Application Development » Kicking off workflow from code


Kicking off workflow from codeExpand / Collapse
Author
Message
Posted Friday, December 21, 2007
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum 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
Post #208
Posted Friday, December 21, 2007
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme 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

Post #209
Posted Sunday, December 23, 2007
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme 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

Post #210
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
-
Active Users: 1 (1 guest, 0 members, 0 anonymous members)
No members currently viewing this topic.

All times are GMT -5:00, Time now is 4:51pm

 
Execution: 0.109.14 queries.Compression Enabled.

Copyright © 2002 - 2007 Skelta Software. All rights reserved. Tel: 1 (703) 229-6732 | Email:sales@skelta.com
Skelta - A BPM Workflow Software Company