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

📄 primitive.java

📁 一个很好的微工作流内核
💻 JAVA
字号:
/* * 	  *  Copyright (c) 2002 Dragos Manolescu (dam@micro-workflow.com) *  *  See the LICENSE file for licensing information. */package com.microworkflow.process;import com.microworkflow.execution.*;/** * @author dam * * This activity node represents a point where the control flow passes from the * control tier (i.e., workflow) to the logic tier (i.e., domain objects). * The execution in the logic tier takes place synchronously. */public class Primitive extends Activity {	protected Performer performer;	protected String resultKey = null;	protected String targetKey = null;	public Primitive(Performer performer) {		this.performer = performer;	}		public Primitive(String targetKey, Performer performer) {		this(performer);		this.targetKey = targetKey;	}		public Primitive(String targetKey, String resultKey, Performer performer) {		this(targetKey,performer);		this.resultKey = resultKey;	}	public Continuation continuationWith(Continuation continuation) {		PrimitiveContinuation k = continuation.makePrimitiveContinuation(this);		k.setTargetKey(targetKey);		k.setPerformer(performer);		k.setResultKey(resultKey);		return k;	}		public static Primitive makeNop(String targetKey,String resultKey) {		Primitive nop=new Primitive(targetKey,resultKey,			new Performer() {				public Object execute() {					return getTarget();				}});		return nop;	}		public void computeStateFor(Continuation k) {		// stateless	}}

⌨️ 快捷键说明

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