起步软件技术论坛-X3

 找回密码
 立即注册
搜索
查看: 251|回复: 4

【搞定】怎样代码取某个已执行过的环节的执行者.[请求]**

[复制链接]
发表于 2007-4-30 12:57:55 | 显示全部楼层 |阅读模式
如题
回复

使用道具 举报

发表于 2007-4-30 15:16:24 | 显示全部楼层
请问楼主想实现啥业务需求,这样我们好结合平台给出比较好的方案
回复 支持 反对

使用道具 举报

发表于 2007-5-8 14:29:36 | 显示全部楼层
通过流程代理的流程控制对象TFlowBroker.FlowControl可以得到经过的所有的任务TaskCount
和TaskByIndex

NameSpace: Business.Model.Flow
--------------------------------------------------------------------------------
TFlowControl = class(Business.Model.TBizObject)
protected
  procedure BindFlowConstraintPolicy(ARange: string; AErrorMsg: string);
  procedure BindFlowPolicy;
  procedure BindFlowRangePolicy(ARange: string);
  procedure BindProcDataPolicy(AProcDataPolicyUnit: TProcDataPolicyUnit);
  procedure BindProcDataPolicyAndFlowPolicy;
  procedure BindProcDataPolicyAndRPDFPolicy;
  procedure BindRepeatProcessDataFilterPolicy;
  procedure BindTaskPolicy;
  function BuildFlowRange(AFlowField: string; Value: TObject): string; overload;
  function BuildFlowRange(AFlowField: Business.Model.TBizURL; Value: TObject): string; overload;
  function BuildFlowRange(AFlowField: Business.Model.TBizURL; ADataType: Business.Model.TDataType; Value: TObject): string; overload;
  procedure ContextProvideParams(ContextNeed: Boolean; ContextIsolationLevel: string); override;
  function CreateSememicDataPolicy: Business.Model.TSememicDataPolicy;
  procedure DataSetApplyUpdates(ABizDataSet: Business.Model.TBizDataSet);
  procedure DoAfterFlowCommand(ACommand: TFlowActionCommand);
  function DoBeforeFlowCommand(ACommand: TFlowActionCommand): Boolean;
  function DoBroadcastFlowCommandMessage(ACommand: TFlowCommand; AClass: TFlowCommandMessageClass): Boolean; overload;
  function DoBroadcastFlowCommandMessage(AMessage: TFlowCommandMessage): Boolean; overload;
  function DoBroadcastPrepareFlowCommandMessage(ACommand: TFlowCommand; AClass: TPrepareFlowCommandMessageClass): Boolean; overload;
  function DoBroadcastPrepareFlowCommandMessage(AMessage: TPrepareFlowCommandMessage): Boolean; overload;
  procedure DoCalcConditionProcRule(ACommand: TCalcConditionProcRuleCommand);
  procedure DoCalcExpr(ACommand: TCalcExprCommand);
  procedure DoCalcProcCondition(ACommand: TCalcProcConditionCommand);
  procedure DoCreateFlowTasks(ACommand: TFlowTaskCommand);
  procedure DoCreateGroupTask(ACommand: TCreateGroupTaskCommand); overload;
  procedure DoCreateMergeFlow(ACommand: TFlowRunnerCommand; AMergeFlow: TFlow);
  procedure DoCreateSubFlow(ACommand: TCreateSubFlowCommand);
  function DoGetFieldValueBySememicURL(ASememicURL: Business.Model.TBizURL; AExceptionWnenNotFindFields: Boolean): TObject;
  function DoGetFlows(AFromCommand: TFlowCommand; ASource: Business.System.TList; ASelected: Business.System.TList): Boolean;
  function DoGetTasks(AFromCommand: TFlowCommand; ASource: Business.System.TList; ASelected: Business.System.TList): Boolean;
  procedure DoInitialization(ATasks: Business.System.TList);
  function DoInternalExecuteFlowActionCommand(ACommand: TFlowActionCommand): Boolean;
  function DoInternalExecuteTaskActionCommand(ACommand: TFlowActionCommand): Boolean;
  function FindFieldValueBySememicURL(ASememicURL: Business.Model.TBizURL): string;
  procedure FinishFlowByFlowOut(ACommand: TFlowRunnerCommand);
  procedure FinishFlowByTaskAbort(ACommand: TFlowRunnerCommand);
  procedure FuncTerminate;
  procedure FuncTerminated;
  function FuncTerminateQuery: Boolean;
  function GetBizObjectFromBizSystem(AURL: string): Business.Model.TBizObject;
  function GetBizObjectFromContext(AURL: string): Business.Model.TBizObject;
  function GetCurrentBizDataFlowRange: string;
  procedure GetFieldsBySememicURL(ASememicURL: Business.Model.TBizURL; AFields: Business.System.TStringList);
  function GetFieldValueBySememicURL(ASememicURL: Business.Model.TBizURL): string;
  function GetFlowFieldDataType(AFlowField: Business.Model.TBizURL): Business.Model.TDataType;
  function GetFlowRange(AFlow: TFlow): string; overload;
  function GetFlowRange(AFlowField: Business.Model.TBizURL; AFlow: TFlow): string; overload;
  procedure GetFlowValue(AFlowValue: TFlowValue);
  function GetNeedProcessFlowRunner(ACommand: TFlowRunnerCommand): Boolean;
  function GetNeedProcessFlowRunnerByFlow(ACommand: TFlowRunnerCommand): Boolean;
  function GetNeedProcessFlowRunnerByTask(ACommand: TFlowRunnerCommand): Boolean;
  function GetProcByFlow(AFlow: TFlow): TProc;
  function GetProcByURL(AURL: string): TProc;
  function GetTaskCanProcess(ATask: TTask): Boolean;
  function GetTaskRange(ATask: TTask): string;
  function InternalExecuteFlowActionCommand(ACommand: TFlowActionCommand): Boolean; overload;
  function InternalExecuteFlowActionCommand(AFromCommand: TFlowRunnerCommand; ACommand: TFlowActionCommand): Boolean; overload;
  function InternalExecuteFlowActionCommandByFlows(ACommand: TFlowActionCommand; AFlows: Business.System.TList): Boolean;
  function InternalExecuteFlowActionCommandByTasks(ACommand: TFlowActionCommand; ATasks: Business.System.TList): Boolean;
  function InternalFlowAbort(ACommand: TFlowAbortCommand): Boolean;
  function InternalFlowArchive(ACommand: TFlowRunnerCommand): Boolean; overload;
  function InternalFlowArchive(ACommand: TFlowArchiveCommand): Boolean; overload;
  function InternalFlowBack(ACommand: TFlowBackCommand): Boolean;
  function InternalFlowFinish(ACommand: TFlowFinishCommand): Boolean; overload;
  function InternalFlowFinish(ACommand: TFlowRunnerCommand): Boolean; overload;
  function InternalFlowNotify(ACommand: TFlowRunnerCommand): Boolean; overload;
  function InternalFlowNotify(ACommand: TFlowNotifyCommand): Boolean; overload;
  function InternalFlowOut(ACommand: TFlowOutCommand): Boolean;
  function InternalFlowTransmit(ACommand: TFlowTransmitCommand): Boolean;
  function InternalStartupFlow(ACommand: TFlowStartupCommand): Boolean; overload;
  function InternalStartupFlow(ACommand: TFlowRunnerCommand): Boolean; overload;
  function InternalTaskAbort(ACommand: TTaskAbortCommand): Boolean;
  function InternalTaskCoop(ACommand: TTaskCoopCommand): Boolean;
  function InternalTaskPreempt(ACommand: TTaskPreemptCommand): Boolean;
  function InternalTaskPreemptEx(AModes: TTaskPreemptModes; ACommand: TFlowRunnerCommand): Boolean;
  procedure Notification(AComponent: Business.System.TComponent; Operation: Business.System.TOperation); override;
  procedure PrepareCompoundFlowRunner(ACommand: TFlowRunnerCommand);
  procedure PrepareCompoundFlowRunnerByStartupFlow(ACommand: TFlowRunnerCommand);
  procedure PrepareFlowBizDataContext(AFlow: TFlow);
  procedure RegisterFlowRunnerByFlow(AFlowRunner: TCompoundFlowRunner; AFlow: TFlow);
  procedure RegisterFlowRunnerByFlows(AFlowRunner: TCompoundFlowRunner; AFlows: Business.System.TList);
  procedure RegisterFlowRunnerByTask(AFlowRunner: TCompoundFlowRunner; ATask: TTask);
  procedure RegisterFlowRunnerByTasks(AFlowRunner: TCompoundFlowRunner; ATasks: Business.System.TList);
  procedure ResetFlowPolicy;
  procedure ResumeFlowBizDataContext;
  procedure StartupFlowByFlowOut(ACommand: TFlowRunnerCommand);
  property CurrentFlowStartupRule: TFlowStartupRule; readonly;
  property CurrentProcActivity: TProcActivity; readonly;
  property InternalCompoundFlowRunner: TCompoundFlowRunner; readonly;
  property InternalSingleFlowRunner: TSingleFlowRunner; readonly;
public
  constructor create(AContext: Business.Model.TContext);
  function CanAbortFlow: Boolean;
  function CanAbortTask: Boolean;
  function CanFlowBack: Boolean;
  function CanFlowOut: Boolean;
  function CanFlowTransmit: Boolean;
  function CanMultiStartupFlow: Boolean;
  function CanStartupFlow: Boolean;
  procedure Destroy; override;
  procedure ExecuteFlow(AProcURL: Business.Model.TBizURL; AEntryUnitID: string; AExecutor: Business.Model.Org.TOrgURL);
  procedure ExecuteTask(AList: Business.System.TList; AExecutor: Business.Model.Org.TOrgURL); overload;
  procedure ExecuteTask(AFlow: TFlow; ATask: TTask; AExecutor: Business.Model.Org.TOrgURL); overload;
  procedure ExecuteTask(ATask: TTask; AExecutor: Business.Model.Org.TOrgURL); overload;
  function FindFlowByGUID(AGUID: string): TFlow;
  function FindFlowRunnerByFlow(AFlow: TFlow): TSingleFlowRunner;
  function FindFlowRunnerByTask(ATask: TTask): TSingleFlowRunner;
  function FindTaskByFlowGUID(AFlowGUID: string): TTask;
  function FindTaskByGUID(AGUID: string): TTask;
  function FlowAbort(AFlows: Business.System.TList): Boolean;
  function FlowArchive(AFlows: Business.System.TList): Boolean;
  function FlowBack(ATasks: Business.System.TList): Boolean;
  function FlowFinish(AFlows: Business.System.TList): Boolean;
  function FlowOut(ATasks: Business.System.TList): Boolean;
  function FlowStartuped: Boolean;
  function FlowTransmit(ATasks: Business.System.TList): Boolean;
  function GetExecuteRule(AProcUnit: TProcUnit): TExecuteRule;
  function GetFlowBackRule(AProcUnit: TProcUnit): TFlowBackRule;
  function GetFlowByGUID(AGUID: string): TFlow;
  function GetFlowByIDs(AIDs: Business.System.TStrings; AllMatch: Boolean; AList: Business.System.TList): Boolean;
  function GetFlowOutRule(AProcUnit: TProcUnit): TFlowOutRule;
  function GetFlowRunnerByFlow(AFlow: TFlow): TSingleFlowRunner;
  function GetFlowRunnerByTask(ATask: TTask): TSingleFlowRunner;
  function GetFlowStartUpRule(AProcUnit: TProcUnit): TFlowStartupRule;
  function GetFlowTransmitRule(AProcUnit: TProcUnit): TFlowTransmitRule;
  function GetNotifyRule(AProcUnit: TProcUnit; ANotifyMode: TNotifyMode): TNotifyRule;
  function GetTaskByFlowGUID(AFlowGUID: string): TTask;
  function GetTaskByGUID(AGUID: string): TTask;
  procedure GetTasksByFlowGUID(AFlowGUID: string; AList: Business.System.TList);
  function GetUnProcessFlows(AFlows: Business.System.TList): Boolean;
  function GetUnProcessTasks(ATasks: Business.System.TList): Boolean;
  function InGroupTask: Boolean;
  procedure InitializationByTask(AList: Business.System.TList); overload;
  procedure InitializationByTask(ATask: TTask); overload;
  procedure PreemptTask(AModes: TTaskPreemptModes; ATasks: Business.System.TList);
  function RegisterANewFlow: TSingleFlowRunner;
  procedure RegisterFlow(AFlow: TFlow; ATask: TTask);
  procedure RegisterFlowBroker(AFlowBroker: TBaseFlowBroker);
  function StartupFlow(AProcURL: Business.Model.TBizURL; AEntryUnitID: string; AExecutor: Business.Model.Org.TOrgURL; AFlowValue: TFlowValue): Boolean; overload;
  function StartupFlow(AFlowValue: TFlowValue): Boolean; overload;
  function TaskAbort(ATasks: Business.System.TList): Boolean;
  procedure UnRegisterFlow(AFlow: TFlow; ATask: TTask);
  procedure UnRegisterFlowBroker(AFlowBroker: TBaseFlowBroker);
  property CurrentProcUnit: TProcUnit;
  property CurrentTask: TTask;
  property Enabled: Boolean;
  property Executor: Business.Model.Org.TOrgURL;
  property Flow: TFlow;
  property FlowBackUnitGraph: TFlowBackUnitGraph;
  property FlowBrokerByIndex[Longint]: TFlowBroker;
  property FlowBrokerCount: Longint;
  property FlowByIndex[Longint]: TFlow;
  property FlowCount: Longint;
  property FlowManager: TFlowManager;
  property FlowOutUnitGraph: TFlowOutUnitGraph;
  property FlowRunnerByIndex[Longint]: TSingleFlowRunner;
  property FlowRunnerCount: Longint;
  property FlowTransmitUnitGraph: TFlowTransmitUnitGraph;
  property Func: Business.Model.TFunc;
  property IgnoreDataSetApplyUpdates: Boolean;
  property Proc: TProc;
  property TaskByIndex[Longint]: TTask;
  property TaskCount: Longint;

  property Transaction: Business.Data.TTransaction;
end;
回复 支持 反对

使用道具 举报

发表于 2007-5-10 08:57:04 | 显示全部楼层
楼主,问题搞定没有?
回复 支持 反对

使用道具 举报

发表于 2007-9-19 09:20:25 | 显示全部楼层
由于楼主长时间未跟贴,此帖先结,有问题请开新帖.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Justep Inc.

GMT+8, 2025-6-27 22:20 , Processed in 0.037220 second(s), 15 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表