forkcontinuation.java
来自「一个很好的微工作流内核」· Java 代码 · 共 39 行
JAVA
39 行
/* * * Copyright (c) 2002, 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;public class ForkContinuation extends Continuation { protected Iterator branches; public ForkContinuation(Continuation continuation) { super(continuation, continuation.getWorkflow()); } public Continuation applyContinuationIn(WorkflowContext context) { Continuation branch = this.makeNullContinuation(); if (branches.hasNext()) { branch = (Continuation) branches.next(); } while (branches.hasNext()) { Continuation otherBranch = (Continuation) branches.next(); getWorkflow().addContinuation(otherBranch); } resetState(); return branch.applyContinuationIn(context); } public void setBranches(Iterator branches) { this.branches = branches; } }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?