来结果了,
这样,你换一中写法,参考如下,就是取消任务的抢占等等模式,看看是否能实现你的需求,参考如下:
var
lBizURL: TBizURL;
lFlowValue: TFlowValue;
lFlowControl: TFlowControl;
lExecutor: TOrgURL;
lList: TList;
begin
lList := TList.Create;
lBizURL := TBizURL.Create;
lFlowValue := TFlowValue.Create;
lFlowControl := TFlowControl.Create(Self.Context);
lExecutor := TOrgURL.Create('BM1', 'BZ','RY1');
try
lBizURL.URL := 'Biz:\OPERATION\CRMSPACE\YWLC2_21.Proc';
lFlowValue.IDs.Add('4');
lFlowValue.Subject := 'test4';
lFlowValue.Description := 'test4'; //ADescription;
lExecutor := TOrgURL.Create('BM1', 'BZ','RY1'); //传入发起者的部门、岗位、人员
lFlowValue.StartupTo := lExecutor;
lFlowControl.StartupFlow(lBizURL, 'YWGN3', lExecutor, lFlowValue);
finally
lFlowControl.Free;
lFlowValue.Free;
lBizURL.Free;
lList.Free;
lExecutor .Free;
end;
end |