📄 stateimpl.java
字号:
package org.jbpm.model.definition.impl;
import org.jbpm.*;
import org.jbpm.model.definition.*;
import org.jbpm.model.execution.impl.*;
import org.jbpm.model.log.impl.*;
public class StateImpl extends NodeImpl implements State {
protected SwimlaneImpl swimlane = null;
public StateImpl() {}
public StateImpl( String name ) {
super( name );
}
public StateImpl( String name, SwimlaneImpl actor ) {
super( name );
this.swimlane = actor;
}
public Swimlane getSwimlane() { return this.swimlane; }
public void setSwimlane(Swimlane swimlane) { this.swimlane = (SwimlaneImpl) swimlane; }
public void acceptToken(ExecutionContextImpl executionContext) throws ExecutionException {
TokenImpl token = (TokenImpl) executionContext.getToken();
token.setState( this );
executeActions( EventType.STATE_ENTER, executionContext );
String actorId = swimlane.getActorId( executionContext );
AssignmentLogImpl assignmentLog = new AssignmentLogImpl(token.getLastAssignmentLog(), actorId, this );
token.setActorId( actorId );
token.add( assignmentLog );
token.setLastAssignmentLog( assignmentLog );
executeActions( EventType.STATE_AFTER_ASSIGNMENT, executionContext );
}
public String toString() {
return "state["+name+"]";
}
public void toXml(org.dom4j.Element element) {
toXmlNameAndDescription( element );
toXmlSwimlane( element );
toXmlActions(element);
toXmlTransitions( element );
}
public void toXmlSwimlane(org.dom4j.Element element) {
if ( swimlane != null ) {
element.addAttribute( "swimlane", swimlane.getName() );
}
}
public String getTagName() {
return "state";
}
public EventType getDefaultEventType() {
return EventType.STATE_ENTER;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -