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

org.yaoqiang.bpmn.model.elements.activities.Transaction Maven / Gradle / Ivy

package org.yaoqiang.bpmn.model.elements.activities;

import org.yaoqiang.bpmn.model.elements.XMLAttribute;
import org.yaoqiang.bpmn.model.elements.core.common.FlowElements;

/**
 * Transaction
 * 
 * @author Shi Yaoqiang([email protected])
 */
public class Transaction extends SubProcess {

	private static final long serialVersionUID = 5728943115540481916L;

	public Transaction(String name) {
		this((FlowElements) null);
		setName(name);
	}

	public Transaction(FlowElements parent) {
		super(parent, "transaction");
	}

	protected void fillStructure() {
		XMLAttribute attrMethod = new XMLAttribute(this, "method", "##Compensate");

		super.fillStructure();
		add(attrMethod);
	}

	public final String getMethod() {
		return getMethodAttribute().toValue();
	}

	public final XMLAttribute getMethodAttribute() {
		return (XMLAttribute) get("method");
	}

	public final void setMethod(String method) {
		getMethodAttribute().setValue(method);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy