Search in sources :

Example 1 with Process

use of io.automatiko.engine.api.workflow.Process in project automatiko-engine by automatiko-io.

the class ProcessInstanceMarshaller method importWorkflowProcessInstance.

public WorkflowProcessInstance importWorkflowProcessInstance(String header, String data, List<Map<String, String>> timers, Process<?> process) {
    Map<String, io.automatiko.engine.api.definition.process.Process> processes = new HashMap<String, io.automatiko.engine.api.definition.process.Process>();
    io.automatiko.engine.api.definition.process.Process p = ((AbstractProcess<?>) process).process();
    // this can include version number in the id
    processes.put(process.id(), p);
    // this is raw process id as defined in bpmn or so
    processes.put(p.getId(), p);
    try (ByteArrayInputStream bais = new ByteArrayInputStream(new byte[0])) {
        Map<String, Object> localEnv = new HashMap<String, Object>(env);
        localEnv.put("_import_", true);
        localEnv.put("_services_", ((AbstractProcess<?>) process).services());
        AutomatikoMessages.ProcessInstance.Builder builder = AutomatikoMessages.ProcessInstance.newBuilder();
        JsonFormat.parser().merge(data, builder);
        AutomatikoMessages.Header.Builder headerBuilder = AutomatikoMessages.Header.newBuilder();
        JsonFormat.parser().merge(header, headerBuilder);
        MarshallerReaderContext context = new MarshallerReaderContext(bais, null, processes, localEnv) {

            @Override
            protected void readStreamHeader() throws IOException, StreamCorruptedException {
            }
        };
        context.parameterObject = builder.build();
        PersisterHelper.loadStrategiesIndex(context, headerBuilder.build());
        io.automatiko.engine.workflow.marshalling.impl.ProcessInstanceMarshaller marshaller = ProcessMarshallerRegistry.INSTANCE.getMarshaller(builder.getProcessType());
        WorkflowProcessInstance pi = (WorkflowProcessInstance) marshaller.readProcessInstance(context);
        context.close();
        return pi;
    } catch (Exception e) {
        throw new RuntimeException("Error while unmarshalling process instance", e);
    }
}
Also used : HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) Process(io.automatiko.engine.api.workflow.Process) AbstractProcess(io.automatiko.engine.workflow.AbstractProcess) MarshallerReaderContext(io.automatiko.engine.workflow.marshalling.impl.MarshallerReaderContext) AbstractProcess(io.automatiko.engine.workflow.AbstractProcess) StreamCorruptedException(java.io.StreamCorruptedException) IOException(java.io.IOException) ByteArrayInputStream(java.io.ByteArrayInputStream) AbstractProcessInstance(io.automatiko.engine.workflow.AbstractProcessInstance) WorkflowProcessInstance(io.automatiko.engine.api.runtime.process.WorkflowProcessInstance) ProcessInstance(io.automatiko.engine.api.workflow.ProcessInstance) StringExportedProcessInstance(io.automatiko.engine.workflow.StringExportedProcessInstance) ExportedProcessInstance(io.automatiko.engine.api.workflow.ExportedProcessInstance) WorkflowProcessInstance(io.automatiko.engine.api.runtime.process.WorkflowProcessInstance)

Example 2 with Process

use of io.automatiko.engine.api.workflow.Process in project automatiko-engine by automatiko-io.

the class PublishEventTest method testProcessWithMilestoneEvents.

@Test
public void testProcessWithMilestoneEvents() throws Exception {
    Application app = generateCodeProcessesOnly("cases/milestones/SimpleMilestone.bpmn");
    assertThat(app).isNotNull();
    TestEventPublisher publisher = new TestEventPublisher();
    app.unitOfWorkManager().eventManager().setService("http://myhost");
    app.unitOfWorkManager().eventManager().addPublisher(publisher);
    UnitOfWork uow = app.unitOfWorkManager().newUnitOfWork();
    uow.start();
    Process<? extends Model> p = app.processes().processById("TestCase.SimpleMilestone_1_0");
    ProcessInstance<?> processInstance = p.createInstance(p.createModel());
    processInstance.start();
    assertThat(processInstance.status()).isEqualTo(ProcessInstance.STATE_COMPLETED);
    uow.end();
    List<DataEvent<?>> events = publisher.extract();
    assertThat(events).isNotNull().hasSize(1);
    DataEvent<?> event = events.get(0);
    assertThat(event).isInstanceOf(ProcessInstanceDataEvent.class);
    ProcessInstanceDataEvent processDataEvent = (ProcessInstanceDataEvent) event;
    assertThat(processDataEvent.getSource()).isEqualTo("http://myhost/SimpleMilestone");
    Set<MilestoneEventBody> milestones = ((ProcessInstanceDataEvent) event).getData().getMilestones();
    assertThat(milestones).hasSize(2).extracting(e -> e.getName(), e -> e.getStatus()).containsExactlyInAnyOrder(tuple("AutoStartMilestone", Status.COMPLETED.name()), tuple("SimpleMilestone", Status.COMPLETED.name()));
}
Also used : AbstractCodegenTest(io.automatiko.engine.codegen.AbstractCodegenTest) UserTaskInstanceEventBody(io.automatiko.engine.services.event.impl.UserTaskInstanceEventBody) MilestoneEventBody(io.automatiko.engine.services.event.impl.MilestoneEventBody) SecurityPolicy(io.automatiko.engine.api.auth.SecurityPolicy) ProcessInstanceEventBody(io.automatiko.engine.services.event.impl.ProcessInstanceEventBody) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) ProcessErrors(io.automatiko.engine.api.workflow.ProcessErrors) HashMap(java.util.HashMap) DataEvent(io.automatiko.engine.api.event.DataEvent) ArrayList(java.util.ArrayList) Application(io.automatiko.engine.api.Application) UserTaskInstanceDataEvent(io.automatiko.engine.services.event.UserTaskInstanceDataEvent) ProcessInstanceDataEvent(io.automatiko.engine.services.event.ProcessInstanceDataEvent) Map(java.util.Map) StaticIdentityProvider(io.automatiko.engine.services.identity.StaticIdentityProvider) Process(io.automatiko.engine.api.workflow.Process) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) EventPublisher(io.automatiko.engine.api.event.EventPublisher) Model(io.automatiko.engine.api.Model) Assertions.tuple(org.assertj.core.api.Assertions.tuple) Collection(java.util.Collection) Status(io.automatiko.engine.api.workflow.flexible.ItemDescription.Status) Set(java.util.Set) ProcessInstance(io.automatiko.engine.api.workflow.ProcessInstance) UnitOfWork(io.automatiko.engine.api.uow.UnitOfWork) Test(org.junit.jupiter.api.Test) List(java.util.List) WorkItem(io.automatiko.engine.api.workflow.WorkItem) UnitOfWork(io.automatiko.engine.api.uow.UnitOfWork) MilestoneEventBody(io.automatiko.engine.services.event.impl.MilestoneEventBody) DataEvent(io.automatiko.engine.api.event.DataEvent) UserTaskInstanceDataEvent(io.automatiko.engine.services.event.UserTaskInstanceDataEvent) ProcessInstanceDataEvent(io.automatiko.engine.services.event.ProcessInstanceDataEvent) ProcessInstanceDataEvent(io.automatiko.engine.services.event.ProcessInstanceDataEvent) Application(io.automatiko.engine.api.Application) AbstractCodegenTest(io.automatiko.engine.codegen.AbstractCodegenTest) Test(org.junit.jupiter.api.Test)

Example 3 with Process

use of io.automatiko.engine.api.workflow.Process in project automatiko-engine by automatiko-io.

the class CassandraProcessInstances method findByIdOrTag.

@Override
public Collection findByIdOrTag(ProcessInstanceReadMode mode, int status, String... values) {
    LOGGER.debug("findByIdOrTag() called for values {}", values);
    List<Row> collected = new ArrayList<Row>();
    Set<String> distinct = new HashSet<String>();
    Select select = selectFrom(config.keyspace().orElse("automatiko"), tableName).column(INSTANCE_ID_FIELD).column(CONTENT_FIELD).column(VERSION_FIELD).column(TAGS_FIELD).whereColumn(STATUS_FIELD).isEqualTo(literal(status));
    ResultSet rs = cqlSession.execute(select.build());
    rs.all().stream().filter(r -> !distinct.contains(r.getString(INSTANCE_ID_FIELD))).filter(r -> {
        if (values == null || values.length == 0) {
            return true;
        }
        Set<String> tags = r.getSet(TAGS_FIELD, String.class);
        return Stream.of(values).anyMatch(v -> tags.contains(v));
    }).forEach(r -> {
        distinct.add(r.getString(INSTANCE_ID_FIELD));
        collected.add(r);
    });
    return collected.stream().map(item -> {
        try {
            byte[] content = ByteUtils.getArray(item.getByteBuffer(CONTENT_FIELD));
            return mode == MUTABLE ? marshaller.unmarshallProcessInstance(codec.decode(content), process, item.getLong(VERSION_FIELD)) : marshaller.unmarshallReadOnlyProcessInstance(codec.decode(content), process);
        } catch (AccessDeniedException e) {
            return null;
        }
    }).filter(pi -> pi != null).collect(Collectors.toList());
}
Also used : QueryBuilder.insertInto(com.datastax.oss.driver.api.querybuilder.QueryBuilder.insertInto) QueryBuilder(com.datastax.oss.driver.api.querybuilder.QueryBuilder) ConflictingVersionException(io.automatiko.engine.api.workflow.ConflictingVersionException) LoggerFactory(org.slf4j.LoggerFactory) Insert(com.datastax.oss.driver.api.querybuilder.insert.Insert) CreateKeyspace(com.datastax.oss.driver.api.querybuilder.schema.CreateKeyspace) Delete(com.datastax.oss.driver.api.querybuilder.delete.Delete) SimpleStatement(com.datastax.oss.driver.api.core.cql.SimpleStatement) ByteBuffer(java.nio.ByteBuffer) CreateTable(com.datastax.oss.driver.api.querybuilder.schema.CreateTable) JacksonObjectMarshallingStrategy(io.automatiko.engine.addons.persistence.common.JacksonObjectMarshallingStrategy) Map(java.util.Map) AccessDeniedException(io.automatiko.engine.api.auth.AccessDeniedException) ConsistencyLevel(com.datastax.oss.driver.api.core.ConsistencyLevel) Select(com.datastax.oss.driver.api.querybuilder.select.Select) Model(io.automatiko.engine.api.Model) ByteUtils(com.datastax.oss.driver.api.core.data.ByteUtils) QueryBuilder.bindMarker(com.datastax.oss.driver.api.querybuilder.QueryBuilder.bindMarker) Collection(java.util.Collection) QueryExecutionException(com.datastax.oss.driver.api.core.servererrors.QueryExecutionException) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) StoredDataCodec(io.automatiko.engine.api.workflow.encrypt.StoredDataCodec) Set(java.util.Set) QueryBuilder.selectFrom(com.datastax.oss.driver.api.querybuilder.QueryBuilder.selectFrom) ProcessInstance(io.automatiko.engine.api.workflow.ProcessInstance) Collectors(java.util.stream.Collectors) SchemaBuilder(com.datastax.oss.driver.api.querybuilder.SchemaBuilder) List(java.util.List) DataTypes(com.datastax.oss.driver.api.core.type.DataTypes) Stream(java.util.stream.Stream) QueryBuilder.literal(com.datastax.oss.driver.api.querybuilder.QueryBuilder.literal) ExportedProcessInstance(io.automatiko.engine.api.workflow.ExportedProcessInstance) ProcessInstanceDuplicatedException(io.automatiko.engine.api.workflow.ProcessInstanceDuplicatedException) ProcessInstanceReadMode(io.automatiko.engine.api.workflow.ProcessInstanceReadMode) Optional(java.util.Optional) CassandraPersistenceConfig(io.automatiko.engine.api.config.CassandraPersistenceConfig) QueryBuilder.deleteFrom(com.datastax.oss.driver.api.querybuilder.QueryBuilder.deleteFrom) CreateIndex(com.datastax.oss.driver.api.querybuilder.schema.CreateIndex) MutableProcessInstances(io.automatiko.engine.api.workflow.MutableProcessInstances) AbstractProcessInstance(io.automatiko.engine.workflow.AbstractProcessInstance) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) CqlSession(com.datastax.oss.driver.api.core.CqlSession) Process(io.automatiko.engine.api.workflow.Process) Row(com.datastax.oss.driver.api.core.cql.Row) LinkedHashSet(java.util.LinkedHashSet) Logger(org.slf4j.Logger) ResultSet(com.datastax.oss.driver.api.core.cql.ResultSet) MUTABLE(io.automatiko.engine.api.workflow.ProcessInstanceReadMode.MUTABLE) ProcessInstanceMarshaller(io.automatiko.engine.workflow.marshalling.ProcessInstanceMarshaller) SchemaBuilder.createKeyspace(com.datastax.oss.driver.api.querybuilder.SchemaBuilder.createKeyspace) AccessDeniedException(io.automatiko.engine.api.auth.AccessDeniedException) Set(java.util.Set) HashSet(java.util.HashSet) LinkedHashSet(java.util.LinkedHashSet) ResultSet(com.datastax.oss.driver.api.core.cql.ResultSet) ArrayList(java.util.ArrayList) Select(com.datastax.oss.driver.api.querybuilder.select.Select) ResultSet(com.datastax.oss.driver.api.core.cql.ResultSet) Row(com.datastax.oss.driver.api.core.cql.Row) HashSet(java.util.HashSet) LinkedHashSet(java.util.LinkedHashSet)

Example 4 with Process

use of io.automatiko.engine.api.workflow.Process in project automatiko-engine by automatiko-io.

the class AdHocFragmentsTest method testStartUserTask.

@Test
void testStartUserTask() throws Exception {
    String taskName = "AdHoc User Task";
    Application app = generateCodeProcessesOnly("cases/AdHocFragments.bpmn");
    assertThat(app).isNotNull();
    Process<? extends Model> p = app.processes().processById("TestCase.AdHocFragments_1_0");
    ProcessInstance<? extends Model> processInstance = p.createInstance(p.createModel());
    processInstance.start();
    Optional<WorkItem> workItem = processInstance.workItems().stream().filter(wi -> wi.getParameters().get("NodeName").equals(taskName)).findFirst();
    assertThat(workItem).isNotPresent();
    processInstance.send(Sig.of(taskName, p.createModel()));
    assertEquals(ProcessInstance.STATE_ACTIVE, processInstance.status());
    workItem = processInstance.workItems().stream().filter(wi -> wi.getParameters().get("NodeName").equals(taskName)).findFirst();
    assertThat(workItem).isPresent();
    assertThat(workItem.get().getId()).isNotBlank();
    assertThat(workItem.get().getName()).isNotBlank();
}
Also used : AbstractCodegenTest(io.automatiko.engine.codegen.AbstractCodegenTest) Model(io.automatiko.engine.api.Model) AdHocFragment(io.automatiko.engine.api.workflow.flexible.AdHocFragment) MilestoneNode(io.automatiko.engine.workflow.process.core.node.MilestoneNode) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) Collection(java.util.Collection) ActionNode(io.automatiko.engine.workflow.process.core.node.ActionNode) HashMap(java.util.HashMap) ProcessInstance(io.automatiko.engine.api.workflow.ProcessInstance) ArrayList(java.util.ArrayList) Test(org.junit.jupiter.api.Test) List(java.util.List) Application(io.automatiko.engine.api.Application) HumanTaskNode(io.automatiko.engine.workflow.process.core.node.HumanTaskNode) Sig(io.automatiko.engine.workflow.Sig) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) Map(java.util.Map) WorkItemNode(io.automatiko.engine.workflow.process.core.node.WorkItemNode) Optional(java.util.Optional) Process(io.automatiko.engine.api.workflow.Process) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) WorkItem(io.automatiko.engine.api.workflow.WorkItem) Application(io.automatiko.engine.api.Application) WorkItem(io.automatiko.engine.api.workflow.WorkItem) AbstractCodegenTest(io.automatiko.engine.codegen.AbstractCodegenTest) Test(org.junit.jupiter.api.Test)

Example 5 with Process

use of io.automatiko.engine.api.workflow.Process in project automatiko-engine by automatiko-io.

the class ProcessInstanceManagementResource method getInstance.

@APIResponses(value = { @APIResponse(responseCode = "404", description = "In case of instance with given id was not found", content = @Content(mediaType = "application/json")), @APIResponse(responseCode = "200", description = "Process instance details", content = @Content(mediaType = "application/json")) })
@Operation(summary = "Returns process instance details for given instance id")
@SuppressWarnings("unchecked")
@GET
@Path("/{processId}/instances/{instanceId}")
@Produces(MediaType.APPLICATION_JSON)
public ProcessInstanceDetailsDTO getInstance(@Context UriInfo uriInfo, @Parameter(description = "Unique identifier of the process", required = true) @PathParam("processId") String processId, @Parameter(description = "Unique identifier of the instance", required = true) @PathParam("instanceId") String instanceId, @Parameter(description = "Status of the process instance", required = false, schema = @Schema(enumeration = { "active", "completed", "aborted", "error" })) @QueryParam("status") @DefaultValue("active") final String status, @Parameter(description = "User identifier as alternative autroization info", required = false, hidden = true) @QueryParam("user") final String user, @Parameter(description = "Groups as alternative autroization info", required = false, hidden = true) @QueryParam("group") final List<String> groups) {
    try {
        identitySupplier.buildIdentityProvider(user, groups);
        return UnitOfWorkExecutor.executeInUnitOfWork(application.unitOfWorkManager(), () -> {
            Process<?> process = processData.get(processId);
            Optional<ProcessInstance<?>> instance = (Optional<ProcessInstance<?>>) process.instances().findById(instanceId, mapStatus(status), ProcessInstanceReadMode.READ_ONLY);
            if (instance.isEmpty()) {
                throw new ProcessInstanceNotFoundException(instanceId);
            }
            ProcessInstance<?> pi = instance.get();
            ProcessInstanceDetailsDTO details = new ProcessInstanceDetailsDTO();
            String id = pi.id();
            if (pi.parentProcessInstanceId() != null) {
                id = pi.parentProcessInstanceId() + ":" + id;
            }
            details.setId(id);
            details.setProcessId(processId);
            details.setBusinessKey(pi.businessKey() == null ? "" : pi.businessKey());
            details.setDescription(pi.description());
            details.setState(pi.status());
            details.setFailed(pi.errors().isPresent());
            if (pi.errors().isPresent()) {
                details.setErrors(pi.errors().get().errors().stream().map(e -> new ErrorInfoDTO(e.failedNodeId(), e.errorId(), e.errorMessage(), e.errorDetails())).collect(Collectors.toList()));
            }
            details.setImage(uriInfo.getBaseUri().toString() + "management/processes/" + processId + "/instances/" + instanceId + "/image?status=" + reverseMapStatus(pi.status()));
            details.setTags(pi.tags().values());
            details.setVariables(pi.variables());
            details.setSubprocesses(pi.subprocesses().stream().map(spi -> new ProcessInstanceDTO(spi.id(), spi.businessKey(), spi.description(), spi.tags().values(), spi.errors().isPresent(), spi.process().id(), spi.status())).collect(Collectors.toList()));
            VariableScope variableScope = (VariableScope) ((ContextContainer) ((AbstractProcess<?>) process).process()).getDefaultContext(VariableScope.VARIABLE_SCOPE);
            details.setVersionedVariables(variableScope.getVariables().stream().filter(v -> v.hasTag(Variable.VERSIONED_TAG)).map(v -> v.getName()).collect(Collectors.toList()));
            return details;
        });
    } finally {
        IdentityProvider.set(null);
    }
}
Also used : Produces(javax.ws.rs.Produces) Path(javax.ws.rs.Path) LoggerFactory(org.slf4j.LoggerFactory) ProcessInstanceExporter(io.automatiko.engine.addons.process.management.export.ProcessInstanceExporter) MediaType(javax.ws.rs.core.MediaType) Application(io.automatiko.engine.api.Application) QueryParam(javax.ws.rs.QueryParam) ProcessImageNotFoundException(io.automatiko.engine.api.workflow.ProcessImageNotFoundException) ContextContainer(io.automatiko.engine.workflow.base.core.ContextContainer) SchemaType(org.eclipse.microprofile.openapi.annotations.enums.SchemaType) VariableNotFoundException(io.automatiko.engine.api.workflow.VariableNotFoundException) Map(java.util.Map) DefaultValue(javax.ws.rs.DefaultValue) APIResponse(org.eclipse.microprofile.openapi.annotations.responses.APIResponse) Instance(javax.enterprise.inject.Instance) DELETE(javax.ws.rs.DELETE) JsonExportedProcessInstance(io.automatiko.engine.addons.process.management.model.JsonExportedProcessInstance) IoUtils(io.automatiko.engine.services.utils.IoUtils) Context(javax.ws.rs.core.Context) Model(io.automatiko.engine.api.Model) IdentityProvider(io.automatiko.engine.api.auth.IdentityProvider) Operation(org.eclipse.microprofile.openapi.annotations.Operation) ProcessInstance(io.automatiko.engine.api.workflow.ProcessInstance) VariableScope(io.automatiko.engine.workflow.base.core.context.variable.VariableScope) Collectors(java.util.stream.Collectors) List(java.util.List) Response(javax.ws.rs.core.Response) Parameter(org.eclipse.microprofile.openapi.annotations.parameters.Parameter) ProcessInstanceDTO(io.automatiko.engine.addons.process.management.model.ProcessInstanceDTO) ProcessInstanceReadMode(io.automatiko.engine.api.workflow.ProcessInstanceReadMode) Optional(java.util.Optional) Tag(org.eclipse.microprofile.openapi.annotations.tags.Tag) Variable(io.automatiko.engine.workflow.base.core.context.variable.Variable) UriInfo(javax.ws.rs.core.UriInfo) ProcessInstanceNotFoundException(io.automatiko.engine.api.workflow.ProcessInstanceNotFoundException) PathParam(javax.ws.rs.PathParam) AbstractProcessInstance(io.automatiko.engine.workflow.AbstractProcessInstance) ByteArrayOutputStream(java.io.ByteArrayOutputStream) GET(javax.ws.rs.GET) ProcessInstanceDetailsDTO(io.automatiko.engine.addons.process.management.model.ProcessInstanceDetailsDTO) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) ArchivedProcessInstance(io.automatiko.engine.api.workflow.ArchivedProcessInstance) JsonArchiveBuilder(io.automatiko.engine.workflow.json.JsonArchiveBuilder) IdentitySupplier(io.automatiko.engine.api.auth.IdentitySupplier) ErrorInfoDTO(io.automatiko.engine.addons.process.management.model.ErrorInfoDTO) WorkflowProcess(io.automatiko.engine.workflow.process.core.WorkflowProcess) Process(io.automatiko.engine.api.workflow.Process) ProcessDTO(io.automatiko.engine.addons.process.management.model.ProcessDTO) Content(org.eclipse.microprofile.openapi.annotations.media.Content) AbstractProcess(io.automatiko.engine.workflow.AbstractProcess) Status(javax.ws.rs.core.Response.Status) ResponseBuilder(javax.ws.rs.core.Response.ResponseBuilder) UnitOfWorkExecutor(io.automatiko.engine.services.uow.UnitOfWorkExecutor) POST(javax.ws.rs.POST) Logger(org.slf4j.Logger) Schema(org.eclipse.microprofile.openapi.annotations.media.Schema) IOException(java.io.IOException) ExternalDocumentation(org.eclipse.microprofile.openapi.annotations.ExternalDocumentation) APIResponses(org.eclipse.microprofile.openapi.annotations.responses.APIResponses) Collections(java.util.Collections) ProcessInstanceDetailsDTO(io.automatiko.engine.addons.process.management.model.ProcessInstanceDetailsDTO) Optional(java.util.Optional) ErrorInfoDTO(io.automatiko.engine.addons.process.management.model.ErrorInfoDTO) AbstractProcess(io.automatiko.engine.workflow.AbstractProcess) ProcessInstanceDTO(io.automatiko.engine.addons.process.management.model.ProcessInstanceDTO) ProcessInstanceNotFoundException(io.automatiko.engine.api.workflow.ProcessInstanceNotFoundException) JsonExportedProcessInstance(io.automatiko.engine.addons.process.management.model.JsonExportedProcessInstance) ProcessInstance(io.automatiko.engine.api.workflow.ProcessInstance) AbstractProcessInstance(io.automatiko.engine.workflow.AbstractProcessInstance) ArchivedProcessInstance(io.automatiko.engine.api.workflow.ArchivedProcessInstance) VariableScope(io.automatiko.engine.workflow.base.core.context.variable.VariableScope) Path(javax.ws.rs.Path) Produces(javax.ws.rs.Produces) GET(javax.ws.rs.GET) APIResponses(org.eclipse.microprofile.openapi.annotations.responses.APIResponses) Operation(org.eclipse.microprofile.openapi.annotations.Operation)

Aggregations

Process (io.automatiko.engine.api.workflow.Process)18 ProcessInstance (io.automatiko.engine.api.workflow.ProcessInstance)15 Model (io.automatiko.engine.api.Model)13 List (java.util.List)11 Map (java.util.Map)11 ArrayList (java.util.ArrayList)10 HashMap (java.util.HashMap)10 AbstractProcessInstance (io.automatiko.engine.workflow.AbstractProcessInstance)9 Collection (java.util.Collection)9 Application (io.automatiko.engine.api.Application)8 Optional (java.util.Optional)8 ExportedProcessInstance (io.automatiko.engine.api.workflow.ExportedProcessInstance)7 Collectors (java.util.stream.Collectors)7 ProcessInstanceReadMode (io.automatiko.engine.api.workflow.ProcessInstanceReadMode)6 Logger (org.slf4j.Logger)6 LoggerFactory (org.slf4j.LoggerFactory)6 WorkItem (io.automatiko.engine.api.workflow.WorkItem)5 AbstractCodegenTest (io.automatiko.engine.codegen.AbstractCodegenTest)5 AbstractProcess (io.automatiko.engine.workflow.AbstractProcess)5 IOException (java.io.IOException)5