workflow-foundation

What's the pattern for design-time validation in Workflow Foundation 4.0?

I'm unclear about when and how I should be doing validation in my custom activities/custom activity factories/custom designers in WF 4.0. The only place within my activity that seems to provide validation error support is within the CacheMetadata method (I believe this is called multiple times during the design process). Is this wher...

Working with State Machine Workflows in ASP.NET MVC

I have a state machine workflow which contains a number of states. Each state has an event driven activity that handles an external event. When that event fires, I'd like to either redirect the request to a different Controller Action or a View. What is the best way to redirect to a different view or controller action when an event is...

InvalidOperationException and Workflows in ASP.NET MVC

I'm trying to query a running state machine workflow using StateMachineWrokflowInstance in ASP.NET MVC. Here is the scenario: Workflow runtime configuration: added SqlWorkflowPersistenceService, ManualWorkflowSchedulerService, ExternalDataExchangeService and registered custom ExternalDataExchange service with ExternalDataExchangeServi...

Can Windows Workflow Runtime run 2 workflows at the same time

We have used the Factory/Singlton pattern for creating a workflow runtime. When we run a workflow we use a AutoResetEvent waitHandle.WaitOne() to wait for the workflow to complete. If two workflows run at the same time they react to the same AutoResetEvent and both calls get the return values that were meant for the first call. Is the...

Configuring Windows Workflow from an App.Config file

I've done this before, so I know it's possible, but I can't seem to remember how exactly to accomplish it. I need to set the LoadingInterval and InstanceOwnershipDuration from the app.config. Can someone please point me in the right direction. I'm currently using the following which isn't working: <Runtime> <CommonParameters> ...

delay activity in event handling scope activity - windows workflow sharepoint

Hi, I am trying to create a following scenario: a task gets assigned to the user to complete a task get created for the manager to reassign the user task if necessary (don't ask, they wanted it this way) an email reminder neeeds to be sent when the task is nearing a due date So, I thought of using EventHandlingScope for this: I am...

Suspending the workflow instance in the Fault Handler

Hi . I want to implement a solution in my workflows that will do the following : In the workflow level I want to implement a Fault Handler that will suspend the workflow for any exception. Then at sometime the instance will get a Resume() command . What I want to implement that when the Resume() command received , the instance will e...

Workflow Foundation Separate Schema

I'm working with the persistence and tracking services in Workflow Foundation and I thought it would be a good idea to use a separate schema in SQL Server just for workflow. Unfortunately, it appears they hard-coded the default dbo schema name into their code. One example is the SqlTrackingService class. Due to the way they wrote the t...

Get username from SharePoint User field in List

I have a custom sharepoint workflow that I'm developing in Visual Studio. The workflow is running against a document library which has a custom content type connected to it. The content type includes a user lookup field ("owner"). I'm trying to have my workflow assign a task to the "owner" lookup field. However, I've only been able to g...

recommended book for SharePoint 2007 work flow development (a.k.a) customization using Visual Studio 2008 ?

Hi is there any full book or part of books which talks about the improved and simplified ways of creating / developing/customizing SharePoint 2007 Workflow using Visual Studio 2008 (preferably Team edition) ...

Workflow Custom Activity building workflow parameters

Let's say I have a Workflow with 2 dependency Property : Prop1, Prop2. I'd like to create a custom activity that when I drag into the workflow, It will show Prop1 and Prop2 in the property grid in the designer. Is this possible ? Like the invokeWorkflow, when you select the TargetWorkflow, it populates the property grid with Paramet...

Workflow Foundation with DDD

I'm curious if anyone has applied workflow foundation to a DDD project and if so what the pitfalls/gotchas were. I'm looking at a extremely complex state processes that looks like WF would be a good fit for, but am trying to determine how to isolate the workflows from manipulating the state of my domain model. It was suggested to me to ...

Why does it take to two runs for a state to transition when running a workflow in asp.net?

Hello gurus, I have designed simple state machine workflow that contains a few states: intial state is (A) "Waiting for documents", (B) second state "Calculating", (C)last "Done"; State (A) has an event driven activity which handles an external event called DocumentsReceived if this event is invoked, the state would be set to state (B)...

Rehosting workflow designer

I'm creating an application that rehost the workflow designer and that can load an xoml only workflow. When I deserialize my xoml-only workflow. There is an error stating : {"Could not deserialize object. The type 'MyCustomActivity' could not be resolved."} my xoml looks like this: <SequentialWorkflowActivity x:Name="Workflow2" xmlns:...

Recycle windows workflow after changes on workflow activity

Hello, I used WWF on my web project, on this project I have several workflows and visitor will fill forms and then form will post to technical people to do their job and some other state ... When I change workflow and create new activity or state , when run ( continue ) all workflows that persist on db before changes , will throw erro...

WF: Determining if workflow completed

How do I determine from the host if a workflow instance has compled or not besides subscribing to the WorkfloRuntime's WorkflowCompleted event? Is there any flag or state I can check for a given WorflowInstance to determine if it has completed? @Edit: The question is about sequential workflows. ...

Tracking declarative rule condition results

Hello, I'm creating a custom tracking service and I need to know how I can monitor the results of declarative rule conditions in IfElseBranchActivity. RuleActionTrackingEvent only works on the PolicyActivity and I can't seem to find any example around the internet. Thanks a lot! Carlos ...

Windows Service Starts then Stops

I have a Windows Service that I inherited from a departed developer. The Windows Service is running just fine in the QA environment. When I install the service and run it locally, I receive this error: Service cannot be started. System.InvalidOperationException: The requested Performance Counter is not a custom counter, it has to be ini...

Changing windows workflow assemblies while running?

We’re about to deploy version 1.2 of a software project I was working on, up from version 1.1. As it stands right now, there are a few outstanding workflows that are still in progress that will break if we update the workflow and supporting assemblies to version 1.2 because the serialized workflows will be looking for version 1.1 of th...

Terminate unowned workflow

I'm currently using WF with multiple hosts. If one of these hosts owns a workflow, but crashes, I'd like another host to be able to terminate the workflow. Is there any way to do this? What I've tried so far is to first remove ownership by executing a sql query to set ownerID and ownedUntil to NULL, unlocked to 1, and nextTimer to the c...