Windows Workflow Foundation 3


invoke sub StateMachine workflow


Hi, All,
I'm hosting the State Machine workflow in ASP.NET that uses InvokeWorkflow activity for sub State Machine WF.  But  at the TargetWorkflow property of Parent WF,  I could not choose a subWorkflow for that property in the current project at Designer UI, it always is empty.  What am I missing?
BTW, if my stateMachineWF invokes Sub StateMachineWF, and this sub stateMachine WF will invoke another one. how many levels could it be?
for example, workflow 1, WF(1): A1-->A2-->A3-->A4-->A5                      WF(2): A2-->A3-->A4-->A5                      WF(3): A3-->A4-->A5                      WF(4):A4-->A5
So, it will be possible for              WF(1): A1-->WF(2)             WF(2): A2-->WF(3)             WF(3): A3-->WF(4)             WF(4): A4-->A5 // this one will be same as old one
I just simplify this mode for description( it is stateMachine, but here,it looks like sequential WF)
Is there a sample for article for me to reference for this? 
Best Regards,
Brain
With Beta 2.2 you need to have the invoked workflows in a different project from the invoking workflow.  This restriction has been removed in current builds.
You can add the assemblies to the TypeProvider there but don't have to.  They just need to be added to the type provider before the runtime needs to resolve them.  Anywhere you have access to the runtime you can get the type provider back, calling GetService, and add new assembly references.
I've actually never been able to get a state machine workflow to successfully spawn a sub-workflow. I tried it in the Feb CTP and got nothing but crashes and exceptions. I'm interested in seeing if there's a good recommendation here.What I ended up doing was just encapsulating the sub-workflow in a larger encapsulation state and mimicking the hierarchical composition of states pattern.
With Beta 2.2 you need to have the invoked workflows in a different project from the invoking workflow.  This restriction has been removed in current builds.
Tom,
Thanks, BTW,  based on your stateMachine WF sample on Asp.net, we need to add Workflow assemble at Application_Start(), for invoke sub workflow, do I need to add all the sub workflow assembleies at there?
like,
typeProvider.AddAssembly(typeof(ActivityLibrary1.Workflow1).Assembly);typeProvider.AddAssembly(typeof(ActivityLibrary2.Workflow2).Assembly);typeProvider.AddAssembly(typeof(ActivityLibrary3.Workflow3).Assembly);
Thanks
Brian 
void Application_Start(object sender, EventArgs e) {// Code that runs on application startuSystem.Workflow.Runtime.WorkflowRuntime workflowRuntime = new System.Workflow.Runtime.WorkflowRuntime("WorkflowRuntime");
Application["WorkflowRuntime"] = workflowRuntime;
System.Workflow.ComponentModel.Compiler.TypeProvider typeProvider = new System.Workflow.ComponentModel.Compiler.TypeProvider(workflowRuntime);
typeProvider.AddAssembly(typeof(ActivityLibrary1.Workflow1).Assembly);
workflowRuntime.AddService(typeProvider);workflowRuntime.StartRuntime();}
You can add the assemblies to the TypeProvider there but don't have to.  They just need to be added to the type provider before the runtime needs to resolve them.  Anywhere you have access to the runtime you can get the type provider back, calling GetService, and add new assembly references.

Related Links

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
Windows WF3.0 - get activity information from TrackingRecord object
Workflow Rules - Chaining for Indexers
WCSF PageFlow

Categories

MSDN
Windows Phone Dev Center
Internet Explorer Deve...
Windows Embedded Standard
Microsoft Atlas API: D...
Microsoft Azure
Off-Topic Posts (Do No...
Visual Basic
Visual Studio Setup an...
MSBuild
Visual Studio Unit Tes...
Payouts and Reporting
Windows Desktop Develo...
Windows Desktop Debugging
Windows Desktop Pro-Au...
Windows Desktop SDK
Message Analyzer
General Office Develop...
Developing Apps for Sh...
SharePoint 2013 - Search
SharePoint 2010 - Gene...
Azure Storage
Azure Pack
Azure Mobile Apps
Azure Search
Azure Scripting and Co...
Azure App Service - AP...
Cognitive Services
Azure Stack
Azure Time Series Insi...
Publishing Apps for th...
Windows Workflow Found...
Team Foundation Server...
Team Foundation Server...
Software Modeling Tools
ADO.NET DataSet
Internet Explorer Exte...
Microsoft Translator D...
Microsoft Translator H...
ISV Open Discussions
Visual Basic for Appli...
Microsoft Device Emulator
SQL Server Reporting S...
SQL Server XML
SQL Server Setup & Upg...
SQL Server Notificatio...
SQL Server Data Wareho...
SQL Server Master Data...
SQL Server PowerPivot ...
Standard 2009: Compone...
Standard 7: Embedded E...
Windows Embedded Compa...
SQL Server 2012 PowerP...
SQL Server 2012 High A...
SQL Server 2012 Analys...
Bing Maps: Map Control...
Bing Maps General
Bing Maps for Windows ...
SharePoint Server Prot...
SQL Server Protocols
Microsoft Lync Server ...
Silverlight Installati...
Designing with Silverl...
Expression Studio with...
Expression Web and Sup...
Reference Source Serve...
Surface Application De...
Visual Studio Report C...
Retired InfoPath Forms...
Retired SharePoint Acc...
.NET Remoting and Runt...
Axum Incubation Project
Azure Startups
Building Windows Store...
App Producer (archived)
AppFabric Caching
Casablanca
Crystal Reports for Vi...
Developer Documentatio...
Game Technologies: XNA...
HealthVault Data Types
ISV Community Days
LightSwitch in Visual ...
Microsoft Unified Comm...
Network Quality of Ser...
Parallel Computing Pla...
Popfly Bugs and Sugges...
Popfly General Discussion
Share your How to samp...
SQL Server Modeling
SyncFx - Microsoft Syn...
SQL Server 2014 In-Mem...
Using Visual Round Tri...
Tools for Windows Phon...
Visual C# Express Edition
Visual C++ Express Edi...
Visual Studio 2008 IDE...
Visual Studio LightSwi...
Visual Studio Tools fo...
Windows Live Alerts De...
Windows Live Data Deve...
Working with Data in W...
XNA Framework
Reporting
Windows Phone Preview ...
Windows IoT
Windows Containers

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile