0

我正在构建一个基本工作流程,将支持大约 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 

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

4

1 回答 1

0

一种方法是将您的工作流程分解为更小的部分,每个部分执行特定的操作。您可以组织如下布局,以支持入站请求的多种变体。

Customer1-Activity.xaml
 - Common-Activity1.xaml
 - Common-Activity2.xaml

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

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

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

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

于 2013-06-03T14:15:32.497 回答