workflow-foundation-4

Workflow 4.0, WCF and non-"WCF Workflow Service" definitions

Is it possible to create a WCF workflow using the standard (Activity template) Workflow activity templates? And, if so, where can I find some samples that DO NOT use the standard WCF service template (WCF Workflow Service template)? Explanation: I'm trying to discover, load and run workflows at runtime, including workflows with WCF ac...

WF4 Instances and Windows Server 2008

I'm developing a Win Service app that hosts a WF service and a WF application on a Windows 7 machine. When I deploy it to a 2008 Server machine, my logs document activity from the Win Service but not from either of my Workflows. It's running under LocalSystem, would that cause my issue or is there another problem hosting WFs on a 2008 Se...

Invoke the Windows Workflow Service 4.0 through HttWebRequest?

Is it possible without generating proxy classes and client codes? ...

Velocity in WF4

If I use Microsoft.ApplicationServer.Caching.Client and Microsoft.ApplicationServer.Caching.Core assembly I get exception: The type or namespace name 'ApplicationServer' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) .....\CacheUtil.cs And I get Warning: The referenced assembly "Microsoft.Applic...

How do you use an extension method in an InvokeMethod workflow?

I have a System.Activities.Statements.InvokeMethod activity. I'm trying to activate it with TargetType: (null) TargetObject: licxFiles //an ICollection<string> MethodName: StoreIfHasValue The StoreIfHasValue: public static void StoreIfHasValue(this ICollection<string> collection, string value) { if (value.IsNullOrEmpty( )...

How to make a Win Service run Long Term with Threading.

I have a win service hosting a few workflows (a WorkflowApplication and a WorkflowServiceHost) that I need to keep long running. Because OnStart() requires that it completes and returns to the OS, I have a main method that fires on another thread in a threadpool. My Onstart() mainly looks like this protected override void OnStart(string...

Getting current activity when a workflow instance loads from persistent store in WF 4.0

Hey guys, I've still been trying to wrap my head around some workflow issues we've been having. I'm using Workflow foundation 4.0 and I need to get the current activity of an instance when I load it from persistence. I tried using tracking, but that does not get called when the instance is loaded. I'd like to avoid having to persist t...

Extract contract interface from a workflow service (WF 4.0)

Hi, I have a workflow service created with WF 4.0 and the need to have a typical WCF decorated interface extracted from it, containing all operations. I need it for testing purposes. Is there a way to extract a decorated interface from a workflow service? Thank you ...

Windows Workflow Foundation 4.0 Tutorials / Introductions

Pretty much all of the tutorials/introductions to Windows Workflow Foundation seem to be targeted at versions prior to 4.0, or are somewhat simplistic and don't really show me anything about WHAT the real strengths of Workflows are. Could someone point me in the direction of some slightly meatier tutorials (clearly my google-fu is faili...

Using WF 4 as navigation framework for ASP.NET MVC2-based wizards

Has any one done that ? I'm planning to use a state machine workflow from WF 4.0 as the navigation framework ... The idea is as follows 1. States correspond to pages. Grouping some states into composite states for anonimous/authorised requests 2. A custom controller factory intercepts the requests, extracts the controller/action nam...

Workflow Foundation 4.0 - Transaction service & SQL Tracking service?

I am exploring if Workflow Foundation 4.0 is stable enough to start developing on it but the documentations I've seen so far are mysteriously silent about why there are no built-in Transaction & SQL Tracking services! They were available in WF 3.5 and seemed to be reasonably stable. Any clues? Was there no time for MS to release WF 4.0 o...

Can a WF4 Generic Activity be Declared in XAML?

I have a Workflow 4 activity that can be run on any number of classes that inherit from my base class. So, the activity is, naturally, generic. Similar to the ForEach or AddToCollection activities, my activity requires a type parameter. My question is: can I create this activity in the designer with XAML? Keep in mind this is a composit...

Using Workflow 4 as a Controller in MVC

Hi I'm building an app that deals with customer queries, where I want to route the query through a decision tree showing appropriate views before taking some automated action against their query. Kind of like the game "20 questions"! Based on the answers at each stage, the path through the app will change. I was thinking of using MVC, ...

How do I mock out a call to a WCF Service when using a Send or SendReceive activity in WF4?

So as apart of my workflow I need to make a call to an external WCF Service to retrieve some objects. The problem is I can't see how to mock out the WCF Service that will be called by the send activity. Does anyone know how I can do this? Thanks, John ...

How do you schedule execution of a Windows Workflow?

I'd like to move my scheduled tasks into workflows so I can better monitor their execution. Currently I'm using a Window's scheduled task to call a web service that starts the process. Is there a facility that you use to schedule execution of a sequence so that it occurs every N minutes? My optimal solution would: Easy to configure Pr...

Workflow Foundation 4 - How to create a web based representation of the workflow?

We have to write a ASP.NET site based on a workflow. The client wants to see a graphical representation of the workflow. In addition (let's say it is a workflow for processing orders), the client wants to see at what point in the workflow any given order is, indicated on the graphical workflow representation by a highlighted node or som...

"Persist activities cannot be contained within no persistence blocks" error

Hello, I would like the rule for which "Persist activities cannot be contained within no persistence blocks" error happens in WF4. I see that you can not persist between the first receive-send, but I do not understand the general idea. Any comment? Thanks ...

Re-Host Designer WF 4.0 Custom Switch

Hi, I need a control for re-hosted WF 4.0 app that has flowswitch functionality( multiple connection points) but looks like a simple Label. Could you tell me how to implement that? Thank you ...

Windows Workflow Foundation 4.0 connector

Hi, I'm trying to create a custom activity with multiple connectors using WWF 4.0. Could you tell me how to declare connectors at activity level and register to click event on a flowswitch connector? Thank you ...

How to invoke a method from a workflow in WF 4?

I would like to invoke a simple method (no arguments, returns void) from within a workflow. Suppose I have the following class: public class TestClass { public void StartWorkflow() { var workflow = new Sequence { Activities = { new WriteLine { Text = "Before calling method....