All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jbpt.pm.Gateway Maven / Gradle / Ivy

Go to download

The jBPT code library is a compendium of technologies that support research on design, execution, and evaluation of business processes.

There is a newer version: 0.3.1
Show newest version
package org.jbpt.pm;

/**
 * Abstract base class for all {@link Gateway}s of a {@link IProcessModel}.
 * 
 * @author Tobias Hoppe
 *
 */
public abstract class Gateway extends FlowNode implements IGateway {	

	/**
	 * Creates a new {@link Gateway} with an empty name.
	 */
	public Gateway() {
		super();
	}
	
	/**
	 * Creates a new {@link Gateway} with the given name.
	 * @param name of this {@link Gateway}
	 */
	public Gateway(String name){
		super(name);
	}
	
	@Override
	public boolean isJoin() {
		ProcessModel model = this.getModel();
		if (model != null && model.getIncomingControlFlow(this).size() > 1 && model.getOutgoingControlFlow(this).size() == 1){
			return true;
		}
		
		return false;
	}

	@Override
	public boolean isSplit() {
		ProcessModel model = this.getModel();
		if (model != null && model.getIncomingControlFlow(this).size() == 1 && model.getOutgoingControlFlow(this).size() > 1){
			return true;
		}
		
		return false;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy