📄 joinimpl.java
字号:
package org.jbpm.model.definition.impl;
import org.jbpm.*;
import org.jbpm.delegation.*;
import org.jbpm.model.definition.*;
import org.jbpm.model.execution.impl.*;
public class JoinImpl extends NodeImpl implements Join {
private ForkImpl correspondingFork = null;
private transient DelegationImpl joinDelegation = null;
public JoinImpl() {
}
public JoinImpl( String name ) {
super( name );
}
public ForkImpl getCorrespondingFork() { return this.correspondingFork; }
public void setCorrespondingFork(ForkImpl correspondingFork) { this.correspondingFork = correspondingFork; }
public DelegationImpl getJoinDelegation() { return joinDelegation; }
public void setJoinDelegation ( DelegationImpl joinDelegation ) { this.joinDelegation = joinDelegation; }
public void acceptToken(ExecutionContextImpl executionContext) throws ExecutionException {
TokenImpl token = (TokenImpl) executionContext.getToken();
if ( ! token.hasEnded() ) {
token.end( executionContext, false );
}
// execute the actions
executeActions( EventType.JOIN_EVERY_ENTER, executionContext );
// TODO document why the transient variables have to be cleared
executionContext.clearTransientVariables();
executionContext.setToken( token );
executionContext.setNode( this );
// if this join has a custom join handler
if ( joinDelegation != null ) {
// instantiate it
JoinHandler joinHandler = (JoinHandler) joinDelegation.instantiate();
try {
// and use it
joinHandler.join( executionContext );
} catch (RuntimeException e) {
joinDelegation.handleException(e);
}
} else { // this join does not have a join handler specified
// use the default join handler
JoinHandler joinHandler = (JoinHandler) new DelegationImpl( definition, "org.jbpm.delegation.join.DefaultJoinHandler" ).instantiate();
joinHandler.join( executionContext );
}
}
public String toString() {
return "join["+name+"]";
}
public void toXml(org.dom4j.Element element) {
toXmlNameAndDescription(element);
if ( joinDelegation != null ) {
joinDelegation.toXml( element.addElement("delegation"));
}
toXmlActions(element);
toXmlTransitions(element);
}
public String getTagName() {
return "join";
}
public EventType getDefaultEventType() {
return EventType.JOIN_EVERY_ENTER;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -