io.automatiko.engine.service.dev.AutomatikoServiceJsonRpcService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of automatiko-service Show documentation
Show all versions of automatiko-service Show documentation
Workflow as a Service - processes and decisions with Automatiko Engine
The newest version!
package io.automatiko.engine.service.dev;
import java.util.Collection;
import io.vertx.core.json.JsonArray;
import io.vertx.core.json.JsonObject;
public class AutomatikoServiceJsonRpcService {
public JsonArray getInfo() {
JsonArray result = new JsonArray();
Collection workflows = new WorkflowInfoSupplier().get();
for (WorkflowInfo workflow : workflows) {
JsonObject workflowAsJson = toJson(workflow);
result.add(workflowAsJson);
}
return result;
}
private JsonObject toJson(WorkflowInfo workflow) {
JsonObject json = new JsonObject();
json.put("id", workflow.getId());
json.put("name", workflow.getName());
json.put("description", workflow.getDescription());
json.put("publicProcess", workflow.isPublicProcess());
return json;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy