elia
elia

Reputation: 1

windows workflow bookmark

I do this workflow with bookmark

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());

            }

        }
    }
}

and i write in program

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

        }
    }

but it doesn't type "ppppppp" the workflow is only start ->CodeActivity3->writline() thanks

Upvotes: 0

Views: 213

Answers (1)

tykovec
tykovec

Reputation: 372

you need probably override property in CodeActivity3 class

protected override bool CanInduceIdle { get { return true; } }

Upvotes: 1

Related Questions