workflow-foundation-4

How to use the InvokeMethod activity to add a string to a generic list using Workflow Foundation 4

I have a Workflow Foundation 4 activity that has a InvokeMethod that is configured to call the Add method on an instance of type IList(Of String), providing a parameter of type String. Running it gives me this error though: 'IList`1' does not have a public instance method named 'Add' matching the parameter types, generic type arguments...

Workflow Service host not publishing Metadata.

Still hacking away with extreme persistence at WF services hosted outside of IIS. I'm now having issues with my WF service publishing metadata. Can someone take a look at my code and see what step I'm missing? The few tutorials that I've stumbled across for my scenario make it look so easy, and I know it is. I'm just missing something ri...

SynchronizationContext and Bookmarks in WF4

I am running workflows under asp.net and using SynchronizationContext to make the page "wait" for the workflow. Here is how I run the workflow instance under asp.net: var workflowApplication = new WorkflowApplication(activity); SynchronizationContext syncContext = SynchronizationContext.Current; workflowApplication.Completed = delegate ...

Persistent workflow with durable delay activity hosted in ASP.NET

The situation: a workflow hosted in ASP.NET application using WorkflowServiceHost and contains durable delay. The workflow is currently inside the delay activity and was persisted into database. Then the application pool, under which the ASP.NET application is running, goes to be recycled (e.g. by web.config change) and there are no mor...

Condition Error: Property is not declared. It may be inaccessible due to its protection level.

I've have a workflow whose root activity is a custom NativeActivity with a public InArgument called XmlData. When I try and use this argument in a child If activity I get the following error using XmlData within the condition: 'XmlData' is not declared. It may be inaccessible due to its protection level My properties look like this: ...

How to hook up WF4 WorkflowRuntime events when using a XAMLX service

I'm currently using a BehaviorExtensionElement to load a ServiceBehavior where the ApplyDispatchBehavior method is set up as: public void ApplyDispatchBehavior(ServiceDescription serviceDescription, System.ServiceModel.ServiceHostBase serviceHostBase) { WorkflowServiceHost host = serviceHostBase as WorkflowServiceHost; ...

versioning in workflow 4.0 services when they are persisted

Hello everyone, If we put in production the version 1.0 of a workflow, and we change it to, let say, 1.1. What happens with the persisted instances? if you have experience in that issue, please tell me about best practices Thanks in advance. ...

Workflow Foundation: How to create Receive activity with custom message in xaml designer?

I need to have Receive activity which can receive my custom data. I found examples, but all use coded workflows like such public class ProcessRequest : Activity { public ProcessRequest() { Variable<MyData> request = new Variable<MyData> { Name = "request" }; Receive receiveRequest = new Receive { ServiceContr...

How can I use log4net in WF4?

I've created a simple WF4 console app and set up log4net identically to my other apps. However, when I fire up the console and use the ILog object inside WF4 (I actually pass it into the workflow), no information is presented using my ColoredConsoleAppender. What am I doing wrong? ...

Workflow Foundation: Never finished Delay activity

Let's have a workflow consisted of Receive activity followed by Delay activity. The Receive activity has CanCreateInstance = true and the query (message) correlation is also provided. The workflow is hosted in workflow service and is persisted into the database immediately on idle. WorkflowService service = new WorkflowService { Name ...

How do I access database from WF4?

Hi Guys, I host a wcf workflow service within my ASP.NET MVC2 application. I need to be able to load/save data inside my workflow (WF4). How it can be done? Should I just instantiate my Entity Framework context within my activities and read/write? Cheers. ...

Convert user input into ToString() method inside FlowDocument in Workflow 4.0

I have a Workflow 4.0 app that generates emails. In a dialog for creating the email body the user needs to be able to input some string value representing an existing wf instance variable to be inserted as a string at runtime. So they input something like: Email body text including <>. (say ExistingVariable is an int or something like...

Expose NativeActivity Variables to Workflow Designer

I've got a NativeActivity which contains an Activity body. The purpose of this activity is to expose a resource for the duration of the child activity as a Variable. The problem I've encountered is it appears the Variable cannot be used outside the activity. I'll use StreamReader as an example resource. ResourceActivity.cs: [Designer(t...

Explicitly persist states in Workflow 4.0 rather than everything.

I have ran into an issue with my SQL instance store attached to a WorkflowApplication that is running. When I exit my application I'm calling an Unload() on the WF app to persist it. I didn't think about it during design time, but it does makes sense, it's persisting an arg that was passed in to the WorkflowApplication constructor when i...

what happened to glyphs in workflow fundation 4.0 - can we decorate activity in desingner in some way in workflow fundation 4

hi. I need to decorate all the activities shown in designer with some icons or other pictures. is there any way to show all activities with some decoration (lets say cross "X" as picture ) I have some data tracked and I want to show that this activity finished OK and this failed because of ... etc. do someone of you know? It would rea...

How do I properly Load a Workflow after Pausing/Persisting it?

Using this MSDN Article as an example for pausing and resuming, one would assume that this would be pretty straight forward. This is how I'm "pausing" the workflow... LastWfGuid = workflow.Id; workflow.Unload(); Pretty simple, it's supposed to persist to the instance store (which I already set prior to these two lines) and I do see en...

Cannot drop custom Workflow activity for TFS2010 in custom build process template.

Hi, I've created a custom workflow activity for TFS 2010 to customize the assembly versioning. I've created the activity and tested it using a Testworkflow and some unit testing code. It works fine. When I create a new build process template however, I cannot drop the custom activity onto the workflow designer. When I drag it to th...

Why does my Workflow Service (4.0) variable go null in a DoWhile Activity?

I have a WF service that I'm trying to setup receive activities to "Subscribe" and "Unsubscribe". I'm using This WF Durable Duplex Tutorial as a basis because my service performs callbacks to clients. Basically, think of it as a chat service. I can make client calls to the two receive activities just fine. What happens is the callback a...

Is there any limitation to the number of parrallel activities that can be run in WF4 hosted in IIS

I am trying to figure out the best way of achieving the following. I have a web service that will be called by a page within a web application. The service itself needs to return a result within a second or two at the most to keep the page usable. The service will need to call at least a dozen separate services to accumulate the data r...

How can I write a custom WorkFlow 4 Code Activity that includes a "Body Block"?

Is this possible? I know it is for MS since they have WF activity packs but I'm not sure how it's done. It would be nice to be able to have Activities with Body blocks to insert other activities, buttons, etc. If not too much trouble and/or time consuming that is. ...