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

io.takari.bpm.model.ScriptTask 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 ScriptTask extends AbstractElement {

    private final Type type;
    private final String language;
    private final String content;
    private final Set in;
    private final Set out;
    private boolean copyAllVariables;

    public ScriptTask(String id, Type type, String language, String content) {
        this(id, type, language, content, null, null, false);
    }

    public ScriptTask(String id, Type type, String language, String content, boolean copyAllVariables) {
        this(id, type, language, content, null, null, copyAllVariables);
    }

    public ScriptTask(String id, Type type, String language, String content, Set in, Set out) {
        this(id, type, language, content, in, out, false);
    }

    public ScriptTask(String id, Type type, String language, String content, Set in, Set out, boolean copyAllVariables) {
        super(id);
        this.type = type;
        this.language = language;
        this.content = content;
        this.in = in;
        this.out = out;
        this.copyAllVariables = copyAllVariables;
    }

    public Type getType() {
        return type;
    }

    public String getLanguage() {
        return language;
    }

    public String getContent() {
        return content;
    }

    public Set getIn() {
        return in;
    }

    public Set getOut() {
        return out;
    }

    public boolean isCopyAllVariables() {
        return copyAllVariables;
    }

    public enum Type {
        /**
         * Contains a reference to an external script.
         */
        REFERENCE,

        /**
         * Contains script itself.
         */
        CONTENT
    }

    @Override
    public String toString() {
        return "ScriptTask (" + getId() + ") {" +
                "type=" + type +
                ", language='" + language + '\'' +
                ", in=" + in +
                ", out=" + out +
                ", content='" + content + '\'' +
                ", copyAllVariables='" + copyAllVariables + '\'' +
                '}';
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy