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

org.kie.kogito.app.ApplicationProcesses Maven / Gradle / Ivy

There is a newer version: 1.7.0.Final
Show newest version
package org.kie.kogito.app;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import org.kie.kogito.Model;
import org.kie.kogito.process.Process;
import org.kie.kogito.process.Processes;

@org.springframework.stereotype.Component()
public class ApplicationProcesses implements Processes {

    @org.springframework.beans.factory.annotation.Autowired()
    java.util.Collection> processes;

    private Map> mappedProcesses = new HashMap<>();

    @javax.annotation.PostConstruct
    public void setup() {
        for (Process process : processes) {
            mappedProcesses.put(process.id(), process);
        }
    }

    public Process processById(String processId) {
        return mappedProcesses.get(processId);
    }

    public Collection processIds() {
        return mappedProcesses.keySet();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy