起步软件技术论坛-X3

 找回密码
 立即注册
搜索
查看: 154|回复: 6

流程回退问题**

[复制链接]
发表于 2008-9-9 18:53:53 | 显示全部楼层 |阅读模式
当前环节要回退到上一个环节无法回退,回退的时候选择的还是当前的环节,有些时候是连前驱环节也找不到,这是什么原因呢?

1.jpg

117.11 KB, 下载次数: 98

回复

使用道具 举报

 楼主| 发表于 2008-9-9 18:54:29 | 显示全部楼层
这是当前的环节

2.jpg

81.66 KB, 下载次数: 96

回复 支持 反对

使用道具 举报

发表于 2008-9-10 08:41:50 | 显示全部楼层
1、提供当前这个流程实例的任务表和任务消息表的相关记录
2、提供一下版本号
3、提供这个流程设计环境下的流程图
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-9-10 10:55:55 | 显示全部楼层
版本号为2644版本,下面的是流程设计图

3.jpg

144.69 KB, 下载次数: 90

回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-9-10 10:57:22 | 显示全部楼层
这是回退时候的对业务数据进行修改的代码(流程回退规则没有定义):
procedure TMAINFORM.FlowBrokerBeforeFlowOut(Sender: TObject; Command: TFlowOutCommand);
begin
if DataSetBroker.DataSet.State in [TDataSetState.dsEdit,TDataSetState.dsInsert] then
    DataSetBroker.DataSet.Post;

if FuncBroker.Func.ID=SysUtils.UpperCase('FUNCADSTART') then //施工单位负责人起草
  begin
    if jsDialogs.ConfirmBox('是否启动流程','启动流程提示',1) then
    begin
      if trim(DataSetBroker.DataSet.FieldByName('NO').AsString) = ''  then
      begin
        jsDialogs.ShowMsg('编号为空,不能启动流程','启动流程提示');
        DataSetBroker.DataSet.Cancel;
        Command.Accept:=False;
      end
      else if trim(DataSetBroker.DataSet.FieldByName('content').AsString) = '' then
      begin
        jsDialogs.ShowMsg('内容不能为空!', '提示');
        Command.Accept := False;
        exit;
      end
      else if DataSetBroker.DataSet.FieldByName('content').Text.Length>2100 then
      begin
        jsDialogs.ShowMsg('内容超过1000字,请使用附件', '提示');
        Command.Accept := False;
        exit;
      end
      else if DataSetBroker.DataSet.FieldByName('fee_gage').IsNull then
      begin
        jsDialogs.ShowMsg('请选择费用预估!', '提示');
        Command.Accept := False;
        exit;
      end;
    end
    else
      Command.Accept:=False;
   end
   else if FuncBroker.Func.ID=SysUtils.UpperCase('FUNCADCONSTRUCTWATCHDRAFT') then  //施工监理工程师起草
   begin
     if jsDialogs.ConfirmBox('是否启动流程','启动流程提示',1) then
     begin
        if trim(DataSetBroker.DataSet.FieldByName('construct_montior').AsString) = '' then
        begin
          jsDialogs.ShowMsg('施工监理意见为空,不能启动流程','启动流程提示');
          DataSetBroker.DataSet.Cancel;
          Command.Accept:=False;
        end
        else if DataSetBroker.DataSet.FieldByName('construct_montior').Text.Length>600 then
        begin
          jsDialogs.ShowMsg('施工监理意见超过300字,请使用附件!','启动流程提示');
          DataSetBroker.DataSet.Cancel;
          Command.Accept:=False;
        end ;
     end
     else
      Command.Accept:=False;
   end
   else if FuncBroker.Func.ID=SysUtils.UpperCase('FUNCADDISGNERDRAFT') then  //设计院工程师起草
   begin
     if jsDialogs.ConfirmBox('是否启动流程','启动流程提示',1) then
     begin
        if trim(DataSetBroker.DataSet.FieldByName('xibei').AsString) = '' then
        begin
          jsDialogs.ShowMsg('设计院意见为空,不能启动流程','启动流程提示');
          DataSetBroker.DataSet.Cancel;
          Command.Accept:=False;
        end
        else if DataSetBroker.DataSet.FieldByName('xibei').Text.Length>600 then
        begin
          jsDialogs.ShowMsg('设计院意见超过300字,请使用附件!','启动流程提示');
          DataSetBroker.DataSet.Cancel;
          Command.Accept:=False;
        end;
     end
     else
      Command.Accept:=False;
   end
   else if FuncBroker.Func.ID=SysUtils.UpperCase('FUNCADDESIGNWATCHENGNEERDRAFT') then  //设计监理工程师起草
   begin
     if jsDialogs.ConfirmBox('是否启动流程','启动流程提示',1) then
     begin
        if trim(DataSetBroker.DataSet.FieldByName('design_monitor').AsString) = '' then
        begin
          jsDialogs.ShowMsg('设计监理工程师审核意见为空,不能启动流程','启动流程提示');
          DataSetBroker.DataSet.Cancel;
          Command.Accept:=False;
        end
        else if DataSetBroker.DataSet.FieldByName('design_monitor').Text.Length>600 then
        begin
          jsDialogs.ShowMsg('设计监理工程师审核意见超过300字,请使用附件!','启动流程提示');
          DataSetBroker.DataSet.Cancel;
          Command.Accept:=False;
        end;
     end
     else
      Command.Accept:=False;
   end
   else if FuncBroker.Func.ID=SysUtils.UpperCase('FUNCADPROJECTAPPROVE') then  //工程部专工审核
   begin
     if jsDialogs.ConfirmBox('是否启动流程','启动流程提示',1) then
     begin
        if trim(DataSetBroker.DataSet.FieldByName('engineering').AsString) = '' then
        begin
          jsDialogs.ShowMsg('工程部主管意见为空,不能启动流程','启动流程提示');
          DataSetBroker.DataSet.Cancel;
          Command.Accept:=False;
        end
        else if DataSetBroker.DataSet.FieldByName('engineering').Text.Length>600 then
        begin
          jsDialogs.ShowMsg('工程部主管意见超过300字,请使用附件!','启动流程提示');
          DataSetBroker.DataSet.Cancel;
          Command.Accept:=False;
        end;
     end
     else
      Command.Accept:=False;
   end
   else if FuncBroker.Func.ID=SysUtils.UpperCase('FUNCADPLANAUDITING') then  //计划部专工审核
   begin
     if jsDialogs.ConfirmBox('是否启动流程','启动流程提示',1) then
     begin
        if trim(DataSetBroker.DataSet.FieldByName('plan1').AsString) = '' then
        begin
          jsDialogs.ShowMsg('计划部主管意见为空,不能启动流程','启动流程提示');
          DataSetBroker.DataSet.Cancel;
          Command.Accept:=False;
        end
        else if DataSetBroker.DataSet.FieldByName('plan1').Text.Length>600 then
        begin
          jsDialogs.ShowMsg('计划部主管意见超过300字,请使用附件!','启动流程提示');
          DataSetBroker.DataSet.Cancel;
          Command.Accept:=False;
        end;
     end
     else
      Command.Accept:=False;
   end
   else if FuncBroker.Func.ID=SysUtils.UpperCase('FUNCPLANWATCHCHECK') then  //技经监理审核
   begin
     if jsDialogs.ConfirmBox('是否启动流程','启动流程提示',1) then
     begin
        if trim(DataSetBroker.DataSet.FieldByName('plan1').AsString) = '' then
        begin
          jsDialogs.ShowMsg('技经监理意见为空,不能启动流程','启动流程提示');
          DataSetBroker.DataSet.Cancel;
          Command.Accept:=False;
        end
        else if DataSetBroker.DataSet.FieldByName('plan1').Text.Length>600 then
        begin
          jsDialogs.ShowMsg('技经监理意见超过300字,请使用附件!','启动流程提示');
          DataSetBroker.DataSet.Cancel;
          Command.Accept:=False;
        end;
     end
     else
      Command.Accept:=False;
   end
   else if FuncBroker.Func.ID=SysUtils.UpperCase('FUNCADPROJECTCHECK') then  //工程部负责人审批
   begin
     if jsDialogs.ConfirmBox('是否启动流程','启动流程提示',1) then
     begin
        if trim(DataSetBroker.DataSet.FieldByName('engineering_mgr').AsString) = '' then
        begin
          jsDialogs.ShowMsg('工程部意见为空,不能启动流程','启动流程提示');
          DataSetBroker.DataSet.Cancel;
          Command.Accept:=False;
        end
        else if DataSetBroker.DataSet.FieldByName('engineering_mgr').Text.Length>600 then
        begin
          jsDialogs.ShowMsg('工程部意见超过300字,请使用附件!','启动流程提示');
          DataSetBroker.DataSet.Cancel;
          Command.Accept:=False;
        end;
     end
     else
      Command.Accept:=False;
   end
   else if FuncBroker.Func.ID=SysUtils.UpperCase('FUNCADPLANAPPROVE') then  //计划部负责人审批
   begin
     if jsDialogs.ConfirmBox('是否启动流程','启动流程提示',1) then
     begin
        if trim(DataSetBroker.DataSet.FieldByName('plan_mgr').AsString) = '' then
        begin
          jsDialogs.ShowMsg('计划部意见为空,不能启动流程','启动流程提示');
          DataSetBroker.DataSet.Cancel;
          Command.Accept:=False;
        end
        else if DataSetBroker.DataSet.FieldByName('plan_mgr').Text.Length>600 then
        begin
          jsDialogs.ShowMsg('计划部意见超过300字,请使用附件!','启动流程提示');
          DataSetBroker.DataSet.Cancel;
          Command.Accept:=False;
        end;
     end
     else
      Command.Accept:=False;
   end
   else if FuncBroker.Func.ID=SysUtils.UpperCase('FUNCADPROJECTLEADERAPPROVE') then  //工程分管领导审批
   begin
     if jsDialogs.ConfirmBox('是否启动流程','启动流程提示',1) then
     begin
        if trim(DataSetBroker.DataSet.FieldByName('project_leader_opinion').AsString) = '' then
        begin
          jsDialogs.ShowMsg('工程分管领导意见为空,不能启动流程','启动流程提示');
          DataSetBroker.DataSet.Cancel;
          Command.Accept:=False;
        end
        else if DataSetBroker.DataSet.FieldByName('project_leader_opinion').Text.Length>100 then
        begin
          jsDialogs.ShowMsg('工程分管领导意见超过50字,请使用附件!','启动流程提示');
          DataSetBroker.DataSet.Cancel;
          Command.Accept:=False;
        end;
     end
     else
      Command.Accept:=False;
   end
   else if FuncBroker.Func.ID=SysUtils.UpperCase('FUNCADPLANLEADERAPPROVE') then  //计划分管领导审批
   begin
     if jsDialogs.ConfirmBox('是否启动流程','启动流程提示',1) then
     begin
        if trim(DataSetBroker.DataSet.FieldByName('plan_leader_opinion').AsString) = '' then
        begin
          jsDialogs.ShowMsg('计划分管领导意见为空,不能启动流程','启动流程提示');
          DataSetBroker.DataSet.Cancel;
          Command.Accept:=False;
        end
        else if DataSetBroker.DataSet.FieldByName('plan_leader_opinion').Text.Length>100 then
        begin
          jsDialogs.ShowMsg('计划分管领导意见超过50字,请使用附件!','启动流程提示');
          DataSetBroker.DataSet.Cancel;
          Command.Accept:=False;
        end;
     end
     else
      Command.Accept:=False;
   end
   else if FuncBroker.Func.ID=SysUtils.UpperCase('FUNCMAINLEADERCHECK') then  //主管领导审批
   begin
     if jsDialogs.ConfirmBox('是否启动流程','启动流程提示',1) then
     begin
        if trim(DataSetBroker.DataSet.FieldByName('main_leader_opinion').AsString) = '' then
        begin
          jsDialogs.ShowMsg('主管领导意见为空,不能启动流程','启动流程提示');
          DataSetBroker.DataSet.Cancel;
          Command.Accept:=False;
        end
        else if DataSetBroker.DataSet.FieldByName('main_leader_opinion').Text.Length>100 then
        begin
          jsDialogs.ShowMsg('主管领导意见超过50字,请使用附件!','启动流程提示');
          DataSetBroker.DataSet.Cancel;
          Command.Accept:=False;
        end;
     end
     else
      Command.Accept:=False;
   end
   else if FuncBroker.Func.ID=SysUtils.UpperCase('FUNCADLEADERCONFIRM') then  //领导审批
   begin
     if jsDialogs.ConfirmBox('是否启动流程','启动流程提示',1) then
     begin
        if trim(DataSetBroker.DataSet.FieldByName('mgr').AsString) = '' then
        begin
          jsDialogs.ShowMsg('总经理意见为空,不能启动流程','启动流程提示');
          DataSetBroker.DataSet.Cancel;
          Command.Accept:=False;
        end
        else if DataSetBroker.DataSet.FieldByName('mgr').Text.Length>500 then
        begin
          jsDialogs.ShowMsg('总经理意见超过250字,请使用附件!','启动流程提示');
          DataSetBroker.DataSet.Cancel;
          Command.Accept:=False;
        end;
     end
     else
      Command.Accept:=False;
   end;
  if (Command.Accept) and (DataSetBroker.DataSet.UpdatesPending) then
    DataSetBroker.DataSet.ApplyUpdates;
end;
回复 支持 反对

使用道具 举报

发表于 2008-9-10 10:58:25 | 显示全部楼层
提供当前这个流程实例的任务表和任务消息表的相关记录
这个也给一下
回复 支持 反对

使用道具 举报

发表于 2008-9-19 08:35:08 | 显示全部楼层
??
回复 支持 反对

使用道具 举报

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

本版积分规则

小黑屋|手机版|Justep Inc.

GMT+8, 2025-7-22 06:32 , Processed in 0.045807 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

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