📄 iterative.java
字号:
/* * * Copyright (c) 2003 Dragos Manolescu (dam@micro-workflow.com) * * See the LICENSE file for licensing information. */package com.microworkflow.process;import com.microworkflow.execution.Continuation;import com.microworkflow.execution.IterativeContinuation;import com.microworkflow.execution.Performer;/** * @author dam * * This activity node obtains the components of a domain object (e.g., a premium) and * then executes its body on each component (e.g., premium charges or credits). */public class Iterative extends Activity { protected String targetKey; protected String iterationTargetKey; protected Performer performer; protected Activity body; public Iterative(String targetKey,Performer performer,String iterationTargetKey,Activity body) { this.targetKey=targetKey; this.iterationTargetKey=iterationTargetKey; this.performer=performer; this.body=body; } public Continuation continuationWith(Continuation continuation) { IterativeContinuation k=continuation.makeIterativeContinuation(this); k.setTargetKey(targetKey); k.setPerformer(performer); k.setIterationTargetKey(iterationTargetKey); k.resetState(); return k; } public void computeStateFor(Continuation k) { ((IterativeContinuation)k).setBody(body.continuationWith(k)); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -