⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 verifycurrentsteps.cs

📁 基于DotNet的工作流引擎实现
💻 CS
字号:
using System;
using System.Collections;
using DotNetTools.PropertySet;
using DotNetTools.Workflow.Spi;
/*
* Copyright (c) 2002-2003 by OpenSymphony
* All rights reserved.
*/
namespace DotNetTools.Workflow.Util
{
	/// <author>  hani Date: Feb 17, 2005 Time: 3:56:57 PM
	/// 
	/// </author>
	public class VerifyCurrentSteps : IFunctionProvider
	{
		//~ Methods ////////////////////////////////////////////////////////////////
		
		public virtual void  Execute(IDictionary transientVars, IDictionary args, IPropertySet ps)
		{
			IList currentSteps = (IList) transientVars["currentSteps"];
			
			if (currentSteps.Count != 1)
			{
				throw new WorkflowException("Expected 1 step to be in currentSteps, instead found " + currentSteps.Count);
			}
			
			int expectedId = Int32.Parse((String) args["step.id"]);
			IStep step = (IStep) currentSteps[0];
			
			if (step.StepId != expectedId)
			{
				throw new WorkflowException("Expected step id " + expectedId + " in prefunction, instead found id " + step.StepId);
			}
		}
	}
}

⌨️ 快捷键说明

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