我正在建立一个基本的工作流程,将支持大约25个客户所有的客户,他们匹配一个基本的工作流程,每个人都有一点不同的要求,假设一个客户想发送电子邮件,而另一个不想发送电子邮件,这是我想做的
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 所以我需要什么??我想知道这是我在这种情况下必须使用的唯一方法,还是我错过了另一种技术
发布于 2013-06-03 22:15:32
一种方法是将您的工作流程分解为较小的部分,每个部分做一件特定的事情。您可以像下面这样组织布局,以便能够支持入站请求的多种变体。
Customer1-Activity.xaml
- Common-Activity1.xaml
- Common-Activity2.xaml
Customer2-Activity.xaml
- Common-Activity1.xaml
- Common-Activity2.xaml对于任何新客户,您只需要创建一个根XAML活动,每个活动都对传入的请求参数进行了细微的更改。
选项#2:将字典传递给您的活动
我想到了一个更好的想法,你可以让你的工作流有一个Dictionary<string, object>类型作为输入参数。字典可以包含提供给您的工作流的参数/参数集。然后,您的工作流程可以查询参数集,以使用该信息进行自身初始化。
https://stackoverflow.com/questions/16798874
复制相似问题