procedure TZLGLXX_info.UserStartFlow(ADept,ARole,APerson,AFlowUrl,AStartProc,AFlowID,ASubject,ADescription:string);
var
lBizURL:TBizURL;
lFlowValue:TFlowValue;
lFlowControl:TFlowControl;
lExecutor:Org.TOrgURL;
begin
lBizURL := TBizURL.Create;
lFlowValue := TFlowValue.Create;
lFlowControl := TFlowControl.Create(Self.Context);
lExecutor := Org.TOrgURL.Create(ADept, ARole, APerson);
lBizURL.URL := AFlowUrl;
try
lFlowValue.IDs.Add(AFlowID); //流程ID
lFlowValue.Subject := ASubject; //流程主题
lFlowValue.Description := ADescription; //流程描述
//启动流程实例
lFlowControl.StartupFlow(lBizURL, AStartProc, lExecutor, lFlowValue);
//流程实例数据保存到数据库
lFlowControl.FlowRunnerbyIndex[0].CurrentTask.SaveToDB;
finally
lFlowControl.Free;
lFlowValue.Free;
lBizURL.Free;
end;
end;
1楼启动流程调的是这个方法。我到那里去找流程事务 ?谢谢! |