Search in sources :

Example 1 with Trigger

use of com.walmartlabs.concord.project.model.Trigger in project concord by walmartlabs.

the class YamlProjectConverter method convert.

public static ProjectDefinition convert(YamlProject project) throws YamlConverterException {
    Map<String, ProcessDefinition> flows = convertFlows(project.getFlows());
    Set<String> publicFlows = project.getPublicFlows();
    Map<String, FormDefinition> forms = convertForms(project.getForms());
    Map<String, Object> cfg = project.getConfiguration();
    Map<String, Profile> profiles = convertProfiles(project.getProfiles());
    List<Trigger> triggers = YamlTriggersConverter.convert(project.getTriggers());
    Imports imports = convertImports(project.getImports());
    Resources resources = convertResources(project.getResources());
    return new ProjectDefinition(flows, publicFlows, forms, cfg, profiles, triggers, imports, resources);
}
Also used : ProcessDefinition(io.takari.bpm.model.ProcessDefinition) Imports(com.walmartlabs.concord.imports.Imports) YamlImportConverter.convertImports(com.walmartlabs.concord.project.yaml.YamlImportConverter.convertImports) Profile(com.walmartlabs.concord.project.model.Profile) YamlProfile(com.walmartlabs.concord.project.yaml.model.YamlProfile) ProjectDefinition(com.walmartlabs.concord.project.model.ProjectDefinition) Trigger(com.walmartlabs.concord.project.model.Trigger) Resources(com.walmartlabs.concord.project.model.Resources) FormDefinition(io.takari.bpm.model.form.FormDefinition)

Example 2 with Trigger

use of com.walmartlabs.concord.project.model.Trigger in project concord by walmartlabs.

the class YamlTriggersConverter method convert.

public static List<Trigger> convert(List<YamlTrigger> triggers) {
    if (triggers == null || triggers.isEmpty()) {
        return null;
    }
    List<Trigger> result = new ArrayList<>();
    for (YamlTrigger t : triggers) {
        TriggerConverter converter = converters.getOrDefault(t.getEventSource(), defaultConverter);
        result.add(converter.convert(t));
    }
    return result;
}
Also used : Trigger(com.walmartlabs.concord.project.model.Trigger) YamlTrigger(com.walmartlabs.concord.project.yaml.model.YamlTrigger) YamlTrigger(com.walmartlabs.concord.project.yaml.model.YamlTrigger)

Aggregations

Trigger (com.walmartlabs.concord.project.model.Trigger)2 Imports (com.walmartlabs.concord.imports.Imports)1 Profile (com.walmartlabs.concord.project.model.Profile)1 ProjectDefinition (com.walmartlabs.concord.project.model.ProjectDefinition)1 Resources (com.walmartlabs.concord.project.model.Resources)1 YamlImportConverter.convertImports (com.walmartlabs.concord.project.yaml.YamlImportConverter.convertImports)1 YamlProfile (com.walmartlabs.concord.project.yaml.model.YamlProfile)1 YamlTrigger (com.walmartlabs.concord.project.yaml.model.YamlTrigger)1 ProcessDefinition (io.takari.bpm.model.ProcessDefinition)1 FormDefinition (io.takari.bpm.model.form.FormDefinition)1