将输入值传递给子活动 [英] Passing input value to child activity

查看:68
本文介绍了将输入值传递给子活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个自定义活动,该活动从数据库中检索配置值.该活动是轮到的,它调用几种不同的自定义活动之一来验证所获取的价值.我希望父活动将这个值私下传递给子活动-也就是说,当子活动放到设计器的父活动中时,我希望连接自动发生,而我不希望连接可见"通过设计器用户界面.


查克·伯格|咨询工程师|公司IT-Station Casinos,Inc.

I am writing a Custom Activity that retreives a configuration value from a database.  This Activity is turn, calls one of several different Custom Activities to validate the value retreived.  I would like the Parent Activity to pass this value to the Child Activity privately - that is, I want the connection to happen automatically when the Child Activity is dropped onto the Parent Activity in the designer, and I don't want the connection "visible" through the designer UI.  Is this possible and if so, how?


Chuck Berg | Consulting Engineer | Corporate IT - Station Casinos, Inc.

推荐答案

是您自己创建的父级活动吗?
如果不是,则可以使用父级活动的modelchange事件,当新的子活动放到父活动中时,会发生modelchange,请检查是否要将值添加到该子活动中.如果是,则可以将属性值添加到子活动中以保存此输入值.现在您的子活动可以获取此值.

如果它是您自己创建的父活动,则可以使用父活动的OnDropped事件来执行与在modelchange事件中相同的操作.

对于这两种解决方案,您都需要向您的子活动添加propertyChange事件.从父级收到此值时,请自动验证该值.
is the parent activity created by yourself?
if not, you can use modelchange event of your parent activity, when new child activity dropped into the parent activity, the modelchange happens, check whether you want to put the value to this dropped-in child activity. if yes, you can add a property value to the child activity to save this input value. now your child activity can get this value.

if it's a parent activity created by yourself, you can use OnDropped event of your parent activity to do the same thing as you did in modelchange event.

for both solutions, you need to add propertyChange event to your child activity. when receive this value from parent, validate the value automatically.


这篇关于将输入值传递给子活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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