executenodejob.java
来自「workflow first jbpm」· Java 代码 · 共 41 行
JAVA
41 行
package org.jbpm.job;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jbpm.JbpmContext;
import org.jbpm.graph.def.Node;
import org.jbpm.graph.exe.ExecutionContext;
import org.jbpm.graph.exe.Token;
public class ExecuteNodeJob extends Job {
private static final long serialVersionUID = 1L;
Node node;
public ExecuteNodeJob() {
}
public ExecuteNodeJob(Token token) {
super(token);
}
public boolean execute(JbpmContext jbpmContext) throws Exception {
log.debug("job["+id+"] executes "+node);
token.unlock(this.toString());
ExecutionContext executionContext = new ExecutionContext(token);
node.execute(executionContext);
jbpmContext.save(token);
return true;
}
public Node getNode() {
return node;
}
public void setNode(Node node) {
this.node = node;
}
private static Log log = LogFactory.getLog(ExecuteNodeJob.class);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?