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

io.takari.bpm.model.ServiceTask Maven / Gradle / Ivy

There is a newer version: 1.0.3
Show newest version
package io.takari.bpm.model;

import java.util.Set;

public class ServiceTask extends AbstractElement {
	
	private static final long serialVersionUID = 1L;

    /**
     * The variable which contains the result of expression evaluation.
     */
	public static final String EXPRESSION_RESULT_VAR = "__exprResult";
    
    private String name;
    private final String expression;
    private final ExpressionType type;
    private final Set in;
    private final Set out;
    private final boolean copyAllVariables;

    public ServiceTask(String id) {
        this(id, ExpressionType.NONE, null, false);
    }

    public ServiceTask(String id, ExpressionType type, String expression) {
        this(id, type, expression, null, null, false);
    }

    public ServiceTask(String id, ExpressionType type, String expression, boolean copyAllVariables) {
        this(id, type, expression, null, null, copyAllVariables);
    }

    public ServiceTask(String id, ExpressionType type, String expression, Set in, Set out) {
        this(id, type, expression, in, out, false);
    }

    public ServiceTask(String id, ExpressionType type, String expression, Set in, Set out, boolean copyAllVariables) {
        super(id);
        this.type = type;
        this.expression = expression;
        this.in = in;
        this.out = out;
        this.copyAllVariables = copyAllVariables;
    }

    public String getExpression() {
        return expression;
    }

    public ExpressionType getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Set getIn() {
        return in;
    }

    public Set getOut() {
        return out;
    }

    public boolean isCopyAllVariables() {
        return copyAllVariables;
    }

    @Override
    public String toString() {
        return "ServiceTask (" + getId() + ") {" +
                "name='" + name + '\'' +
                ", expression='" + expression + '\'' +
                ", type=" + type +
                ", in=" + in +
                ", out=" + out +
                ", copyAllVariables=" + copyAllVariables +
                '}';
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy