Search in sources :

Example 1 with ExecutableCallActivity

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

the class CallActivityTransformer method transform.

@Override
public void transform(final CallActivity element, final TransformContext context) {
    final ExecutableProcess process = context.getCurrentProcess();
    final ExecutableCallActivity callActivity = process.getElementById(element.getId(), ExecutableCallActivity.class);
    transformProcessId(element, callActivity, context.getExpressionLanguage());
}
Also used : ExecutableProcess(io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableProcess) ExecutableCallActivity(io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableCallActivity)

Example 2 with ExecutableCallActivity

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

the class BpmnStateTransitionBehavior method getParentProcessScope.

private ExecutableCallActivity getParentProcessScope(final BpmnElementContext callActivityContext, final BpmnElementContext childContext) {
    final var processDefinitionKey = callActivityContext.getProcessDefinitionKey();
    final var elementId = callActivityContext.getElementId();
    return stateBehavior.getProcess(processDefinitionKey).map(DeployedProcess::getProcess).map(process -> process.getElementById(elementId, BpmnElementType.CALL_ACTIVITY, ExecutableCallActivity.class)).orElseThrow(() -> new BpmnProcessingException(childContext, String.format(NO_PROCESS_FOUND_MESSAGE, processDefinitionKey)));
}
Also used : BpmnElementContext(io.camunda.zeebe.engine.processing.bpmn.BpmnElementContext) ExecutableFlowNode(io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableFlowNode) TypedCommandWriter(io.camunda.zeebe.engine.processing.streamprocessor.writers.TypedCommandWriter) Arrays(java.util.Arrays) ProcessInstanceIntent(io.camunda.zeebe.protocol.record.intent.ProcessInstanceIntent) KeyGenerator(io.camunda.zeebe.engine.state.KeyGenerator) ElementInstanceState(io.camunda.zeebe.engine.state.immutable.ElementInstanceState) ProcessInstanceLifecycle(io.camunda.zeebe.engine.processing.bpmn.ProcessInstanceLifecycle) Function(java.util.function.Function) BpmnProcessingException(io.camunda.zeebe.engine.processing.bpmn.BpmnProcessingException) BpmnElementContainerProcessor(io.camunda.zeebe.engine.processing.bpmn.BpmnElementContainerProcessor) DeployedProcess(io.camunda.zeebe.engine.state.deployment.DeployedProcess) ProcessInstanceRecord(io.camunda.zeebe.protocol.impl.record.value.processinstance.ProcessInstanceRecord) ExecutableCallActivity(io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableCallActivity) BpmnElementType(io.camunda.zeebe.protocol.record.value.BpmnElementType) Failure(io.camunda.zeebe.engine.processing.common.Failure) ProcessEngineMetrics(io.camunda.zeebe.engine.metrics.ProcessEngineMetrics) Writers(io.camunda.zeebe.engine.processing.streamprocessor.writers.Writers) Either(io.camunda.zeebe.util.Either) ExecutableSequenceFlow(io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableSequenceFlow) StateWriter(io.camunda.zeebe.engine.processing.streamprocessor.writers.StateWriter) ExecutableFlowElement(io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableFlowElement) DeployedProcess(io.camunda.zeebe.engine.state.deployment.DeployedProcess) BpmnProcessingException(io.camunda.zeebe.engine.processing.bpmn.BpmnProcessingException)

Example 3 with ExecutableCallActivity

use of io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableCallActivity in project zeebe by camunda-cloud.

the class CallActivityTransformer method transform.

@Override
public void transform(final CallActivity element, final TransformContext context) {
    final ExecutableProcess process = context.getCurrentProcess();
    final ExecutableCallActivity callActivity = process.getElementById(element.getId(), ExecutableCallActivity.class);
    transformProcessId(element, callActivity, context.getExpressionLanguage());
}
Also used : ExecutableProcess(io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableProcess) ExecutableCallActivity(io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableCallActivity)

Example 4 with ExecutableCallActivity

use of io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableCallActivity in project zeebe by camunda-cloud.

the class BpmnStateTransitionBehavior method getParentProcessScope.

private ExecutableCallActivity getParentProcessScope(final BpmnElementContext callActivityContext, final BpmnElementContext childContext) {
    final var processDefinitionKey = callActivityContext.getProcessDefinitionKey();
    final var elementId = callActivityContext.getElementId();
    return stateBehavior.getProcess(processDefinitionKey).map(DeployedProcess::getProcess).map(process -> process.getElementById(elementId, BpmnElementType.CALL_ACTIVITY, ExecutableCallActivity.class)).orElseThrow(() -> new BpmnProcessingException(childContext, String.format(NO_PROCESS_FOUND_MESSAGE, processDefinitionKey)));
}
Also used : BpmnElementContext(io.camunda.zeebe.engine.processing.bpmn.BpmnElementContext) ExecutableFlowNode(io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableFlowNode) TypedCommandWriter(io.camunda.zeebe.engine.processing.streamprocessor.writers.TypedCommandWriter) Arrays(java.util.Arrays) ProcessInstanceIntent(io.camunda.zeebe.protocol.record.intent.ProcessInstanceIntent) KeyGenerator(io.camunda.zeebe.engine.state.KeyGenerator) ElementInstanceState(io.camunda.zeebe.engine.state.immutable.ElementInstanceState) ProcessInstanceLifecycle(io.camunda.zeebe.engine.processing.bpmn.ProcessInstanceLifecycle) Function(java.util.function.Function) BpmnProcessingException(io.camunda.zeebe.engine.processing.bpmn.BpmnProcessingException) BpmnElementContainerProcessor(io.camunda.zeebe.engine.processing.bpmn.BpmnElementContainerProcessor) DeployedProcess(io.camunda.zeebe.engine.state.deployment.DeployedProcess) ProcessInstanceRecord(io.camunda.zeebe.protocol.impl.record.value.processinstance.ProcessInstanceRecord) ExecutableCallActivity(io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableCallActivity) BpmnElementType(io.camunda.zeebe.protocol.record.value.BpmnElementType) Failure(io.camunda.zeebe.engine.processing.common.Failure) ProcessEngineMetrics(io.camunda.zeebe.engine.metrics.ProcessEngineMetrics) Writers(io.camunda.zeebe.engine.processing.streamprocessor.writers.Writers) Either(io.camunda.zeebe.util.Either) ExecutableSequenceFlow(io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableSequenceFlow) StateWriter(io.camunda.zeebe.engine.processing.streamprocessor.writers.StateWriter) ExecutableFlowElement(io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableFlowElement) DeployedProcess(io.camunda.zeebe.engine.state.deployment.DeployedProcess) BpmnProcessingException(io.camunda.zeebe.engine.processing.bpmn.BpmnProcessingException)

Example 5 with ExecutableCallActivity

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

the class CallActivityTransformer method transform.

@Override
public void transform(final CallActivity element, final TransformContext context) {
    final ExecutableProcess process = context.getCurrentProcess();
    final ExecutableCallActivity callActivity = process.getElementById(element.getId(), ExecutableCallActivity.class);
    transformProcessId(element, callActivity, context.getExpressionLanguage());
}
Also used : ExecutableProcess(io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableProcess) ExecutableCallActivity(io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableCallActivity)

Aggregations

ExecutableCallActivity (io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableCallActivity)6 ProcessEngineMetrics (io.camunda.zeebe.engine.metrics.ProcessEngineMetrics)3 BpmnElementContainerProcessor (io.camunda.zeebe.engine.processing.bpmn.BpmnElementContainerProcessor)3 BpmnElementContext (io.camunda.zeebe.engine.processing.bpmn.BpmnElementContext)3 BpmnProcessingException (io.camunda.zeebe.engine.processing.bpmn.BpmnProcessingException)3 ProcessInstanceLifecycle (io.camunda.zeebe.engine.processing.bpmn.ProcessInstanceLifecycle)3 Failure (io.camunda.zeebe.engine.processing.common.Failure)3 ExecutableFlowElement (io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableFlowElement)3 ExecutableFlowNode (io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableFlowNode)3 ExecutableProcess (io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableProcess)3 ExecutableSequenceFlow (io.camunda.zeebe.engine.processing.deployment.model.element.ExecutableSequenceFlow)3 StateWriter (io.camunda.zeebe.engine.processing.streamprocessor.writers.StateWriter)3 TypedCommandWriter (io.camunda.zeebe.engine.processing.streamprocessor.writers.TypedCommandWriter)3 Writers (io.camunda.zeebe.engine.processing.streamprocessor.writers.Writers)3 KeyGenerator (io.camunda.zeebe.engine.state.KeyGenerator)3 DeployedProcess (io.camunda.zeebe.engine.state.deployment.DeployedProcess)3 ElementInstanceState (io.camunda.zeebe.engine.state.immutable.ElementInstanceState)3 ProcessInstanceRecord (io.camunda.zeebe.protocol.impl.record.value.processinstance.ProcessInstanceRecord)3 ProcessInstanceIntent (io.camunda.zeebe.protocol.record.intent.ProcessInstanceIntent)3 BpmnElementType (io.camunda.zeebe.protocol.record.value.BpmnElementType)3