workflow-foundation-4

WF4 - Composite custom activity throw an strange exception when using OutArgument

人盡茶涼 提交于 2021-01-28 05:32:28
问题 I'm trying to use a composite custom activity that apply a regular expression and return a boolean if it match. The pattern is something encoded in design time. The source text is coming from an activity. This activity is also specified in design time (I've made a activity designer that allow to drop an activity as source) But I also need to return what sub string match the expression, so I added an OutArgument to retrieve the string that match, and the string captured. Here is the code:

WF4 InstancePersistenceCommand interrupted

南楼画角 提交于 2021-01-27 10:49:53
问题 I have a windows service, running workflows. The workflows are XAMLs loaded from database (users can define their own workflows using a rehosted designer). It is configured with one instance of the SQLWorkflowInstanceStore, to persist workflows when becoming idle. (It's basically derived from the example code in \ControllingWorkflowApplications from Microsoft's WCF/WF samples). But sometimes I get an error like below: System.Runtime.DurableInstancing.InstanceOwnerException: The execution of

Accessing Arguments, Workflow Variables from custom activities

那年仲夏 提交于 2020-02-02 12:58:10
问题 I have a workflow composed of many custom activities. All these activities need to access startup arguments of the workflow itself. I can define InArgument inside all these custom activities and bind the workflow arguments to custom activity arguments but I am not comfortable with this solution. What is the best way to access workflow level argument and variable declarations from custom activities. Can I get them from ActivityContext? Thanks. 回答1: One way we've looked at this with our custom

Using WCF on Localhost on Azure

早过忘川 提交于 2020-01-22 12:32:27
问题 In summary How do I acces a WCF service on localhost when hosted in IIS on Azure? Azure does not bind localhost or 127.0.0.1 to my website. Details I have an ASP.Net application hosted on Azure. I have added a .svc and some workflows that I want to use via WCF. To keep matters simple, my web app simply calls the service on localhost, so I have endpoints like these in web.config; <client> <endpoint address="http://localhost:8080/Router.svc/Case" binding="basicHttpBinding" contract="NewOrbit

AppFabric / WF 4.0 instances stuck despite no bookmark and pending timer

妖精的绣舞 提交于 2020-01-17 05:22:10
问题 I already posted a question about this (Abandoned instances that will not continue execution (zombie instances)), but still haven't got an answer. A difference I have noticed from the last question is that it can happen also when the configuration of the service Action on unhandled exception is set AbandonAndSuspend. So the scenario is a long term Workflow service hosted in IIS using AppFabric persistence store. This service performs some actions and then polls the result from a database.

Windows Workflow 4.5 Dynamic update using XAML / Designer

那年仲夏 提交于 2020-01-16 04:34:07
问题 I understand that Windows Workflow foundation 4.5 supports side by side and dynamic update of Workflow definition. I found few samples on internet, but all describes Code based approach for updating the workflow. I wanted to make a utility which is used by developer to update the workflow without coding. (using only Xaml manipulation should be our ideal case) My Utility does the following things, I take Base Xaml (the workflow definition I wanted to update) File Name and Assembly (V1) from

Abandoned instances that will not continue execution (zombie instances)

浪尽此生 提交于 2020-01-15 09:06:52
问题 I have a lot of WF instances hosted in IIS/WAS which are in a running (idle) state which will not do anything even though they don't have such a long delay or any active bookmark. Tracking is enabled (HealthMonitoringProfile). As the tracking data is deleted, they end up without any tracked instance or events. The only way to make them work again is to suspend and resume them, but this is sometimes failing and is always a pain. Has anyone had this issue? any help? Thanks in advance 回答1: In

wf4 An activity can only access its own implementation variables

倾然丶 夕夏残阳落幕 提交于 2020-01-15 06:09:55
问题 I have an activity with variables (which are C# expressions), but not able to read their values. public Collection<Variable> Variables { get; } = new Collection<Variable>(); protected override void DoExecute(NativeActivityContext context) { var x = Variables.FirstOrDefault(...).Get(context); } resulting in Activity '1.1: MyActivity' cannot access this variable because it is declared at the scope of activity '1.1: MyActivity'. An activity can only access its own implementation variables. I

wf4 An activity can only access its own implementation variables

烈酒焚心 提交于 2020-01-15 06:09:31
问题 I have an activity with variables (which are C# expressions), but not able to read their values. public Collection<Variable> Variables { get; } = new Collection<Variable>(); protected override void DoExecute(NativeActivityContext context) { var x = Variables.FirstOrDefault(...).Get(context); } resulting in Activity '1.1: MyActivity' cannot access this variable because it is declared at the scope of activity '1.1: MyActivity'. An activity can only access its own implementation variables. I

wf4 An activity can only access its own implementation variables

我们两清 提交于 2020-01-15 06:09:09
问题 I have an activity with variables (which are C# expressions), but not able to read their values. public Collection<Variable> Variables { get; } = new Collection<Variable>(); protected override void DoExecute(NativeActivityContext context) { var x = Variables.FirstOrDefault(...).Get(context); } resulting in Activity '1.1: MyActivity' cannot access this variable because it is declared at the scope of activity '1.1: MyActivity'. An activity can only access its own implementation variables. I