我在一个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, 但不起作用。有什么想法吗?
发布于 2012-04-24 21:22:22
您可以将接收活动和流程图添加为序列活动的子活动
Body = new Sequence()
{
Activities = {
reserveSeat,
flowchar
}
}https://stackoverflow.com/questions/10297830
复制相似问题