起步软件技术论坛-X3

 找回密码
 立即注册
搜索
楼主: Coordinator

在ShowModal的窗体里如何走流程**

[复制链接]
发表于 2007-6-13 11:25:26 | 显示全部楼层
18楼有错误,showmodal的窗体可以流转和回退的
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-6-13 15:49:07 | 显示全部楼层
恩 那个问题解决了
可是还有问题 那段代码是启动流程 我双击待办任务还是执行的启动流程阿 无法继续往下走啊
回复 支持 反对

使用道具 举报

发表于 2007-6-13 16:23:48 | 显示全部楼层
22楼,我糊涂了
19楼问题到底是解决了还是没有呢?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-6-13 16:43:35 | 显示全部楼层
不好意思啊 19楼问题解决了

可是还有一些新的问题
1,流程结束了 那个代码
lFlowControl.StartupFlow(lBizURL, ProcFunc, lExecutor, lFlowValue);
中的 “ProcFunc”应该赋什么值
2,在待办任务里的任务是递增的 不像别的流程那样新的任务替换原来的任务
回复 支持 反对

使用道具 举报

发表于 2007-6-13 16:53:41 | 显示全部楼层
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-6-13 16:55:05 | 显示全部楼层
1,流程结束了 那个代码
lFlowControl.StartupFlow(lBizURL, ProcFunc, lExecutor, lFlowValue);
中的 “ProcFunc”应该赋什么值
这里是流程环节的ID
回复 支持 反对

使用道具 举报

发表于 2007-6-13 16:55:32 | 显示全部楼层
2,在待办任务里的任务是递增的 不像别的流程那样新的任务替换原来的任务
没有理解
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-6-13 17:20:40 | 显示全部楼层
lFlowControl.StartupFlow(lBizURL, ProcFunc, lExecutor, lFlowValue);
中的 “ProcFunc”应该赋什么值
在不是最后一步的时候 赋的 FlowBroker1.FlowControl.CurrentProcUnit.SuccedentUnits[0].ID 是下一流程的id
在最后一步的时候也用这个嘛?
回复 支持 反对

使用道具 举报

发表于 2007-6-13 18:27:00 | 显示全部楼层
难道你每一个环节都是用Startupflow来“流转”的?
回复 支持 反对

使用道具 举报

发表于 2007-6-13 18:28:26 | 显示全部楼层
流转,请使用flowout,不要用StartupFlow
startupflow是启动一个新的流程实例,不是流转当前流程实例,我在15楼就说过了
回复 支持 反对

使用道具 举报

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

本版积分规则

小黑屋|手机版|Justep Inc.

GMT+8, 2025-1-13 15:43 , Processed in 0.040692 second(s), 13 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

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