verifycurrentsteps.cs
来自「基于DotNet的工作流引擎实现」· CS 代码 · 共 36 行
CS
36 行
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 + =
减小字号Ctrl + -
显示快捷键?