Message

This module provides access to the message REST api of Camunda.

MessageCorrelationResult

class pycamunda.message.MessageCorrelationResult(result_type: pycamunda.message.ResultType, process_instance: Optional[pycamunda.processinst.ProcessInstance] = None, execution: Optional[pycamunda.execution.Execution] = None, variables: Optional[Tuple[pycamunda.variable.Variable]] = None)

Data class of message correlation result as returned by the REST api of Camunda.

execution = None
process_instance = None
variables = None

CorrelateSingle

class pycamunda.message.CorrelateSingle(url: str, message_name: str, business_key: Optional[str] = None, tenant_id: Optional[str] = None, without_tenant_id: bool = False, process_instance_id: Optional[str] = None, result_enabled: bool = False, variables_in_result_enabled: bool = False)

Correlate a message to one or multiple entities. Entities are executions and process definitions.

Parameters:
  • url – Camunda Rest engine URL.
  • message_name – Name of the message to correlate.
  • all – Whether to correlate the message to all or just one entity.
  • business_key – Correlate only to executions that belong to a process instance with the provided business key.
  • tenant_id – Correlate only to entities which belong to the provided tenant.
  • without_tenant_id – Whether to correlate only to entities that belong to no tenant.
  • process_instance_id – Correlate only to a specific process instance.
  • result_enabled – Whether to return message correlation results.
  • variables_in_result_enabled – Whether the returned message correlation results contain process instance variables.
__call__(*args, **kwargs) → Tuple[pycamunda.message.MessageCorrelationResult]

Send the request.

add_correlation_key(name: str, value: Any, type_: Optional[str] = None) → None

Add a correlation key. Used for correlation of process instances that wait for incoming messages. Only global process instance variables are considered.

Parameters:
  • name – Name of the variable.
  • value – Value of the variable.
  • type – Type of the variable.
add_local_correlation_key(name: str, value: Any, type_: Optional[str] = None) → None

Add a correlation key. Used for correlation of process instances that wait for incoming messages. Only variables in the execution scope are considered.

Parameters:
  • name – Name of the variable.
  • value – Value of the variable.
  • type – Type of the variable.
add_local_process_variable(name: str, value: Any, type_: Optional[str] = None, value_info: Optional[Mapping[KT, VT_co]] = None) → None

Add local variables to the process after correlating the message.

Parameters:
  • name – Name of the variable.
  • value – Value of the variable.
  • type – Value type of the variable.
  • value_info – Additional information regarding the value type.
add_process_variable(name: str, value: Any, type_: Optional[str] = None, value_info: Optional[Mapping[KT, VT_co]] = None) → None

Add variables to the process after correlating the message.

Parameters:
  • name – Name of the variable.
  • value – Value of the variable.
  • type – Value type of the variable.
  • value_info – Additional information regarding the value type.

CorrelateAll

class pycamunda.message.CorrelateAll(url: str, message_name: str, business_key: Optional[str] = None, tenant_id: Optional[str] = None, without_tenant_id: bool = False, process_instance_id: Optional[str] = None, result_enabled: bool = False, variables_in_result_enabled: bool = False)

Correlate a message to one or multiple entities. Entities are executions and process definitions.

Parameters:
  • url – Camunda Rest engine URL.
  • message_name – Name of the message to correlate.
  • all – Whether to correlate the message to all or just one entity.
  • business_key – Correlate only to executions that belong to a process instance with the provided business key.
  • tenant_id – Correlate only to entities which belong to the provided tenant.
  • without_tenant_id – Whether to correlate only to entities that belong to no tenant.
  • process_instance_id – Correlate only to a specific process instance.
  • result_enabled – Whether to return message correlation results.
  • variables_in_result_enabled – Whether the returned message correlation results contain process instance variables.
__call__(*args, **kwargs) → Tuple[pycamunda.message.MessageCorrelationResult]

Send the request.

add_correlation_key(name: str, value: Any, type_: Optional[str] = None) → None

Add a correlation key. Used for correlation of process instances that wait for incoming messages. Only global process instance variables are considered.

Parameters:
  • name – Name of the variable.
  • value – Value of the variable.
  • type – Type of the variable.
add_local_correlation_key(name: str, value: Any, type_: Optional[str] = None) → None

Add a correlation key. Used for correlation of process instances that wait for incoming messages. Only variables in the execution scope are considered.

Parameters:
  • name – Name of the variable.
  • value – Value of the variable.
  • type – Type of the variable.
add_local_process_variable(name: str, value: Any, type_: Optional[str] = None, value_info: Optional[Mapping[KT, VT_co]] = None) → None

Add local variables to the process after correlating the message.

Parameters:
  • name – Name of the variable.
  • value – Value of the variable.
  • type – Value type of the variable.
  • value_info – Additional information regarding the value type.
add_process_variable(name: str, value: Any, type_: Optional[str] = None, value_info: Optional[Mapping[KT, VT_co]] = None) → None

Add variables to the process after correlating the message.

Parameters:
  • name – Name of the variable.
  • value – Value of the variable.
  • type – Value type of the variable.
  • value_info – Additional information regarding the value type.