如何设置活动代表的所有者字段. [英] How do I set the owner field for an activity delegate.

查看:81
本文介绍了如何设置活动代表的所有者字段.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下书签处理程序代码.但是最后一行继续执行:
ActivityDelegate'ActivityFunc`1'应该指定了所有者工作流程元素.

我如何为此委托设置所有者.

私有

I have the following bookmark handler code. But the last line keeps throughing an execption:
ActivityDelegate 'ActivityFunc`1' should have an owner workflow element specified.

How do I set the owner for this delegate.

private

void onStart( NativeActivityContext 上下文, 对象native _

void onStart(NativeActivityContext context, Bookmark bookmark, object native_activity) {

 

ActivityFunc

  ActivityFunc

< 令牌 > sevfunc = ActivityFunc < BpmnEvent )native_activity;
ActivityInstance
child = context.ScheduleFunc< 令牌 >(sevfunc, .on_childcompleted, this .on_childfaulted);

<Token> sevfunc = new ActivityFunc<Token>();
  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


这篇关于如何设置活动代表的所有者字段.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆