workflowimpl.cs

来自「简单工作流引擎的实现」· CS 代码 · 共 70 行

CS
70
字号
using System;
using System.Collections.Generic;
using System.Text;
using Com.Richfit.WorkFlow.Data;
//using Com.Richfit.WorkFlow.DBProxy.PubComm;
using System.Collections;
//using Com.Richfit.WorkFlow.DBProxy.DataEntity;

namespace workflow.flowInterface.Impl
{
   public class workFlowImpl:IWorkFlow
    {
       

        #region IWorkFlow 成员

         workFlow IWorkFlow.InitWorkFlow(workFlow wf)
        {
            return wf;
            //throw new Exception("The method or operation is not implemented.");
        }

         flowStep IWorkFlow.workFlowRunTime(workFlow wf)
        {
            //curdData dbc = new curdData();
            wf.flowEntiyState = wfEState.run;
            flowSteps fss = wf.steps;
            flowStep firststep=new flowStep();
            //获取工作流的第一个步骤
            foreach (flowStep fs in fss)
            {
                if (fs.stepType == "开始节点")
                {
                    firststep = fs;
                }
            }
            return firststep;
            //throw new Exception("The method or operation is not implemented.");
        }

         stepBranch IWorkFlow.nextStepRunTime(flowStep fs)
        {
            workFlows wfs = workflow.saveWorkFlow.wfdata;
            workFlow curWf = new workFlow();
            foreach (workFlow wf in wfs)
            {
                if (wf.Instanceid == fs.Instanceid)
                {
                    curWf = wf;
                }
            }
            flowSteps fss = curWf.steps;
            flowSteps newfss = new flowSteps();
            foreach (flowStep curfs in fss)
            {
                if (curfs.preStepId == fs.flowStepId)
                {
                    newfss.Add(curfs);
                }
            }
            stepBranch sb = new stepBranch();
            sb.branchStep = newfss;
            return sb;
            //throw new Exception("The method or operation is not implemented.");
        }

        #endregion
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?