workflow-foundation-4

What are the differences between open source BPM tools (such as Activiti, bonita) & Windows Workflow Foundation

久未见 提交于 2019-12-06 03:56:35
问题 I was trying to find a free and open source BPM tool which is based on asp.net, but unfortunately i fail to find such a tool. But recently I read an article about Windows Workflow Foundation, so does it provide functionality that are similar to open source BPM tools such as Activiti , bonita, Joget, etc. Or Windows Workflow Foundation can not be used to build as full business process workflow as in Activiti and other open source BPM tools. 回答1: The first thing to remember is that WF is not a

How can I write a custom WorkFlow 4 Code Activity that includes a “Body Block”?

 ̄綄美尐妖づ 提交于 2019-12-05 19:05:56
Is this possible? I know it is for MS since they have WF activity packs but I'm not sure how it's done. It would be nice to be able to have Activities with Body blocks to insert other activities, buttons, etc. If not too much trouble and/or time consuming that is. Its easy enough if you follow a few rules. Here's an example of a NativeActivity that has a child: [Designer(typeof(MyActivityDesigner)), ContentProperty("Child")] public sealed class MyActivity : NativeActivity, IActivityTemplateFactory { // this "activity delegate" holds our child activity public ActivityAction Child { get; set; }

Assembly must be registered in isolation error

非 Y 不嫁゛ 提交于 2019-12-05 17:48:56
I'm trying to load a custom workflow activity onto a crm server. I loaded the project onto the server and have been using the CRM Plug-in Registration Tool. The server is CRM2011 and thus supports .NET 4.0 activities. However, when I press the "Register" button (After the assembly has successfully loaded onto the Tool) the following error occurs: `Unhandled Exception: System.ServiceModel.FaultException'1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Action failed for assembly 'ExecuteSQLJob, Version=1.0.0.0,

Trying to get to the bottom of a Windows Workflow 4.5 issue

拟墨画扇 提交于 2019-12-05 14:31:57
The error I am getting is "The WorkflowApplication has been aborted because a Load or LoadRunnableInstance operation threw an exception. Create a new WorkflowApplication object to try loading another workflow instance." I am using "workflowapplication" to run the workflow. The workflow instance I'm trying to load (there are a few of them) were created sometime ago and were persisted into the database. Is there a way to find the exception that was actually thrown during Load or LoadRunnableInstance operation? I caught this error in the "aborted" event on the workflowapplication object, but it

AsyncTaskCodeActivity and lost context after await

不羁的心 提交于 2019-12-05 10:03:51
AsyncTaskCodeActivity fails when the context parameter is accessed after the first await is performed. For example: public class TestAsyncTaskCodeActivity : AsyncTaskCodeActivity<int> { protected async override Task<int> ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken) { await Task.Delay(50); // context has already been disposed and the next line throws // ObjectDisposedException with the message: // An ActivityContext can only be accessed within the scope of the function it was passed into. context.Track(new CustomTrackingRecord("test")); // more awaits can

WF4RC, WriteLine activity throws error on StringWriter assigned to TextWriter

好久不见. 提交于 2019-12-05 09:35:06
am new to Windows Workflow [WF], and interested in evaluating WF for business purposes. I decided to work through an introduction [TestMethod] public void TestMethod () { TextWriter writer = new StringWriter (); Sequence sequence = new Sequence { Activities = { // so, assigning a reference type [eg StringWriter] // as target is prohibited in WF4RC. what or how do // i assign a target? introduction cited above may // not be current [ie may be Beta2, not RC] so ... ? new WriteLine { Text = "Hello", TextWriter = writer }, new WriteLine { Text = "World", TextWriter = writer } } }; // !!! BLOWS UP

Loading a workflow stored as XAML in .NET 4.0

僤鯓⒐⒋嵵緔 提交于 2019-12-05 06:24:15
What is the syntax for loading a .NET 4.0 Beta2 workflow that was previously created and stored as XAML. The WorkflowElement and WorkflowXamlServices classes no longer exist. I am trying to do something like this (that worked in Beta 1): WorkflowElement wf = WorkflowXamlServices.Load(File.OpenRead("Workflow.xaml")) as WorkflowElement; Found my own answer after further research. The WorkflowElement and WorkflowXamlServices classes have been removed from Beta2. The approach above requires the use of DynamicActivity and ActivityXamlServices. DynamicActivity wf = ActivityXamlServices.Load(

How to correctly save a WF4 ActivityBuilder

孤者浪人 提交于 2019-12-05 04:52:52
问题 I am currently saving my .NET FX 4.0.1 StateMachine activity like this: var sb = new StringBuilder(); var xamlWriter = ActivityXamlServices.CreateBuilderWriter( new XamlXmlWriter(new StringWriter(sb), new XamlSchemaContext())); XamlServices.Save(xamlWriter, activityBuilder); return sb.ToString(); This works fine and the generated XAML looks good. Unfortunately, it is invalid. I can read it back in using ActivityXamlServices.Load but when I execute it, it says that it doesn't know the

Windows Workflow 4.5 Version Mapping

半世苍凉 提交于 2019-12-04 21:00:58
Suppose if there are two versions of the workflow, some instances are running on version1 and some on version2 , Is there any way so that we can call version1 workflow instead of version2 for a new instance, as we create a instance of workflow it will by default create the instance of version2. .net Framework 4.5 introduces Workflow Versioning which seems to be exactly what you need. These two links should be enough to get started: Using WorkflowIdentity and Versioning How to: Host Multiple Versions of a Workflow Side-by-Side 来源: https://stackoverflow.com/questions/15703857/windows-workflow-4

Rehosted Microsoft Workflow Designer UI

故事扮演 提交于 2019-12-04 19:18:56
I have recently created a rehosted Workflow Designer application and noticed that the UI looks outdated when compared with how it looks in Visual Studio. Does anyone know which could be the problem? No matter what version of .NET I'm using (for example 4.6 or 4.7), the UI still doesn't update. I have also followed the next article to enable Workflow 4.5 features, but without any success on the UI side. (WF4.5) Enabling new .Net framework 4.5 features in your rehosted designer application https://blogs.msdn.microsoft.com/tilovell/2012/06/04/wf4-5-enabling-new-net-framework-4-5-features-in-your