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);
}
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);
}
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);
}
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);
});
}
}
}
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);
}
Aggregations