0

我用书签做这个工作流程

namespace wwwfff
{

    public sealed class CodeActivity3 : NativeActivity
    {
        public InArgument<string> EventName1

        { get; set; }



        public OutArgument<string> Data1

        { get; set; }



        protected override void Execute(NativeActivityContext context)
        {

            context.CreateBookmark(EventName1.Get(context), new BookmarkCallback(HandleEvent));
            Console.WriteLine("Pppppppppppp");
        }



        private void HandleEvent(NativeActivityContext context, Bookmark bookmark, object obj)
        {

            if (obj != null)
            {

                Data1.Set(context, obj.ToString());

            }

        }
    }
}

我写在程序中

class Program
    {
        static void Main(string[] args)
        {
            WorkflowApplication wf = new WorkflowApplication(new Workflow1());
            wf.Run();
           wf.ResumeBookmark("C1", "Hello word");

        }
    }

但它没有输入“ppppppp”工作流程只是开始->CodeActivity3->writline() 谢谢

4

1 回答 1

1

您可能需要覆盖 CodeActivity3 类中的属性

protected override bool CanInduceIdle { get { return true; } }
于 2012-05-23T19:46:00.370 回答