Search in sources :

Example 1 with ExecutableProcess

use of io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableProcess in project zeebe by camunda.

the class ProcessTransformer method transform.

@Override
public void transform(final Process element, final TransformContext context) {
    final String id = element.getId();
    final ExecutableProcess process = new ExecutableProcess(id);
    process.setElementType(BpmnElementType.bpmnElementTypeFor(element.getElementType().getTypeName()));
    context.addProcess(process);
    context.setCurrentProcess(process);
}
Also used : ExecutableProcess(io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableProcess)

Example 2 with ExecutableProcess

use of io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableProcess in project zeebe by camunda.

the class ReceiveTaskTransformer method transform.

@Override
public void transform(final ReceiveTask element, final TransformContext context) {
    final ExecutableProcess process = context.getCurrentProcess();
    final ExecutableReceiveTask executableElement = process.getElementById(element.getId(), ExecutableReceiveTask.class);
    final Message message = element.getMessage();
    final ExecutableMessage executableMessage = context.getMessage(message.getId());
    executableElement.setMessage(executableMessage);
}
Also used : ExecutableMessage(io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableMessage) ExecutableMessage(io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableMessage) Message(io.camunda.zeebe.model.bpmn.instance.Message) ExecutableProcess(io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableProcess) ExecutableReceiveTask(io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableReceiveTask)

Example 3 with ExecutableProcess

use of io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableProcess in project zeebe by camunda.

the class SequenceFlowTransformer method transform.

@Override
public void transform(final SequenceFlow element, final TransformContext context) {
    final ExecutableProcess process = context.getCurrentProcess();
    final ExecutableSequenceFlow sequenceFlow = process.getElementById(element.getId(), ExecutableSequenceFlow.class);
    parseCondition(element, sequenceFlow, context.getExpressionLanguage());
    connectWithFlowNodes(element, process, sequenceFlow);
}
Also used : ExecutableSequenceFlow(io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableSequenceFlow) ExecutableProcess(io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableProcess)

Example 4 with ExecutableProcess

use of io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableProcess in project zeebe by camunda.

the class MessageStartEventSubscriptionManager method openMessageStartEventSubscriptions.

private void openMessageStartEventSubscriptions(final ProcessMetadata processRecord, final StateWriter stateWriter) {
    final long processDefinitionKey = processRecord.getKey();
    final DeployedProcess processDefinition = processState.getProcessByKey(processDefinitionKey);
    final ExecutableProcess process = processDefinition.getProcess();
    final List<ExecutableStartEvent> startEvents = process.getStartEvents();
    // if startEvents contain message events
    for (final ExecutableCatchEventElement startEvent : startEvents) {
        if (startEvent.isMessage()) {
            final ExecutableMessage message = startEvent.getMessage();
            message.getMessageName().map(BufferUtil::wrapString).ifPresent(messageNameBuffer -> {
                subscriptionRecord.reset();
                subscriptionRecord.setMessageName(messageNameBuffer).setProcessDefinitionKey(processDefinitionKey).setBpmnProcessId(process.getId()).setStartEventId(startEvent.getId());
                final var subscriptionKey = keyGenerator.nextKey();
                stateWriter.appendFollowUpEvent(subscriptionKey, MessageStartEventSubscriptionIntent.CREATED, subscriptionRecord);
            });
        }
    }
}
Also used : ExecutableMessage(io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableMessage) DeployedProcess(io.camunda.zeebe.engine.state.deployment.DeployedProcess) ExecutableStartEvent(io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableStartEvent) ExecutableCatchEventElement(io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableCatchEventElement) ExecutableProcess(io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableProcess)

Example 5 with ExecutableProcess

use of io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableProcess in project zeebe by camunda.

the class BoundaryEventTransformer method transform.

@Override
public void transform(final BoundaryEvent event, final TransformContext context) {
    final ExecutableProcess process = context.getCurrentProcess();
    final ExecutableBoundaryEvent element = process.getElementById(event.getId(), ExecutableBoundaryEvent.class);
    element.setInterrupting(event.cancelActivity());
    attachToActivity(event, process, element);
}
Also used : ExecutableBoundaryEvent(io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableBoundaryEvent) ExecutableProcess(io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableProcess)

Aggregations

ExecutableProcess (io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableProcess)69 AbstractFlowElement (io.camunda.zeebe.engine.processing.deployment.model.element.AbstractFlowElement)12 ExecutableCatchEventElement (io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableCatchEventElement)9 DeploymentRecord (io.camunda.zeebe.protocol.impl.record.value.deployment.DeploymentRecord)9 Test (org.junit.Test)9 ExecutableFlowElementContainer (io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableFlowElementContainer)6 ExecutableMessage (io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableMessage)6 ExecutableStartEvent (io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableStartEvent)6 ExecutableActivity (io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableActivity)3 ExecutableBoundaryEvent (io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableBoundaryEvent)3 ExecutableCallActivity (io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableCallActivity)3 ExecutableCatchEvent (io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableCatchEvent)3 ExecutableEventBasedGateway (io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableEventBasedGateway)3 ExecutableExclusiveGateway (io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableExclusiveGateway)3 ExecutableFlowNode (io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableFlowNode)3 ExecutableJobWorkerElement (io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableJobWorkerElement)3 ExecutableJobWorkerTask (io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableJobWorkerTask)3 ExecutableLoopCharacteristics (io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableLoopCharacteristics)3 ExecutableMultiInstanceBody (io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableMultiInstanceBody)3 ExecutableReceiveTask (io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableReceiveTask)3