workflow-foundation

Registering custom tracking participants through code in workflow foundation 4.0

醉酒当歌 提交于 2019-12-06 13:51:32
I'm having trouble trying to attach a custom tracking participant in workflow foundation 4.0. I have a class that inherits from TrackingParticipant but I cannot see any other way of attaching it to my WorkflowServiceHost other than through lots of messy app.config entries like the SDK example demonstrates below (in the system.servicemodel element). This option seems to require a lot of extra overhead and classes to be created, when I just want a simple custom tracking participant to listen to my CustomTrackingRecord.Data.Add(key, value) calls. public class CustomTracking : TrackingParticipant

Resuming a persisted Window Workflow 4 Activity without knowing concrete type of activity

我的未来我决定 提交于 2019-12-06 13:13:40
I am trying to understand how one can resume (load) a previously persisted WF4 activity without knowing the concrete type of the activity. In order to load a persisted activity, I not only need its workflowId (which I have), but I need to pass in an instance of the activity too - so I need to know it's type: var workflowApplication = new WorkflowApplication(activity); // what type is activity? workflowApplication.Load(workflowId); The problem is that it could be one of a number of types - this activity is intended to be used within other activities and workflows: it sends a message to a

Windows Workflow Foundation 4 (WF4) ReHosting

纵然是瞬间 提交于 2019-12-06 10:25:07
问题 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 WPF application, like ASP.Net MVC? 回答1: The WorkflowDesigner is basically a big WPF control so you cannot host it in an ASP.NET application. Neither can you in

Windows Workflow - is this a good time to start?

独自空忆成欢 提交于 2019-12-06 10:03:50
I've heard rumors that the Windows Workflow team is re-implementing a lot of the existing framework for the next release. My company has a couple projects that would probably work really well with Workflow, and I'm familiar with the basics of the framework now, but I'm concerned that if we try to start implementing these in WF now, we'll end up regretting it when things supposedly get better in the near future. Should we wait for the next major release of workflow, or should we start exploring it now to better prepare ourselves? Read this blog Good-bye Windows Workflow Foundation see you in

Can I create CRM workflows using .NET 4?

我与影子孤独终老i 提交于 2019-12-06 07:23:18
I would like to take advantage of .NET4 for Dynamics CRM4.0. It is great for most things but I get a file not found exception when trying to register a workflow. It can't find System.Workflow.ComponentModel 4.0.0.0. Is there a workaround? CRM 4 is built under .NET 2.0/3.0. So, the only way to work with .NET 4.0 and CRM 4.0 is to isolate them in their own process. CRM 5.0 will use .NET 4.0, so you will be able to use it with the next version of CRM. With some tweeks you should be able to make it work partially with .NET 4.0, but if it like CRM 3.0 and .NET 2.0, other parts will break without

Hosting Windows Workflow Designer

孤者浪人 提交于 2019-12-06 07:16:01
Does anyone have any experience hosting the Windows Workflow designer surface? I've seen a couple of rather difficult to follow examples on MSDN, but not much else - certainly nothing that offers an explanation into the process of hosting WF that is clear or easy to read... Are there better resources out there for hosting WF (or a workflow-like design surface - I'm not necessarily tied to WF) that actually make sense ? There is a reference application from MSDN if you want to learn from code. WF Sample Workflow Designer Visual Studio 2005 Solution There was a blog maintained by the developer

WF 4, WCF, cancel running workflow

我们两清 提交于 2019-12-06 06:32:17
Currently have a simple workflow exposed as a service endpoint. The service correlates on the workflow instance id and everything works as expected (2 service calls available ReceiveBegin, Execute). My problem is that I would like the user to be able to cancel the long running part of the workflow by calling another Receive on the workflow. Have had a look at the WorkflowApplication.Cancel but as I am running this as a WCF service it doesn't seem to be available. Documentation seems a bit light on this area and most HOL and examples focus on console apps hosting the workflow. With workflow

How to write a long running activity to call web services in WF 4.0

蓝咒 提交于 2019-12-06 06:29:09
I created an activity which executes a web request and stores the result into the database. I found out that for these long running activities I should write some different code so that the workflow engine thread won't be blocked. public sealed class WebSaveActivity : NativeActivity { protected override void Execute(NativeActivityContext context) { GetAndSave(); // This takes 1 hour to accomplish. } } How should I rewrite this activity to meet the requirements for a long running activity You could either spawn a thread within your existing process using e.g. ThreadPool.QueueUserWorkItem() so

Is it better to have one big workflow or several smaller specific ones?

梦想与她 提交于 2019-12-06 06:18:30
问题 I need to build an app that gets files from a server and moves to another server. It was suggested that I look into using Windows Workflow Foundation (WF). I started to build the workflow but it is getting messy and I'm not sure I'm doing it the best way possible. Here is the basic worklow activities: Get a list of sources Determine if source is ftp or disk drive Get a list of files from the server If source is ftp then get the file with ftp get else if source is drive then read file from

Tracing in WF4 doesn't work?

徘徊边缘 提交于 2019-12-06 04:23:57
I'm trying to set up a simple test case of pushing to a TraceListener in WF4. I've created an empty wcf service library app (just the default get/reply xamlx) and added the below to the config. I get no logging back. Is there something else required? <system.diagnostics> <sources> <source name="System.Workflow"> <listeners> <add name="System.Workflow" /> </listeners> </source> <source name="System.Workflow.Runtime"> <listeners> <add name="System.Workflow" /> </listeners> </source> <source name="System.Workflow.Runtime.Hosting"> <listeners> <add name="System.Workflow" /> </listeners> </source>