如何设置活动代表的所有者字段. [英] How do I set the owner field for an activity delegate.
问题描述
我有以下书签处理程序代码.但是最后一行继续执行:
I have the following bookmark handler code. But the last line keeps throughing an execption: void void onStart(NativeActivityContext context, Bookmark bookmark, object native_activity) {
ActivityFunc ActivityFunc < 令牌 <Token> sevfunc = new ActivityFunc<Token>(); 这篇关于如何设置活动代表的所有者字段.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
ActivityDelegate'ActivityFunc`1'应该指定了所有者工作流程元素.
我如何为此委托设置所有者.
私有
ActivityDelegate 'ActivityFunc`1' should have an owner workflow element specified.
How do I set the owner for this delegate.
private
ActivityInstance child = context.ScheduleFunc< 令牌 >(sevfunc, .on_childcompleted, this .on_childfaulted);
sevfunc.Handler = (BpmnEvent)native_activity;
ActivityInstance child = context.ScheduleFunc<Token>(sevfunc, this.on_childcompleted, this.on_childfaulted); 推荐答案
您需要在CacheMetadata中注册ActivityFunc.与其在书签处理程序中创建它,不如在类范围内创建它,并使用元数据在CacheMetadata中注册.AddDelegate-(sevFunc应该是您的活动类的成员)
Leon Welicki
WF项目经理You need to register the ActivityFunc in the CacheMetadata. Instead of creating it in your bookmark handler you should create it with class scope and register it in CacheMetadata using metadata.AddDelegate - (sevFunc should be a member of your activity class)
Leon Welicki
Program Manager, WF