不用远程了吧?
就这样的一个流程和这样的代码,获取后续环节的代码也可以参考29楼的链接。
我把我的完整代码贴出来你看下。
procedure TMainForm.FlowBroker1AfterFlowOut(Sender: TObject; Command: TFlowOutCommand);
var
i,j : Integer;
mFlowTask:TFlowTask;
begin
for i := 0 to Command.FlowControl.CurrentProcUnit.SuccedentUnitCount - 1 do
begin
if Command.FlowControl.CurrentProcUnit.SuccedentUnits.ID = 'OR' then
begin
for j := 0 to Command.FlowControl.CurrentProcUnit.SuccedentUnits.SuccedentUnitCount - 1 do
begin
mFlowTask := Command.FlowTasks.FindFlowTask(
Command.FlowControl.CurrentProcUnit.SuccedentUnits.SuccedentUnits[j].ID);//根据环节找任务
if mFlowTask <> nil then
Dialogs.ShowMessage('选择了:'+Command.FlowControl.CurrentProcUnit.SuccedentUnits.SuccedentUnits[j].DisplayName);
end;
end
else
begin
mFlowTask := Command.FlowTasks.FindFlowTask(
Command.FlowControl.CurrentProcUnit.SuccedentUnits.ID);//根据环节找任务
if mFlowTask <> nil then
Dialogs.ShowMessage('选择了:'+Command.FlowControl.CurrentProcUnit.SuccedentUnits.DisplayName);
end;
end;