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

📄 moneycheckdecisionhandler.java

📁 workflow first jbpm
💻 JAVA
字号:
/**
 * 
 */
package com.firstflow.decision;

import org.jbpm.context.exe.ContextInstance;
import org.jbpm.graph.exe.ExecutionContext;
import org.jbpm.graph.node.DecisionHandler;

/**
 * @author linly
 * com.firstflow.decision.MoneyCheckDecisionHandler
 * Mar 24, 2008
 */
public class MoneyCheckDecisionHandler implements DecisionHandler {

	/**
	 * 
	 */
	private static final long serialVersionUID = -6006030520398243985L;

	/* (non-Javadoc)
	 * @see org.jbpm.graph.node.DecisionHandler#decide(org.jbpm.graph.exe.ExecutionContext)
	 */
	@Override
	public String decide(ExecutionContext executionContext) throws Exception {
		/*
		 * 根据业务逻辑,选者流程方向
		 */
		ContextInstance ci = executionContext.getContextInstance();
		Integer money = (Integer)ci.getVariable("money");
		if(money > 5000){
			//返回中文的流程转向名称
			return ">5000元总经理审批";
		}else{
			return "<5000元 财务拨款";
		}
	}

}

⌨️ 快捷键说明

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