Windows Workflow Foundation 3


Exchanging parameter enter the state machine workflow and the host application (web)


Hello, I want to pass paremeters to the different states in the state machine workflow with event driven . Can I do it with the raising event method... if it's possible, how? Or should I utlize the custom read/write activity,knowing that this activity is compatible with the Beta 1 version and I am working with the beta 2 version. Thanks in advance
I posted an example at http://blogs.msdn.com/tomlake/archive/2006/06/02/614492.aspx.
 Maaloul wrote:Hello, I want to pass paremeters to the different states in the state machine workflow with event driven . Can I do it with the raising event method... if it's possible, how? Or should I utlize the custom read/write activity,knowing that this activity is compatible with the Beta 1 version and I am working with the beta 2 version. Thanks in advance "I am thinking also of custom HTTP Request/Response  activity, so can it be a solution? and how?
Yes U can do that without using any activities
In the Service Class, u can do the following
public class HDtest    {         private Workflow1 p = new Workflow1();
        public HDtest(string Body)        {            p.Body = Body;        }    }
public void RaiseEvent(Guid instanceId, string Parameter)        {            if (ProbAlert != null)            {                HDProbEventArgs e = new HDProbEventArgs(instanceId);                ProbAlert(this, e);                new HDtest(Parameter);            }        }
 & when u raise the event from the web_page:
ServiceClass.RaiseEvent(workflowInstance.InstanceId, "Parameter Value");
Hope u'll find it usefull
Bye
Thank you,I don't understand well your code.. but the thing that I can understand is I add parameters as I need with the raise method .. If it's the case, how can make these parameters usable bin the WF instance... I Think that I must declare variables as input parameters? What you say about that
I posted an example at http://blogs.msdn.com/tomlake/archive/2006/06/02/614492.aspx.
Thank you  for your interest .I tried to explore but I don't successed knowing that I have already signed
If you mean you couldn't access the link, I fixed that try again.
Thank you , I succeed to open the URL , I read it ..My question is can I pass others parameters as I need when invoking the raise event method ? if it's possible ? how can I do this
Hello Maalool,
if you want to do something like the described in the code bellow, it won't work because in this case the event can only carry 2 parameters : a sender and a object from a class derived fromExternalDataEventArgs; however this class can be extended to carry more infos if it's serializable (I think).
You can also create another RaiseEvent method that takes another kind of parameter...
Hope this help
Serge Luca
Guidance, Belgium
www.redwood.be
================================================================
public class MyService : IMyService
{
    public void RaiseEvent(CompletedEventArgs args, MyOtherParamArgs args2)
    {
        EventHandler<CompletedEventArgs> completed = this.Completed;
        if (completed != null)
            completed(null, args, args2); //doesn't work because the EventHandler delegate waits for 2 params, a send and an EventArgs
    }     
    public event EventHandler<CompletedEventArgs> Completed;    }

Related Links

SimpleExpenseReport
SQLTrackingQuery from Workflow
CreateWorkflow failing validation
xbox live mic help
download code samples of Microsoft press' windows workflow foundation step by step - Kenn Scribner
Advantage and disadvantage of ASP.NET WorkFl
When do activities CANCEL and How do i force activities to cancel state?
Windows workflow 4.0 persistent issues
Windows Workflow 4
help needed in state machine workflow in asp.net
About the Role in WWF
Need suggestion of Workflow implementation
Invoking workflow from windows form
Tracking by objects
Sample unit testing project for a code activity
How to display the provider type summary in RuleSetDialog

Categories

MSDN
Game Development
Data Platform Developm...
Internet Explorer Deve...
Microsoft Sync Framework
Windows Embedded Compact
Silverlight
Archived Forums M
Archived Forums T-U
Archived Forums Visual...
Archived Forums W
OneDrive Development
Microsoft Partner Center
Announcements for all ...
Forums Issues (not pro...
MSBuild
Visual Studio Code Vis...
Visual Studio Unit Tes...
Visual Studio Graphics...
Submitting and Publish...
Payouts and Reporting
Promote Your App
Network Monitor
Peer-to-Peer Networkin...
Access for Developers
SharePoint 2010 - Setu...
Workflow Manager 1.0
Azure SQL Database
Azure BizTalk Services
Azure Pack
Azure Marketplace
Azure Scheduler
Azure App Service - AP...
Azure Logic Apps
Azure DevTest Labs
Azure Disk Encryption
Windows Communication ...
Team Foundation Server...
The Architect Role
The Forum of Sho
Microsoft Translator H...
Training and Certifica...
Small Basic
Microsoft Robotics - S...
Microsoft Robotics - H...
Visual Studio Smart De...
SQL Server Reporting S...
SQL Server Analysis Se...
SQL Server Notificatio...
SQL Server Master Data...
Windows Embedded 8 Sta...
Windows Embedded 8.1 I...
Windows Embedded Compa...
SQL Server 2012 Setup ...
ClickOnce and Setup & ...
Windows Server 2008 Ap...
Server Virtualization
SDK for Home Server 20...
CRM Deployment
MSDN Subscriptions Fee...
Speech Service for Dev...
Bing Maps Web Controls
Silverlight 5
Report a Silverlight Bug
Performance Profiling ...
Microsoft Online Syndi...
Visual Studio Report C...
Axum Incubation Project
Building Windows Store...
Building Windows Store...
Building Windows Store...
Chart Controls for .NE...
Innovate on Office
LightSwitch in Visual ...
Monitor, Alert and Aut...
Network Class Library ...
Network Quality of Ser...
Office Live Small Busi...
Popfly Explorer
Popfly General Discussion
POS for .NET
Search Server: Develop...
Silverlight (formerly ...
Surface Application De...
SyncFx - Feedback [Rea...
Transactions Programming
Using Visual Round Tri...
Visual C# Express 2008...
Visual Studio Team Ser...
Visual Studio 2008 (Pr...
Visual Studio Code Ana...
Visual Studio UI Autom...
Visual Studio Web Perf...
Windows Live Alerts De...
Windows Live Controls ...
Windows Live Search: D...
Windows SideShow Devel...
Tools for Windows Stor...
Expression Blend for W...
XML Paper Specificatio...
XNA Game Studio Express
Microsoft Graph
Cortana Skills Kit

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile