Search Results

Search found 3 results on 1 pages for 'avi1234'.

Page 1/1 | 1 

  • 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

  • "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

  • Get input from user with ActivityBuilder in WF 4

    - by avi1234
    Hi, I am trying to write a simple activity that received from the user its name and printing "hello + username" message. the problem is that i cannot access to the username input via code. the function is: static ActivityBuilder CreateTask1() { Dictionary<string, object> properties = new Dictionary<string, object>(); properties.Add("User_Name", new InArgument<string>()); var res = new ActivityBuilder(); res.Name = "Task1"; foreach (var item in properties) { res.Properties.Add(new DynamicActivityProperty { Name = item.Key, Type = item.Value.GetType(), Value = item.Value }); } Sequence c = new Sequence(); c.Activities.Add(new WriteLine { Text = "Hello " + properties["User_Name"] }); res.Implementation = c; return res; } The output of the followed will always be "Hello User_Name". Thanks!

    Read the article

1