workflow-foundation-4

which one is better architecture for the WF4.0? [closed]

对着背影说爱祢 提交于 2019-12-12 02:54:19
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . Our team is going to design a workflow solution for the log running processes. We have to maintain persistence and tracking and

“Persist activities cannot be contained within no persistence blocks” error

て烟熏妆下的殇ゞ 提交于 2019-12-11 20:07:31
问题 I would like the rule for which "Persist activities cannot be contained within no persistence blocks" error happens in WF4. I see that you can not persist between the first receive-send, but I do not understand the general idea. Any comment? Thanks 回答1: The goal of a no persist zone it to indicate that you are doing something that can't be resumed from the middle of it. For example a Receive and SendReply action, if you persist in the middle you can also resume from there if the workflow

Failure compiling Workflow Definition

别来无恙 提交于 2019-12-11 18:41:44
问题 I'm getting this following error when try to load a workflow from its definition: Compilation failures occurred: Line 0: Unable to load assembly 'PI.Shared.WF.Activities.Tests'. Line 581: The type 'System.Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Complete results are contained in the Data property of this exception. Please correct the errors in the source

Windows Workflow Persistence data (VS 2010 RC / .NET 4.0)

强颜欢笑 提交于 2019-12-11 12:52:20
问题 I have started working with Windows Workflow recently (the VS2010 RC / .NET 4.0 version) and am stuggling to get to grips with the SQL persistence functionality. I have managed to attach persistence to my WorkflowServiceHost via an SqlWorkflowInstanceStoreBehavior object and in my database there are rows appearing in the [System.Activities.DurableInstancing].[InstancesTable] table. However, I don't know how to make sense of any of this data (it seems as though quite a few columns are in

How to access variables in Windows Workflow in VB expressions constructed at runtime

試著忘記壹切 提交于 2019-12-11 12:27:11
问题 I hope I'm not being misguided in trying to do this, but I'd like to set the VB expression for an InArgument in Windows Workflow at runtime and have it access variables that are currently in scope. In particular, I'd like to change the following bit of example code to say new VisualBasicValue<string>("String.Format(\"Hello {0}\", FirstName) - that is, I'd like to stop specifying the explicit string "World" and start passing in a name to the workflow from Main . I add a new InArgument called

Exception escapes from workflow despite TryCatch activity

北城余情 提交于 2019-12-11 12:02:11
问题 I have a workflow inside a Windows Service that is a loop that performs work periodically. The work is done inside a TryCatch activity. The Try property is a TransactionScope activity that wraps some custom activities that read and update a database. When the transaction fails, I would expect any exception that caused this to be caught by the TryCatch . However, my workflow aborts. The workflow I have is the following: var wf = new While(true) { Body = new Sequence { Activities = { new

WF 4 Rehosted Designer - get foreach InArgument Value

谁说我不能喝 提交于 2019-12-11 11:19:25
问题 After reading this article: http://blogs.msdn.com/b/tilovell/archive/2009/12/29/the-trouble-with-system-activities-foreach-and-parallelforeach.aspx I have defined the ForEachFactory as follows: public class ForEachFactory<T> : IActivityTemplateFactory { public Activity Create(DependencyObject target) { return new ForEach<T> { DisplayName = "ForEachFromFactory", Body = new ActivityAction<T> { Argument = new DelegateInArgument<T>("item") } }; } } All works well but is it possible to check how

Activity throws exception when C# expression uses reference types

僤鯓⒐⒋嵵緔 提交于 2019-12-11 10:04:07
问题 I have a primitive "Assignment" activity. It takes values from an input variable for the parent sequence and puts them into an output variable for the parent sequence. If I simply perform this copy operation, everything works and the workflow completes successfully. If I introduce a system type "Random" or a project enum "ReportStatusType" the workflow throws an exception "A System.NotSupportedException was thrown: "Expression Activity type 'CSharpValue`1' requires compilation in order to run

Get Child Activity Subtree

时光怂恿深爱的人放手 提交于 2019-12-11 09:57:59
问题 I'm converting a legacy workflow system to WF4 so I have to jump through a couple hoops to make it match up with the api of our application. So I'll try to keep the problem explination as simple as possible. :) I have a custom activity that takes a sequence as an argument and then executes it. Prior to executing it, the custom activity needs to traverse the sequence (and it's branches etc) looking for specific types of child activities - then it does some reporting on these specific child

bookmarking inside a transaction WF4.0

雨燕双飞 提交于 2019-12-11 07:54:45
问题 I am creating long running workflow with will create a Bookmark for the persistance. When I execute the workflow it is workflow is working like a charm. Issue is here when I enclose the entire workflow in transaction scope, it is not completing its execution once it hits .waitone() I don't see the execution. For sure we need the transaction to be present out the workflow. I checked the DTC setting on the DB its ON. I think issue is with bookmarking in WF 4.0 and transaction on top of it. 回答1: