procedure TMainForm.FlowDDSHCreateFlowOutFlowTasks(…);
var
lFlowTask: TFlowTask;
begin
//通过流程定义中功能环节的ID查找任务
lFlowTask := Command.FlowTasks.FindFlowTask('DDSP');
if lFlowTask=nil then
lFlowTask := Command.FlowTasks.FindFlowTask('DDLR');
if lFlowTask=nil then
lFlowTask := Command.FlowTasks.FindFlowTask('DDTZ');
if lFlowTask<>nil then
lFlowTask.AllowExecutorInOrgURLs.Add('ZJLBGS', '', ''); //限制执行者范围在销售部下
end;