workflow-foundation-4

A strong case for WF

I have struggled for so long to find a compelling use case for workflow (ie: WF) as against regular imperative programming. Each time I fall back to the conclusion that I should just leave WF out or defer getting into it until later. But I keep having this nagging feeling that there's something am missing. Does anyone know any book tha...

Workflow 4.0 code activities calling other activites (persist, delay etc)

I have a bunch of Workflow foundation 4.0 RC code activities that consume web services and talk to databases that I want to add some error handling in. I would really like to be able to attempt to call my web service / db, catch any faults such as a communication failure and then retry the same operation in 1 hours time (after I have lo...

Windows Workflow Foundation 4 (WF4) Delay

I'm working with the the Release Candidate of Visual Studio 2010 using Wf4 to write a new workflow for approving resource requests. In my workflow, I would like for a request to expire after a few days if no approval has been made for the request. We did this in WF 3.5 (Visual Studio 2008) by adding a Delay timer into an EventDrivenAct...

Windows Workflow Foundation 4 (WF4) Error Handling

What is the best way to get error messages from a WF4 workflow back to a hosting ASP.NET MVC application? I need the workflow to not terminate, but continue to be active, and then pass a message back to the hosting app regarding the error, so the user can take an alternative action, but I'm not sure how to do that. ...

Is it possible to use Workflow ReceiveActivity with independently written WCF service?

Suppose I had a WCF service that I have coded up, like Clemens Vasters's XML-RPC with WCF, and want to stick a workflow behind it on the server side. Is this possible to do with Windows Workflow? If so, how? The toolbox ReceiveActivity appears to create the WCF service for me. I'd prefer the answer in terms of Workflow 4.0, if possi...

Rehosting Workflow 4 Designer adding foreach activity to toolbox

I am using the designer rehosting samples and am trying to put the generic types into the toolbox, however I can't seem to make it work. I've tried XAML based: <sapt:ToolboxItemWrapper AssemblyName="{StaticResource AssemblyName}"> <sapt:ToolboxItemWrapper.ToolName> System.Activities.Statements.ForEach </sapt:ToolboxIte...

Workflow Foundation 4 WorkflowServiceHost Message Correlation

I have 2 methods on a workflow service hosted in WorkflowServiceHost. The first method is called and starts the regular workflow sequence - talking to other web services, database work etc but on some occassions will pause and persist to db (as-in the delay activity) and wait for some human action to take place before continuing. I nee...

.NET 4, how to execute dynamic vb code like windows workflow 4 does

Just curious how Windows Workflow 4 executes vb code. Can I use the same techique to execute vb.net code at run-time? ...

WF4: Get argument/variable information while idle

This seems like a simple problem: I have a WF4 activity that guides the user through a set of questions. After each question is displayed, the activity should be idled until the question is answered. After each question is answered, I want to prompt the user with the next question. (The next question is determined based on the answer to ...

Workflow foundation 4.0 message correlation and error reporting

I have a workflow service that runs and performs a number of different operations (such as web service calls). If one of these operations fails I call an error reporting web service to notify a seperate system that one of my workflow operations has failed. As the error could be something like the web service being down, I loop and retry...

Windows Workflow Foundation 4 (WF4) ReHosting

I've been looking at the possibility of ReHosting a WF4 Workflow to be used to debug running Workflows. All the posts and samples I've seen regarding WF4 Rehosting are using a WPF application to initially Host the Workflow, and then use the WorkflowDesigner in ReHosting it. Is there any way to Rehost a Workflow that was hosted in a non...

How to (pre)start xamlx workflow service

Related to this question. I have a xamlx workflow service that loads part of its definition from a database when it runs (using ActivityXamlServices.Load). Reason for this is that I need versioning, see the related question. I'll use WCF routing to direct calls to the right service. The part that I load dynamically contains a Receive a...

Does WF4 have the ability to search for instances?

Hello, I have a WF4 workflow service deployed in AppFabric. Is there any built-in way to do a generic search across all currently active workflow instances? For example, "get me a list of all active instances that have variable x = 5"? If someone could point me in the right direction on this it would be much appreciated. ...

Clarity on function WorkflowApplication.LoadRunnableInstance()

WorkflowApplication..::.LoadRunnableInstance Can anyone use this in a sentence? (Im looking for an example usage) ...

Web application creation in IIS7 via MS.Web.Admin

I am attempting to create seperate workflow instances as applications in IIS7 using the Microsoft.Web.Administration dll. When it attempts to add the Application to the Site ApplicationsCollection I get a COM error: "Invalid application path\r\n" using (ServerManager manager = new ServerManager()) { var site ...

Get input from user with ActivityBuilder in WF 4

Hi, I am trying to write a simple activity that received from the user its name and printing "hello + username" message. the problem is that i cannot access to the username input via code. the function is: static ActivityBuilder CreateTask1() { Dictionary<string, object> properties = new Dictionary<string, object>(); ...

Dynamic data type in Workflow Foundation 4

Can I use dynamic data type in WF 4.0? And if this is possible then how can I do it? ...

Is there any standalone application which would export WF4 designer functionality?

I read that it is possible to host WF4 designer in standalone application outside Visual Studio 2010, in fact I tried it too. But main problem with it is missing intelisence. Therefore the question: Does anyone know about whether there are open source (or not OS) projects which add this missing functionality to standalone WF4 designe...

Trigger ad-hoc activity within a workflow

I am looking to use WF 4 to replace an existing workflow solution we have. One feature that is currently used in the existing workflow engine is the ability to cancel a current activity and loopback to a FlowSwitch type activity. So given the following crude workflow where we start at 'O' and base in the input data the workflow follows ...

Binding output of Custom Activity designer to activity argument

I am trying to add a custom activity designer for an activity that I have. The activity looks a little like: public class WaitForUserInputActvitiy : NativeActivity { public InArgument<UserInteractionProperty[]> UserInteraction { get; set; } } I am trying to put a designer on the activity to make it a bit nicer to set these values ...