io.resys.wrench.assets.flow.api.model.FlowModel Maven / Gradle / Ivy
package io.resys.wrench.assets.flow.api.model;
/*-
* #%L
* wrench-assets-flow
* %%
* Copyright (C) 2016 - 2018 Copyright 2016 ReSys OÜ
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import javax.annotation.Nullable;
import org.immutables.value.Value;
import io.resys.wrench.assets.datatype.api.DataTypeRepository.DataType;
@Value.Immutable
public interface FlowModel extends Serializable {
String getId();
int getRev();
@Nullable
String getDescription();
String getSrc();
Collection getInputs();
FlowTaskModel getTask();
Collection getTasks();
interface FlowTaskModel extends Serializable {
FlowTaskModel get(String taskId);
String getId();
@Nullable
FlowTaskValue getBody();
FlowTaskType getType();
FlowTaskModel getPrevious();
List getNext();
}
@Value.Immutable
interface FlowTaskValue extends Serializable {
@Nullable
String getRef();
@Nullable
FlowTaskExpression getExpression();
Map getInputs();
boolean isCollection();
}
interface FlowTaskExpression extends Serializable {
String getValue();
List getInputs();
boolean eval(FlowTaskExpressionContext context);
}
interface FlowTaskExpressionContext extends Function {
}
enum FlowTaskType {
DT, SERVICE, USER_TASK, EMPTY, DECISION, EXCLUSIVE, MERGE, END
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy