workflow-foundation-4

DynamicActivity - How to invoke a workflow that stored in Database?

Hi, This is proof of concept project - The goal is to create an application that receive some system wide events and based on some business rules invokes a specific workflow. The workflows are created separately and the xaml source is stored in a database. Following is the code that used to invoke the workflow: public void RaiseEvent...

What are some strategies for unit testing workflows in WF 4?

I've done quite a bit of WF development using 3.5 over the last few years, but am just now ramping up on WF in 4.0. I have a TDD bent, and while WF 3.5 was difficult at times to unit test, I'm wondering if anyone could share their strategy for unit testing workflows in WF 4 and/or point me to resources that would help get me started? ...

XamlObjectWriterException in Windows Workflow 4

Hello, Background: We are hosting a .NET 4.0 Windows Workflow activity inside a WCF service on IIS. The server is a Windows 2008 R2 machine. Problem: The ‘Activity’ fails inside the constructor’s InitializeComponent() call with the following stack trace (XamlObjectWriterException). This problem appears to be machine related – i.e. it w...

What am I doing wrong with my Workflow bookmark pick trigger?

I have a NativeActivity derived activity that I wrote that is to use bookmarks as a trigger for a pick branch. Using something I found on MSDN I tried writing this to trigger the branch. The branch contains activities that fire service callbacks to remote clients via send activities. If I set a delay for the trigger, callbacks fire to th...

Workflow 4 CodeActivity not throwing TimeoutException

I am new to Windows Workflow and trying to write a Long Running process. I am also trying to limit how long this process can run for. I am calling WorkflowInvoker.Invoke to trigger my Workflow passing it a small timespan for testing. If I try this certain activities, this seems to work perfectly. But If I use a CodeActivity, it seems to...

How to modify a workflow from rehosted workflow designer on runtime?

I have the rehosted workflow designer, but I want to modify a workflow of an application at runtime. How I can accomplish that? Fonts: Rehosted Workflow Designer Thanks in advance! ...

what is the architecture of workflow server ?

we are planing to develop a wf server with Microsoft WF4 the requirements is to create a end user designer for the workflows , client application so every user track the tasks what is the best architecture for this server ? I appreciate your help More details : we are developing a document management system , we need to create workf...

Changing the Duration of DelayActivity with a Different Duration

My custom activity has a delay that will need to be set different values at different times. The first time it is set, it might be 5 seconds. The second time, it might be 10 seconds, and so on. How can one do this... Delay does not have an ActivityContext lambda that will allow me to get a workflow variable. ...

What's the difference between System.Workflow.ComponentModel.activity and System.activities.activity

There seem to be 2 classes that relates to workflow Activities in .NET 4: System.Workflow.ComponentModel.Activity and System.activities.Activity What's the difference between the two? ...

I can't seem to figure out how to debug my TFS 2010 Build

I am trying to figure out how to debug in VS using the TFSBuildServiceHost.exe method, here is the article about this: http://blogs.microsoft.co.il/blogs/baruchf/archive/2009/07/02/debugging-team-build-now-you-can.aspx I am not able to get this working. First off, my machine does not have a TFSBuildServiceHost.exe running. So I tried t...

Can anyone explain why my workflow designer is so messed up?

I'm trying to learn TFSBuild 2010 and workflows and I found using the designer was very confusing. Then I realized from seeing screenshots of other peoples workflows, my designer is clearly messed up. Take a look at this: http://imgur.com/uoKJ8.png Something is very strange here. As I click on each task the borders for that task show...

How to assign an argument to the variable in Workflow Foundation 4.0?

Hi Guys, This simple code fails with the following error: The following errors were encountered while processing the workflow tree: 'ArgumentValue': The argument named 'Parameter' could not be found on the activity owning these private children. ArgumentReference and ArgumentValue should only be used in the body of an Activity defini...

How to set up custom arguments for the "queue build" screen with drop down choices?

Basically I've been following Jim Lamb's article here: http://blogs.msdn.com/b/jimlamb/archive/2009/11/18/how-to-create-a-custom-workflow-activity-for-tfs-build-2010.aspx?wa=wsignin1.0 Near the bottom he discuses how to add arguments on the Parameters tab on the Queue Build. I have an option that could benefit from a list of choices rat...

Windows Workflow Foundation 4 run only one workflow

I need that would be one time moment run only one workflow. How can I do this? ...

Categorizing properties of XAML activities

Using a code activity (i.e. activity built out of C#) we can add category attributes to our properties and display them nicely in the property grid of the workflow designer e.g. [RequiredArgument] [Category("Input")] public InArgument<Guid> TermbaseId { get; set; } Is the same functionality possible in an XAML activity? E...

How would I build a list of .proj files in workflow?

I've got a very large build process that I'd like to move parts or the whole thing over to workflow, but I can't seem to find a way to do recursion or a simple code activity to pull in the projects located in a base source directory. in MSBuild it's an itemGroup like so ../**/*.proj what would I do in workflow designer? ...

AppFabric debug persistence activity

Hi, I created a workflow with a Persist activity inside. Hosting it into AppFabric leads to this error: An error processing the current work item has caused the workflow to abort. See the inner exception for details. InnerException Message: The execution of the InstancePersistenceCommand named {urn:schemas-microsoft-com:System.Activit...

Persistence problem with a Stream variable

Hi, I have a workflow service which receives a stream through a ReceiveRequest activity. The workflow works well, but if I try to persist it I have an exception (Cannot access a closed stream) which I think is related to the stream object. The object received is similar to this: public class MessageContext { public Stream Content{get...

Windows workflow 4 : difference between WorkflowApplication Cancel, Terminate and Abort

Can any one explain what the difference is between the following methods of WorkflowApplication: Abort Cancel Terminate ...

Workflow Foundation 4, Problem when a change to a workflow is made?

Hello everybody, right now we are starting working with Visual Studio 2010 and Windows Workflow Foundation 4 it has been pretty hard to work with but we are on it. My question is that we are wondering what happens in the instance store with records when a stored workflow code is change, we have seen that you can not continue with workflo...