1、在 业务模型\系统空间\简洁风格\界面库\窗体库\标准风格主窗体
procedure TSTANDARDSTYLEMAINFORM.actFlowAbortTask11Update(Sender: TObject);
var
b: Boolean;
begin
b := True;
try
b := ObjectHelper.ToBoolean(ObjectHelper.CallMethod(CurrentFunc.MainForm, 'CanFlowAbortTask', []));
except
end;
actFlowAbortTask.Enabled := (CurrentFlowControl <> nil) and
(CurrentFlowControl.CanAbortTask) and b;
end;
3、在流程的功能环节上放FolwBroker控件
定义方法:
function TMainForm.CanFlowAbortTask: Boolean;
begin
Result := TExecuteRule(TProcActivity(FlowBroker1.FlowControl.CurrentProcUnit).ExecuteRules.Items[0]).CanAbort;
end;