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

📄 startworkontaskcommand.java

📁 workflow first jbpm
💻 JAVA
字号:
package org.jbpm.command;

import org.jbpm.JbpmContext;

/**
 * The current authorizes actor starts to work on the TaskInstance
 * so the actor is set to the given actor
 * 
 * @author Bernd Ruecker
 */
public class StartWorkOnTaskCommand implements Command {

	private static final long serialVersionUID = 53004484398726736L;

	private long taskInstanceId;
	
	private boolean overwriteSwimlane = false;

	public StartWorkOnTaskCommand(long taskInstanceId, boolean overwriteSwimlane) {
		this.taskInstanceId = taskInstanceId;
		this.overwriteSwimlane = overwriteSwimlane;
	}

	public StartWorkOnTaskCommand() {		
	}
	
	public Object execute(JbpmContext jbpmContext) throws Exception {
		jbpmContext.getTaskInstance(taskInstanceId).start(jbpmContext.getActorId(), overwriteSwimlane);
		return null;
	}

	public boolean isOverwriteSwimlane() {
		return overwriteSwimlane;
	}

	public void setOverwriteSwimlane(boolean overwriteSwimlane) {
		this.overwriteSwimlane = overwriteSwimlane;
	}

	public long getTaskInstanceId() {
		return taskInstanceId;
	}

	public void setTaskInstanceId(long taskInstanceId) {
		this.taskInstanceId = taskInstanceId;
	}

}

⌨️ 快捷键说明

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