workflow-foundation-4

Hosting a self-hosted WF in IIS

三世轮回 提交于 2019-12-04 19:12:37
Does anyone know if it's possible to host a self-hosted WorkflowServiceHost application in IIS without turning it into a XAMLX file? If so, how? Furthermore, does anyone have any good guidelines for deploying XAMLX files in general to IIS 7? Thanks in advance You can do the same basic thing by writing your own hosting engine instead of the XAMLX one. You can then load applications via ASP.NET, but have complete control on it's lifespan/lifecycle. You have to create your own host to load the .XAML workflows into something like a WorkflowApplication and manage the lifespan of that workflow. It

WF4 -Get exceptions when using multiple ReceiveAndSendReply activities paralleled

我的未来我决定 提交于 2019-12-04 18:47:41
I have a scenario and want to use multiple ReceiveAndSendReply activities running in parallel situation, each of them will be put in an infinite while loop to make sure all activities are always running and listening. So I used a parallel activity to pack all those ReceiveAndSendReply, and each ReceiveAndSendReply was put in a While activity with condition set to true. And of cause, I put some activities with business logic between Receive activity and SendReplyToRecieve activity. Now I have a problem if it takes a long time to process a request in one branch, then during that time all other

Please confirm: Is Windows Workflow Foundation a good horse to be backing right now?

一个人想着一个人 提交于 2019-12-04 18:40:10
问题 We are in the process of selecting a workflow solution for a company that uses Microsoft products end to end. Given the news on WF4, in that it seems to be essentially a rewrite of previous versions, is it a wise move to back the current version or should we be looking elsewhere? Ie - is the current version so bad that we would not be wise to try and use it? 回答1: Haiving just launched a project which .NET 3.5 and workflow I'd say that the current release of WF is good enough to use and run

How do I handle “Receive” calls being made out of order?

时光毁灭记忆、已成空白 提交于 2019-12-04 17:38:07
I have a WF4 service that emulates a sales funnel. It works by starting with a "Registration" receive call. After that, there are 10 similar stages (comprised of a 2 receives at each stage). You can't advance past a stage until after the current stage validates the data received. What I'm unsure about though is, even though my client app wouldn't allow for it, how can I make my workflow prevent anyone from calling the receive operations out of order? In my test console app, I let the user call any receive operation (just because I wanted to see what happens). For example, if I call the

Workflow design advice for ASP.Net web application?

只谈情不闲聊 提交于 2019-12-04 17:27:32
My team has been tasked with designing a web application that is workflow driven. I need some advice regarding the design. The workflows need to be dynamic. Meaning, users can define the workflows through some interface and apply those workflows to a given scenario (The definitions will live in a SQL 2008 Database). The scenarios are defined by the business and will never change. So there may be only 2 types of scenarios a workflow can be defined for. The workflows are not necessarily linear. Some sort of state will drive the workflow. States will also be dynamic, but only exist in a workflow.

Add behaviorattribute to a WorkflowServiceHost

醉酒当歌 提交于 2019-12-04 15:15:53
Hi all i have a problem while adding a custom behavior to a WorkflowServiceHost. Here is my WorflowServiceHostFactory: public class ScoringWorkflowServiceHostFactory : WorkflowServiceHostFactory, IServiceHost<IKernel> { private static IKernel _InjectionInstance; public IKernel InjectionInstance { get { return _InjectionInstance ?? (_InjectionInstance = new StandardKernel(new ScoringWorkflowServicesNinjectModule(Scope))); } } public object Scope { get { return Guid.NewGuid(); } } public override ServiceHostBase CreateServiceHost(string constructorString, Uri[] baseAddresses) { String

WF4: How do I evaluate an expression only known at runtime?

╄→гoц情女王★ 提交于 2019-12-04 14:08:03
I am trying to create a simple WF4 activity that accepts a string that contains a VB.NET expression (from say the database), evaluates that string using the variables available in the current scope of the workflow and returns the result. Unfortunately, with the ways I've tried it, whether it be with a plain on Activity or a full-fledged NativeActivity , I keep hitting a wall. My first attempt was with a simple Activity, and I was able to make a simple class that evaluates an expression given some object as its input: public class Eval<T, TResult> : Activity<TResult> { [RequiredArgument] public

WF4 workflow versioning using WorkflowServiceHost

怎甘沉沦 提交于 2019-12-04 14:07:04
问题 Related to this question. I understand how to implement versioning of workflows using WorkflowApplication. If you keep the original XAML definition for older versions of your workflow around, you can load them using the right WorkflowApplication constructor. How could you ensure that WorkflowServiceHost uses the correct workflow definition when you want to host your workflows in IIS? There is a WorkflowServiceHost constructor that you can use to load a workflow definition, but when you are

How to make a Win Service run Long Term with Threading

ε祈祈猫儿з 提交于 2019-12-04 12:40:27
I have a win service hosting a few workflows (a WorkflowApplication and a WorkflowServiceHost) that I need to keep long running. Because OnStart() requires that it completes and returns to the OS, I have a main method that fires on another thread in a threadpool. My Onstart() mainly looks like this protected override void OnStart(string[] args) { eventLog.WriteEntry("Service starting..."); ThreadPool.QueueUserWorkItem(new WaitCallback(ServiceMainThread)); Thread.Sleep(100); eventLogCms.WriteEntry("Service Started."); } ServiceMainThread() is the method where my workflows execute and core

Argument validation in custom activity designer

夙愿已清 提交于 2019-12-04 09:19:02
I am having problems getting validation to work properly in the designer for my custom activity. The simplest sample to reproduce the behavior is as follows: I have a custom WF4 activity with a dynamic collection of arguments stored in a dictionary: [Designer(typeof(DictionaryActivityDesigner))] public class DictionaryActivity : NativeActivity { [Browsable(false)] public Dictionary<string, InArgument> Arguments { get; set; } public InArgument<string> StringArg { get; set; } public DictionaryActivity() { Arguments = new Dictionary<string, InArgument>(); } protected override void Execute