我使用书签
执行此工作流程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()
开始
感谢
答案 0 :(得分:1)
您可能需要覆盖CodeActivity3类
中的属性protected override bool CanInduceIdle { get { return true; } }