workflow-foundation

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 to create a TFS2010 Team Build Template for getting source and call msbuild.exe

I have a build.proj, that is a MSBuild file and can be run locally. All I need from TFS is Get the sources from TFS Source Control. Call "MSBuild.exe /t:Deploy". Update the build status based on the result of MSBuild. I have tried to make a template combining the DefaultTemplate.xaml and UpgradeTemplate.xaml. But so far, no luck :...

Create our own WorkflowDesigner class for rehost debugging in C# .NET 4.0

Hi all, I need to develop our own WorkflowDesigner UI for our workflow. Our customer doesn't really like the default WorkflowDesigner from VS2010 and they want to have entirely new UI for the workflow. Currently what in my head is To get the tree data structure from the memory that represents the workflow that I want to display on m...

Workflow Foundation - Unable to access WCF service

Hello, I'm trying to create a Workflow that need to access a few WCF services. Everytime that I try to add a specific WF In receive de following error : Error 1 Unable to resolve the type 'http://schemas.microsoft.com/netfx/2009/xaml/activities:OutArgument(Dictionary)' referenced by Property 'GetParameterSetResult'. Ensure that the ...

Preview can execute command called, but menu item not disabled

I'm rehosting the MS WF 4 designer control in my application. I'm subscribing to the PreviewCanExecute handler for a given command. My event handler method is called. However, when I set the CanExecuteRoutedEventArgs.CanExecute property to false and CanExecuteRoutedEventArgs.Handled property to true, the context menu still appears ena...

How to stop delay activity hijacking flow from OnTaskChanged activity in state machine workflow

I am creating a state machine workflow using .NET 3.5 in a SharePoint context (though I think the same issue would arise in non-SharePoint context). I needed to implement recurring reminders and followed the pattern discussed here. In one of my states I have two eventdriven activities, holding respectively an OnTaskChanged activity ...

Using SourceLocationProvider.CollectMapping to create the mapping

Hi all, I'm trying to understand how to use SourceLocationProvider.CollectMappingmethod in C# .NET 4.0. The documentation in http://msdn.microsoft.com/en-us/library/dd987879.aspx mentions that the parameters are rootActivity1, Type: System.Activities.Activity, description: A workflow element that represents an activity that is not ma...

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 ...

Windows WorkFlow 3.5 to 4.0 Migration Issue

I have migrated my sample WF 3.5 project to 4.0. I am having lot of issues related to migration. Is there any article/link which will help in solving these issues. ...

custom activity, set property default value

Hello I implement a custom activity in WWF. I have a property that must set to one of the existing states on host workflow. How can I set default value for this property that have to display all available states on workflow ( such as Target State in SetState Activity)? ...

C# Scripting - advice required please

I am developing an application to carry out pre-defined "tasks" on MSSQL database tables. It is really a tool to help with some repetitive data conversion/import tasks we have. In its SIMPLEST form it could be an "instruction" acting on a table ie. Take the contents of Field A and merge with Field B then write to Field C I have implem...

How to get workflow instance in an activity?

I was not able get the workflow instance in code activity of my workflow.how do I get it? I did check WorkflowEventArgs.WorkflowInstance Property but in my code activity i do not have WorkflowEventArgs. instead i have EventArgs. What I am trying to do: basically, i need to access the Workflow queue data to get the values in queue. in ...

How can I clear the cache of the workflow designer (where does it cache things) ?

Every time I change some InArgument of my CodeActivity or an activity defined as an XOML, it takes a couple of restarts of Visual Studio and deleting all the traces of my project's dll on the hard drive (not sure which part actually works) until the changes are reflected in the workflow designer. Is there some way to clear the cache of ...

Saving in the WF4 WorkflowDesigner

How do I save the XAML for a WF4 workflow in a rehosted designer, without writing it to a file? I want to store the serialised workflow in a database as an XML string. Given a WorkflowDesigner instance called w, this saves to a file fine: WorkflowDesigner.Flush(); w.Save("filename.xaml"); I was hoping this would serialise to a string...

How to create a rule based feature (like in Outlook) with C#

I want to develop a feature for an application, that make it possible to create dynamic rules like you can do it in Outlook. I want that every user can create rules to automatize precesses. Those rules must do something before an action, after an action and to a certain time/day. Possible rules can be like: - If process >= 99% -> Set ...

WCF Workflow Service Application - Required Extensions

Hello, I built a WCF Workflow Service App and I built in a custom activity with a required extension in the workflow. In a web app, I'm trying to create a service reference to the WCF workflow service but it says that an extension that is required has not been provided; so how do I consume a service with a required extension? At what ...

Writing a Workflow Foundation workflow with C#

I'm trying to write some activities with C# instead of the designer and XAML. VS2010 has been buggy and very slow for that, and it also has very poor compilation support (for variables names, properties and so on). So I'm trying to create activities by inheriting from the Activity class directly, but I'm encountering a snag. Here's my ...

Workflow 3.5 Activity property is null in condition and nowhere else

I have an activity that has properties that look something like this (they're set up as proper dependency properties, I just kept it simple here): public List<MyType> TypeList { get; set; } public Int32 Index { get; set; } public MyType SelectedType { get; set; } and an execution that just does this: SelectedType = TypeList[Index]; ...

How can I host the Windows Workflow 4 'Workflow Designer"? Is Silverlight, or Click once supported?

There is a question that references the old, buggy 3.5 version here. This question is regarding the WF that comes with .NET 4. My question is, where can I find a code sample and information on hosting the Workflow 4 Designer? Is Silverlight Supported, or Click Once? What .NET client profiles are supported? ...

WF4: Many dynamic assemblies in current app domain ?

Full code: using System; using System.Linq; using System.Activities; using System.Activities.Statements; namespace ManyAssemblies { class Program { public sealed class SayHelloActivity : Activity { readonly WriteLine writeLine = new WriteLine() { Text = "Hello Workflow 4" }; public SayHelloActivity() { Imple...