Search Results

Search found 44 results on 2 pages for 'wf4'.

Page 1/2 | 1 2  | Next Page >

  • How can I use log4net in WF4?

    - by Dmitri Nesteruk
    I've created a simple WF4 console app and set up log4net identically to my other apps. However, when I fire up the console and use the ILog object inside WF4 (I actually pass it into the workflow), no information is presented using my ColoredConsoleAppender. What am I doing wrong?

    Read the article

  • WF4 – It has suddenly got interesting

    - by MarkPearl
    I was at Teched two years ago when one of the Microsoft leads said there were three new area’s that we needed to pay attention to for development, namely: WPF WCF WF At the time I was just getting back into development work and had a look at WPF and immediately was sold on the approach. While I haven’t been to involved with WCF directly, I know that some of the guys in my dev team have been and that it too was a success. So what happened to WF? It seemed clunky, and all the demo’s that I saw of it left me scratching my head wondering how if it was going to be useful. Fast forward two years later and while I have had a brief look at WF4, I can immediately see areas where we can use the technology. Does that mean that I think WF4 is the bees knees? I don’t know enough about it yet to really have a solid opinion, but I do think that it is finally going in the right direction. A good introduction to WF4 can be found here.

    Read the article

  • How to hook up WF4 WorkflowRuntime events when using a XAMLX service

    - by Joel D'Souza
    I'm currently using a BehaviorExtensionElement to load a ServiceBehavior where the ApplyDispatchBehavior method is set up as: public void ApplyDispatchBehavior(ServiceDescription serviceDescription, System.ServiceModel.ServiceHostBase serviceHostBase) { WorkflowServiceHost host = serviceHostBase as WorkflowServiceHost; if (host != null) { UnityService.CreateContainer(); host.WorkflowExtensions.Add<IUnityContainer>(delegate { return UnityService.CreateChildContainer(); }); System.Diagnostics.Debug.WriteLine("NotificationService : Adding extension"); WorkflowRuntimeBehavior wfbehavior = serviceDescription.Behaviors.Find<WorkflowRuntimeBehavior>(); WorkflowRuntime runtime = wfbehavior.WorkflowRuntime; runtime.WorkflowStarted += runtime_WorkflowStarted; runtime.WorkflowCreated += runtime_WorkflowCreated; runtime.WorkflowUnloaded += runtime_WorkflowUnloaded; runtime.WorkflowSuspended += runtime_WorkflowSuspended; runtime.WorkflowCompleted += runtime_WorkflowCompleted; runtime.WorkflowAborted += runtime_WorkflowAborted; runtime.WorkflowTerminated += runtime_WorkflowTerminated; } } None of the events are triggered which only goes to say that the way I'm referencing the runtime instance in this particular scenario is wrong. Anyone know of a way to do this? Thanks in advance.

    Read the article

  • "type not defined" exception with WF4 RC

    - by avi1234
    Hi, I`m gettin the following exception while invoking my workflow (dynamically): The following errors were encountered while processing the workflow tree: 'DynamicActivity': The private implementation of activity '1: DynamicActivity' has the following validation error: Compiler error(s) encountered processing expression "TryCast(simplerule_out,OutputBase2)". Type 'OutputBase2' is not defined. 'DynamicActivity': The private implementation of activity '1: DynamicActivity' has the following validation error: Compiler error(s) encountered processing expression "Res". Type 'OutputBase2' is not defined. 'DynamicActivity': The private implementation of activity '1: DynamicActivity' has the following validation error: Compiler error(s) encountered processing expression "Res". Type 'OutputBase2' is not defined. 'DynamicActivity': The private implementation of activity '1: DynamicActivity' has the following validation error: Compiler error(s) encountered processing expression "New List(Of OutputBase2)". Type 'OutputBase2' is not defined. The workflow is very simple and worked fine on VS 2010 beta 2! All I`m trying to do is to create new list of my abstract custom type "OutputBase2". public class OutputBase2 { public OutputBase2() { } public bool Succeeded { get; set; } } class Example { public void Exec() { ActivityBuilder builder = new ActivityBuilder(); builder.Name = "act1"; var res = new DynamicActivityProperty { Name = "Res", Type = typeof(OutArgument<List<OutputBase2>>), Value = new OutArgument<List<OutputBase2>>() }; builder.Properties.Add(res); builder.Implementation = new Sequence(); ((Sequence)builder.Implementation).Activities.Add(new Assign<List<OutputBase2>> { To = new VisualBasicReference<List<OutputBase2>> { ExpressionText = res.Name }, Value = new VisualBasicValue<List<OutputBase2>>("New List(Of OutputBase2)") }); Activity act = getActivity(builder); var res2 = WorkflowInvoker.Invoke(act); } string getXamlStringFromActivityBuilder(ActivityBuilder activityBuilder) { string xamlString; StringBuilder stringBuilder = new StringBuilder(); System.IO.StringWriter stringWriter = new System.IO.StringWriter(stringBuilder); System.Xaml.XamlSchemaContext xamlSchemaContext = new System.Xaml.XamlSchemaContext(); System.Xaml.XamlXmlWriter xamlXmlWriter = new System.Xaml.XamlXmlWriter(stringWriter, xamlSchemaContext); System.Xaml.XamlWriter xamlWriter = System.Activities.XamlIntegration.ActivityXamlServices.CreateBuilderWriter(xamlXmlWriter); System.Xaml.XamlServices.Save(xamlWriter, activityBuilder); xamlString = stringBuilder.ToString(); return xamlString; } public Activity getActivity(ActivityBuilder t) { string xamlString = getXamlStringFromActivityBuilder(t); System.IO.StringReader stringReader = new System.IO.StringReader(xamlString); Activity activity = System.Activities.XamlIntegration.ActivityXamlServices.Load(stringReader); return activity; } } Thanks!

    Read the article

  • .NET WF4: Should it be in the middle of everything?

    - by stimpy77
    I am aware that WF4 (Windows Workflow 4.0, part of .NET 4.0) is a significant rework and redesign of WF3, where much of what made WF3 a poor technology choice has been cleaned up in WF4. For example, as far as I can tell, WF4 (Windows Workflow 4.0) activities are more or less testable with [TestMethod] and mocking. This among other things, like improved performance, has grabbed my attention about the technology again, whereas I had previously pooh-poohed WF3. I'm working on a new architecture for essentially an n-tier collaborative application (not enterprise-class, just a smallish project with potential to grow significantly) where I'm already trying to discipline myself to use IoC and, to some extent, TDD, and I'm wondering, in general terms, whether it is wiser to just hand-code workflow logic or if I should delve into learning and integrating WF4 so that WF becomes literally the controller of the entire application, i.e. the practical C in "MVC" (not ASP.NET MVC but rather the pattern). So should workflow activities in WF4 be the primary controller for a highly expandable/growable web-based collaborative application? Or am I asking entirely the wrong question? This is a vague question, I'm sure, so abstract answers are as welcome as specific ones.

    Read the article

  • Is there any standalone application which would export WF4 designer functionality?

    - by Sergej Andrejev
    I read that it is possible to host WF4 designer in standalone application outside Visual Studio 2010, in fact I tried it too. But main problem with it is missing intelisence. Therefore the question: Does anyone know about whether there are open source (or not OS) projects which add this missing functionality to standalone WF4 designer? Even better if it's a universal ready-to-use application

    Read the article

  • Using WF4 WorkflowInvoker

    This article describes a design, implementation and usage of the custom service operation invoker for invoking a xaml workflow. It is based on the upcoming Microsoft .NET 4 Technology.

    Read the article

  • Windows Workflow Foundation 4 (WF4) ReHosting

    - by Russ Clark
    I've been looking at the possibility of ReHosting a WF4 Workflow to be used to debug running Workflows. All the posts and samples I've seen regarding WF4 Rehosting are using a WPF application to initially Host the Workflow, and then use the WorkflowDesigner in ReHosting it. Is there any way to Rehost a Workflow that was hosted in a non WPF application, like ASP.Net MVC?

    Read the article

  • How to read the Web.Config file in a Custom Activity Designer in a WF4 Workflow Service

    - by Preet Sangha
    I have a WF service with a custom activity and a custom designer (WPF). I want to add a validation that will check for the presence of some value in the web.config file. At runtime I can overload void CacheMetadata(ActivityMetadata metadata) and thus I can do the validation happily there using System.Configuration.ConfigurationManager to read the config file. Since I also want to do this at design time, I was looking for a way to do this in the designer.

    Read the article

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

    - by tartafe
    Hi, i have developed a wf-wcf services with a code activity and in it i want to retrive the current url of the service. If i disabling the persistence feature of appfabric i can retrive the url using HttpContext.Current.Request.Url.ToString() If the persistence feature is enabled the httpcontext is null. There is a different way to retrive the url of th wcf that host my code activity? Thanks in advace

    Read the article

  • Windows Workflow Foundation 4 (WF4) Delay

    - by Russ Clark
    I'm working with the the Release Candidate of Visual Studio 2010 using Wf4 to write a new workflow for approving resource requests. In my workflow, I would like for a request to expire after a few days if no approval has been made for the request. We did this in WF 3.5 (Visual Studio 2008) by adding a Delay timer into an EventDrivenActivity parallel to the EventDrivenActivity that was awaiting an approver to come and approve the request. If the Delay expired before an approval was made, the EventDrivenActivity would terminate the request. Does anyone know if there is a similar mechanism for doing this in WF4?

    Read the article

  • Windows Workflow Foundation 4 (WF4) Error Handling

    - by Russ Clark
    What is the best way to get error messages from a WF4 workflow back to a hosting ASP.NET MVC application? I need the workflow to not terminate, but continue to be active, and then pass a message back to the hosting app regarding the error, so the user can take an alternative action, but I'm not sure how to do that.

    Read the article

  • How do I access database from WF4?

    - by Patrol02
    Hi Guys, I host a wcf workflow service within my ASP.NET MVC2 application. I need to be able to load/save data inside my workflow (WF4). How it can be done? Should I just instantiate my Entity Framework context within my activities and read/write? Cheers.

    Read the article

  • Loading persisted workflow after workflowdefinition has changed in WF4

    - by Flores
    How to solve this problem (in WF4): I create a workflow in xaml and start several instances of it, I have a persistancestore and all workflows persist on a bookmark half way their workflow. Now I stop the application If I restart te application everything is resumed, en nicely completes. But what if I want to change the workflow definition after the running instances persist? the only way to load the running workflows (that I was able to find) is the following way: WorkflowApplication wfapp = new WorkflowApplication(new WorkflowDefinition()); wfapp.InstanceStore = new SqlWorkflowInstanceStore(connStr); wfapp.Load(wfGuid); So you need the workflow definition, if it has changed during the persistance, things go horribly wrong. What is the best way to solve this?

    Read the article

  • Host new WF4 workflows in appfabric

    - by racingcow
    Hello, I am new to using AppFabric to host WF services. I am trying to write a workflow admin application that will allow users to create xaml workflow definitions using the hosted WF4 designer, and then somehow allow those workflow defitions to be automatically deployed and hosted in AppFabric with the click of a button. I have the designer going, and I have read a couple of tutorials on how to host workflow services in AppFabric such as http://msdn.microsoft.com/en-us/library/ee677238.aspx, but my problem is how to deploy and host the workflow services via code. Does anyone know if this sort of "autodeploy/host" thing can be done with AppFabric? If so, could you point me in the right direction on this? -David

    Read the article

  • Windows Workflow Foundation 4 (WF4) Bookmark

    - by Russ Clark
    I'm working with Visual Studio 2010 and have a workflow where I'm trying to resume a bookmark. The bookmark appears to be getting set just fine, but when I try to run the code below to resume it, I get an entry in the InstancesTable in the persistence database with the SurrogateLockOwnerID field set to an integer, usually this field is null, and I can no longer do anything with the workflow. I think this is indicating that I have some kind of blocking lock going on, but I can't find any references anywhere to the SurrogateLockOwnerID. Does anyone know what is causing this, and how to fix it? WorkflowApplication workflowApp = new WorkflowApplication(new WebCARSWorkflow()); workflowApp.Extensions.Add(new SqlTrackingParticipant(ConnString)); InstanceStore instanceStore = new SqlWorkflowInstanceStore(ConnString); workflowApp.InstanceStore = instanceStore; workflowApp.Load(WorkflowInstanceId); workflowApp.PersistableIdle = (waie) => PersistableIdleAction.Unload; Approver actualApprover = new Approver(ProcessingStatus.Awaiting, my_RDA_Role, "RDAGetPlayersFromExternalRoleURI", 14); actualApprover.ActionDate = DateTime.Now; Player actualPlayer = (Player)GetPlayer(login); actualApprover.ActualPlayer = actualPlayer; actualApprover.ApproverAction = action; workflowApp.ResumeBookmark("ErrorOccurredBookmark", actualApprover);

    Read the article

  • WF4 workflow versioning using WorkflowServiceHost

    - by rwwilden
    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 hosting inside IIS through a XAMLX file, you do not call WorkflowServiceHost yourself, this is handled somehow by IIS. So how do I ensure that the correct workflow definition is loaded for the right version of my workflow?

    Read the article

  • Design workflows for WF4 in Silverlight

    - by avi1234
    Hi, My system is based on activities and I want to give the analysts users the opportunity to create dynamics flows (at runtime). The designer UI based on SL 4.0 . It looks like WorkflowFoundation is the most valuable solution but we didn`t find any WF version that fits to SL (to create the xaml in SL). Any ideas? any other capable engines? Thanks, Hec

    Read the article

  • WF4 - Display workflow design in asp.net and highlight an activity

    - by jikan_the_useless
    i need to display current status of a document approval workflow task in asp.net web page with a specific activity highlighted. i have seen the visual workflow tracker example (in wf&wcf samples) but i have two issues, 1-i have to render workflow in asp.net not in a wpf app. 2-i don't need to display current status with workflow running, all activities that need to highlighted are the one that require user input. e.g. "waiting for approval from department head" etc. if i could just convert the workflow xaml to jpg after highlighting a specific activity by activity id that created a bookmark and waiting to resume the bookmark it would do the work.

    Read the article

  • SynchronizationContext and Bookmarks in WF4

    - by DBatisse
    I am running workflows under asp.net and using SynchronizationContext to make the page "wait" for the workflow. Here is how I run the workflow instance under asp.net: var workflowApplication = new WorkflowApplication(activity); SynchronizationContext syncContext = SynchronizationContext.Current; workflowApplication.Completed = delegate { syncContext.OperationCompleted(); }; workflowApplication.SynchronizationContext = syncContext; syncContext.OperationStarted(); workflowApplication.Run(); In one of the activities I use a bookmark. Now I want the page processing to continue whenever I call CreateBookmark. I tried calling SynchronizationContext.Current.OperationCompleted() before setting the bookmark but that crushes asp.net site when the workflow resumes and completes (I think the workflow instance calls OperationCompleted again when it completes and the error raises) How can I work with bookmarks under Asp.Net, any ideas?

    Read the article

  • WF4 &ndash; Guess the number game!

    - by MarkPearl
    I posted yesterday how really good WF4 was looking. Today I thought I would show some real basics that I was able to figure out. This will be a simple example, I am going to make a flowchart workflow – which will prompt the user to guess the number until they guess the right number. Lets begin… Make a new project and make it a Workflow console Application. Then select the Workflow file and drag a FlowChart (2) to point 3. This will now show a green start circle in the designer form. We are going to work with primitives to start with. We are now going to drag a few objects onto the Workflow, We drag the WriteLine, Assign & Decision items onto the designer. Once they are dragged onto the designer we will want to link them up. The order that they are linked is critical since this will determine the order of the solution. In this case, we want the system to first ask “Guess a number”, then to wait for the user to input some code, and then to display “You got it” if they got it right, and “Try again” if they got it wrong. So we now link the arrows to the objects. This is done by moving the mouse pointer over the start objects and clicking on one of the toggles and then dragging it to the next object and releasing the button over one of the toggles. This will place an arrow from the source object to the target object. Okay… pretty simple stuff – now we just need these primitive objects to do stuff. Lets start with the WriteLine primitive. We place the text in inverted commas in the Text field. Because this field accepts any valid VB expression we could have put variables etc. in there if we wanted to. The next thing we want to do is allow the user to input a number. This brings up an interesting problem, if a user were to type in a number, there would need to be someway to declare a variable to hold that value for the life of the workflow. We can achieve this by declaring a variable. To declare a variable, move your cursor over the variables tab at the bottom of the workflow, and then type the name of the new variable in the “Create Variable” field and set it as shown in the image above. Now that we have a variable, we want to call the Console.Readline method and assign the inputted value from the Console to that variable. The code that cannot be seen is actually this – Convert.ToInt32(Console.ReadLine()) We now have a workflow that first prompts the user for a number, then allows the user to type in a number. We are almost done, we just need to make the system react to the value inputted. There are a few ways we could do this, I am going to use the Decision item. So select the Decision object on the designer and then view its properties (F4 for me), and in the condition field place a condition. For simplicity sake I have decided that if the user guesses 10, they will have guessed the number. This is now the completed workflow. Its really easy to understand and shows some really powerful principles for Business applications. You can run the application and see what it does. Imagine writing business solutions that do not worry about the exact flow of objects, but simply allows a business analyst or someone to configure the solution to work exactly as the business rules would dictate. And if the rules changed six months later all they would need to do is re-drag some of the flows. Now I do not know if WF4 will allow for this, but it feels like it is a step in the right direct.

    Read the article

1 2  | Next Page >