首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >工作流支持多场景

工作流支持多场景
EN

Stack Overflow用户
提问于 2013-05-29 02:23:45
回答 1查看 53关注 0票数 0

我正在建立一个基本的工作流程,将支持大约25个客户所有的客户,他们匹配一个基本的工作流程,每个人都有一点不同的要求,假设一个客户想发送电子邮件,而另一个不想发送电子邮件,这是我想做的

代码语言:javascript
复制
  1- make one workflow and in the different requirement I will make switch to check who is   
   the user then switch each user to his requirements 
    (Advantages)this way powerful in maintenance and if there is any common requirements 
                easy to add   
    (Disadvantages) if The customer number increase and be like 100 and each is different 
                  and we expect to have 100 user using the workflow but with the Different 
                  little requirements 
  2- make Differnt workflow for each customer which meaning I will have a 100 workflow 
     in the future and in declaration instantiate the object from the specific workflow 
     which related to the Current user
     (Advantages) each workflow is separate 
     (Disadvantages) - hard to add simple feature this meaning write the same thing 100   
                       time so this is not Professional 

所以我需要什么??我想知道这是我在这种情况下必须使用的唯一方法,还是我错过了另一种技术

EN

回答 1

Stack Overflow用户

发布于 2013-06-03 22:15:32

一种方法是将您的工作流程分解为较小的部分,每个部分做一件特定的事情。您可以像下面这样组织布局,以便能够支持入站请求的多种变体。

代码语言:javascript
复制
Customer1-Activity.xaml
 - Common-Activity1.xaml
 - Common-Activity2.xaml

Customer2-Activity.xaml   
 - Common-Activity1.xaml
 - Common-Activity2.xaml

对于任何新客户,您只需要创建一个根XAML活动,每个活动都对传入的请求参数进行了细微的更改。

选项#2:将字典传递给您的活动

我想到了一个更好的想法,你可以让你的工作流有一个Dictionary<string, object>类型作为输入参数。字典可以包含提供给您的工作流的参数/参数集。然后,您的工作流程可以查询参数集,以使用该信息进行自身初始化。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16798874

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档