workflow-foundation-4

Appfabric WF4-WCF services, how to retrieve current url in codeactivity without httpcontext?

99封情书 提交于 2019-12-22 09:05:14
问题 I have developed a wf-wcf services with a code activity and in it I want to retrieve the current URL of the service. If I'm disabling the persistence feature of appfabric I can retrieve the URL using HttpContext.Current.Request.Url.ToString() If the persistence feature is enabled then the httpcontext is null. Is there a different way to retrieve the URL of the WCF that hosts my code activity? 回答1: You need to implment IReceiveMessageCallback and add that to an activity's context. In the

Can VS2010 Workflow Designer auto arrange layout?

不想你离开。 提交于 2019-12-22 08:44:18
问题 In VS2010 WF4 workflow designer is there any way to get it to auto arrange the layout? I want to add a new step near the top of a workflow and I can't see any way to easily make room for the new item. The process flow underneath where I want to add the new step is a switch statement with several branches; it doesn't even seem to be possible to multi-select items and move them all down to make room. 回答1: Sadly, there is no way, other than adding what you want to add and then deleting the

WF4 -Get exceptions when using multiple ReceiveAndSendReply activities paralleled

雨燕双飞 提交于 2019-12-21 23:36:30
问题 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

Why is the Workflow Designer so extremely slow when editing build process templates?

给你一囗甜甜゛ 提交于 2019-12-21 09:15:12
问题 There's not much more to add really than the above question. I have a fairly simple build process template, which has hardly deviated from the default one. I have two custom activities, which by recommendation live in a separate assembly within the same solution. However.... Opening the template takes about two minutes. Changing properties on an activity in the workflow, reordering activities in the workflow, adding activities to the workflow, all take between 30-60 seconds. It's completely

IObservable<> missing .Subscribe extension methods

浪尽此生 提交于 2019-12-21 07:31:22
问题 I'm using RX extensions and WF4 to create a workflow which reacts to observable messages to progress the workflow. To do this, I bring in an object containing an IObservable (ModuleMessage being my abstract class.) The problem I'm having is that .Subscribe fails to recognize any of its extension methods, namely the one for lambda extpressions/method groups. In the following code, I have references: using System.Activities; using System.Activities.Hosting; using System.Collections.Generic;

Windows Workflow Foundation 4 and ASP.NET MVC

纵饮孤独 提交于 2019-12-20 08:26:24
问题 We are evaluating Windows Workflow Foundation 4 to use in MVC 3 based Web Applications. We would like to create flexible order workflows for different projects. Does anybody know good information about the general architecture or hands-on-labs for this kind of application? Some concrete questions would be: how can you activate a specific controller/action from the workflow? what is the best way to communicate between the workflow and the web application (events, wcf services, ...)? 回答1: This

Windows Workflow Foundation 4 and ASP.NET MVC

青春壹個敷衍的年華 提交于 2019-12-20 08:26:23
问题 We are evaluating Windows Workflow Foundation 4 to use in MVC 3 based Web Applications. We would like to create flexible order workflows for different projects. Does anybody know good information about the general architecture or hands-on-labs for this kind of application? Some concrete questions would be: how can you activate a specific controller/action from the workflow? what is the best way to communicate between the workflow and the web application (events, wcf services, ...)? 回答1: This

Workflow Foundation - Literal only supports value types and the immutable type System.String

北慕城南 提交于 2019-12-19 18:50:18
问题 I have the following unit test for a WF code activity called MyCodeActivity: [ExpectedException(typeof(ArgumentException))] [TestMethod] public void ShouldRequireParam() { //arrange var invoker = new WorkflowInvoker(new MyCodeActivity() { MyInt = 2, MyComplexObject = _complexObject }); //act invoker.Invoke(); //assert Assert.Fail("Expected ArgumentException"); } When I run the test I get the following exception 'Literal< MyComplexObject>': Literal only supports value types and the immutable

Workflow Foundation - Literal only supports value types and the immutable type System.String

让人想犯罪 __ 提交于 2019-12-19 18:50:13
问题 I have the following unit test for a WF code activity called MyCodeActivity: [ExpectedException(typeof(ArgumentException))] [TestMethod] public void ShouldRequireParam() { //arrange var invoker = new WorkflowInvoker(new MyCodeActivity() { MyInt = 2, MyComplexObject = _complexObject }); //act invoker.Invoke(); //assert Assert.Fail("Expected ArgumentException"); } When I run the test I get the following exception 'Literal< MyComplexObject>': Literal only supports value types and the immutable

WF4.5 not compiling side-by-side c# workflows

感情迁移 提交于 2019-12-19 10:15:46
问题 I have an IIS hosted xamlx workflow with c# expressions that I'm trying to run in side-by-side versioning. I did exactly like this article: Side by side versioning of workflow services New instances of the workflow works as expected, but when I call an instance of a prior version of the workflow, it raises an error telling me that it's not compiled. Error: Unable to locate the ICompiledExpressionRoot for compiled location 'auxData'. Make sure that the definition for the activity containing