0

我正在开发一个 asp .net 项目,我根据用户的一些选择开发了一个工作流服务。当用户遵循适当的步骤时,它会生成一个流程图。将此流程图添加到工作流服务主体的末尾,并带有以下代码。

          Flowchart flowchart = new Flowchart();
          flowchart = (Code to fill the flowchart)...

            Receive reserveSeat = new Receive();

            WorkflowService service = new WorkflowService()
        {

            Body = flowchart,
            Endpoints ={
            new Endpoint
            {
            ServiceContractName="IService",
            AddressUri = new Uri("http://localhost:2757"),
            Binding = new BasicHttpBinding(),
            }

            }
        };

有没有办法在上面的代码中在正文中添加一个接收活动而不触及流程图?我试过

Body = reserveSeat + flowchar, 

但不工作。有任何想法吗?

4

1 回答 1

2

您可以将 Receive 活动和流程图添加为 Sequence 活动的子活动

Body = new Sequence()
{
  Activities = {
   reserveSeat,
   flowchar
  }
}
于 2012-04-24T13:22:22.447 回答