|
楼主 |
发表于 2007-6-14 09:27:26
|
显示全部楼层
procedure TSHOWFORM.StartFlow(ProcFunc: String);
var
lBizURL: TBizURL;
lFlowValue: TFlowValue;
lFlowControl: TFlowControl;
lExecutor: TOrgURL;
lList: TList;
cPersonID: string; //当前操作者ID
cPositionMemberID: string; //当前操作者岗位ID
cDeptID: string; //当前操作者部门ID
lContextCurrent: Business.Model.TContextCurrent;
begin
lContextCurrent := Business.Model.TContextCurrent.Create(Self.Context);
cPersonID := lContextCurrent.Operator.ID;
cPositionMemberID := lContextCurrent.PositionMember.ID;
cDeptID := lContextCurrent.Dept.ID;
lContextCurrent.Free;
lList := TList.Create;
lBizURL := TBizURL.Create;
lFlowValue := TFlowValue.Create;
lFlowControl := TFlowControl.Create(Self.Context);
try
lBizURL.URL := 'Biz:\SJZPXZXXTGLXXXT\PROC\JSFASHGL.Proc'; //流程路径
lFlowValue.IDs.Add(Business.System.JSCommon.CreateGUIDStr); //流程ID
lFlowValue.Subject := FuncBroker1.Func.DisplayName; //流程主题
lFlowValue.Description := ''; //流程描述
//lExecutor := TOrgURL.Create(cDeptID, cPositionMemberID, cPersonID); //传入发起者的部门、岗位、人员
lFlowValue.StartupTo := lExecutor;
lFlowControl.StartupFlow(lBizURL, ProcFunc, lExecutor, lFlowValue);
finally
lFlowControl.Free;
lFlowValue.Free;
lBizURL.Free;
lList.Free;
lExecutor.Free;
end;
end;
procedure TSHOWFORM.SB1_OKClick(Sender: TObject); //确定
var
ProcFunc: String; //当前流程名称ID
begin
StartFlow(ProcFunc);
end;
请帮我看一下 |
|