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

📄 iterativecontinuation.java

📁 一个很好的微工作流内核
💻 JAVA
字号:
/* * 	  *  Copyright (c) 2003 Dragos Manolescu (dam@micro-workflow.com) *  *  See the LICENSE file for licensing information. */package com.microworkflow.execution;import java.util.Iterator;import com.microworkflow.process.WorkflowContext;/** * @author dam */public class IterativeContinuation extends Continuation {	protected String targetKey;	protected String iterationTargetKey;	protected Performer performer;	protected Continuation body;	protected Iterator components;	protected boolean iterating;	public IterativeContinuation(Continuation continuation) {		super(continuation);	}	public Continuation applyContinuationIn(WorkflowContext context) {		if (!iterating) {			iterating=true;			performer.setContext(context);			performer.setTargetKey(targetKey);			components=(Iterator)performer.execute();		}		if (components.hasNext()) {			Object component=components.next();			context.put(iterationTargetKey,component);			return body;		}		else {			resetState();			return getNextContinuation();		}	}	public void resetState() {		super.resetState();		iterating=false;	}		public void setIterationTargetKey(String iterationTargetKey) {		this.iterationTargetKey = iterationTargetKey;	}	public void setPerformer(Performer performer) {		this.performer = performer;	}	public void setTargetKey(String targetKey) {		this.targetKey = targetKey;	}	public void setBody(Continuation body) {		this.body = body;	}}

⌨️ 快捷键说明

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