var
lFlow: TFlow;
lGUID, lFlowGuid: String;
begin
if dsbInfile.DataSet.IsEmpty then
begin
jsDialogs.ShowWarning('请选择数据记录!','注意');
Exit;
end;
lGuid := dsbInfile.DataSet.FieldByName('F_FLOWID').AsString; //业务数据中的流程ID
if lGuid <> '' then
begin
QFlowID.Close;
QFlowID.CommandText := 'select FFLOWGUID from TFLOWID where FID='''//流程对照ID
+ lGuid + '''';
QFlowID.Open;
lFlowGuid := QFlowID.FieldByName('FFLOWGUID').AsString;
if lFlowGuid <> '' then
begin
lFlow := TFlow.Create;
Flow.FlowEngine.LoadFlow(lFlowGuid, lFlow);//加载流程数据
if lFlow <> nil then
TSystemCore.SystemInterface.ShowFlowView(lFlow);//显示
lFlow.Free;
end;
QFlowID.Close;
end
else begin
jsDialogs.ShowWarning('非流程收文!','注意');
end; |