Zeebe Adapter Reference

class pyzeebe.grpc_internals.zeebe_adapter.ZeebeAdapter(grpc_channel: Channel, max_connection_retries: int = -1)
__init__(grpc_channel: Channel, max_connection_retries: int = -1)
async activate_jobs(task_type: str, worker: str, timeout: int, max_jobs_to_activate: int, variables_to_fetch: Iterable[str], request_timeout: int, tenant_ids: Iterable[str] | None = None) AsyncGenerator[Job]
async broadcast_signal(signal_name: str, variables: Variables, tenant_id: str | None = None) BroadcastSignalResponse
async cancel_process_instance(process_instance_key: int) CancelProcessInstanceResponse
async complete_job(job_key: int, variables: Variables) CompleteJobResponse
property connected: bool
async create_process_instance(bpmn_process_id: str, version: int, variables: Variables, tenant_id: str | None = None) CreateProcessInstanceResponse
async create_process_instance_with_result(bpmn_process_id: str, version: int, variables: Variables, timeout: int, variables_to_fetch: Iterable[str], tenant_id: str | None = None) CreateProcessInstanceWithResultResponse
async deploy_resource(*resource_file_path: str | PathLike[str], tenant_id: str | None = None) DeployResourceResponse
async evaluate_decision(decision_key: int | None, decision_id: str | None, variables: Variables, tenant_id: str | None = None) EvaluateDecisionResponse
async fail_job(job_key: int, retries: int, message: str, retry_back_off_ms: int, variables: Variables) FailJobResponse
async publish_message(name: str, correlation_key: str, time_to_live_in_milliseconds: int, variables: Variables, message_id: str | None = None, tenant_id: str | None = None) PublishMessageResponse
async throw_error(job_key: int, message: str, variables: Variables, error_code: str = '') ThrowErrorResponse
async topology() TopologyResponse

Zeebe GRPC Responses

class pyzeebe.grpc_internals.types.CreateProcessInstanceResponse(process_definition_key: 'int', bpmn_process_id: 'str', version: 'int', process_instance_key: 'int', tenant_id: 'str | None')
process_definition_key: int

the key of the process definition which was used to create the process instance

bpmn_process_id: str

the BPMN process ID of the process definition which was used to create the process instance

version: int

the version of the process definition which was used to create the process instance

process_instance_key: int

the unique identifier of the created process instance; to be used wherever a request needs a process instance key (e.g. CancelProcessInstanceRequest)

tenant_id: str | None

the tenant ID of the created process instance

class pyzeebe.grpc_internals.types.CreateProcessInstanceWithResultResponse(process_definition_key: 'int', bpmn_process_id: 'str', version: 'int', process_instance_key: 'int', variables: 'Variables', tenant_id: 'str | None')
process_definition_key: int

the key of the process definition which was used to create the process instance

bpmn_process_id: str

the BPMN process ID of the process definition which was used to create the process instance

version: int

the version of the process definition which was used to create the process instance

process_instance_key: int

the unique identifier of the created process instance; to be used wherever a request needs a process instance key (e.g. CancelProcessInstanceRequest)

variables: Mapping[str, Mapping[str, Mapping[str, JsonType] | Sequence[JsonType] | str | int | float | bool | None] | Sequence[Mapping[str, JsonType] | Sequence[JsonType] | str | int | float | bool | None] | str | int | float | bool | None]

consisting of all visible variables to the root scope

tenant_id: str | None

the tenant ID of the created process instance

class pyzeebe.grpc_internals.types.CancelProcessInstanceResponse
class pyzeebe.grpc_internals.types.DeployResourceResponse(key: 'int', deployments: 'list[ProcessMetadata | DecisionMetadata | DecisionRequirementsMetadata | FormMetadata]', tenant_id: 'str | None')
class ProcessMetadata(bpmn_process_id: 'str', version: 'int', process_definition_key: 'int', resource_name: 'str', tenant_id: 'str | None')
bpmn_process_id: str

the bpmn process ID, as parsed during deployment; together with the version forms a unique identifier for a specific process definition

version: int

the assigned process version

process_definition_key: int

the assigned key, which acts as a unique identifier for this process

resource_name: str

the resource name from which this process was parsed

tenant_id: str | None

the tenant ID of the deployed process

class DecisionMetadata(dmn_decision_id: 'str', dmn_decision_name: 'str', version: 'int', decision_key: 'int', dmn_decision_requirements_id: 'str', decision_requirements_key: 'int', tenant_id: 'str | None')
dmn_decision_id: str

the dmn decision ID, as parsed during deployment; together with the versions forms a unique identifier for a specific decision

dmn_decision_name: str

the dmn name of the decision, as parsed during deployment

version: int

the assigned decision version

decision_key: int

the assigned decision key, which acts as a unique identifier for this decision

dmn_decision_requirements_id: str

the dmn ID of the decision requirements graph that this decision is part of, as parsed during deployment

decision_requirements_key: int

the assigned key of the decision requirements graph that this decision is part of

tenant_id: str | None

the tenant ID of the deployed decision

class DecisionRequirementsMetadata(dmn_decision_requirements_id: 'str', dmn_decision_requirements_name: 'str', version: 'int', decision_requirements_key: 'int', resource_name: 'str', tenant_id: 'str | None')
dmn_decision_requirements_id: str

the dmn decision requirements ID, as parsed during deployment; together with the versions forms a unique identifier for a specific decision

dmn_decision_requirements_name: str

the dmn name of the decision requirements, as parsed during deployment

version: int

the assigned decision requirements version

decision_requirements_key: int

the assigned decision requirements key, which acts as a unique identifier for this decision requirements

resource_name: str

the resource name from which this decision requirements was parsed

tenant_id: str | None

the tenant ID of the deployed decision requirements

class FormMetadata(form_id: 'str', version: 'int', form_key: 'int', resource_name: 'str', tenant_id: 'str | None')
form_id: str

the form ID, as parsed during deployment; together with the versions forms a unique identifier for a specific form

version: int

the assigned form version

form_key: int

the assigned key, which acts as a unique identifier for this form

resource_name: str

the resource name

tenant_id: str | None

the tenant ID of the deployed form

key: int

the unique key identifying the deployment

deployments: list[ProcessMetadata | DecisionMetadata | DecisionRequirementsMetadata | FormMetadata]

a list of deployed resources, e.g. processes

tenant_id: str | None

the tenant ID of the deployed resources

class pyzeebe.grpc_internals.types.EvaluateDecisionResponse(decision_key: 'int', decision_id: 'str', decision_name: 'str', decision_version: 'int', decision_requirements_id: 'str', decision_requirements_key: 'int', decision_output: 'JsonType', evaluated_decisions: 'list[EvaluatedDecision]', failed_decision_id: 'str', failure_message: 'str', tenant_id: 'str | None', decision_instance_key: 'int')
class EvaluatedDecision(decision_key: 'int', decision_id: 'str', decision_name: 'str', decision_version: 'int', decision_type: 'str', decision_output: 'JsonType', matched_rules: 'list[MatchedDecisionRule]', evaluated_inputs: 'list[EvaluatedDecisionInput]', tenant_id: 'str | None')
class MatchedDecisionRule(rule_id: 'str', rule_index: 'int', evaluated_outputs: 'list[EvaluatedDecisionOutput]')
class EvaluatedDecisionOutput(output_id: 'str', output_name: 'str', output_value: 'JsonType')
output_id: str

the id of the evaluated decision output

output_name: str

the name of the evaluated decision output

output_value: Mapping[str, JsonType] | Sequence[JsonType] | str | int | float | bool | None

the value of the evaluated decision output

rule_id: str

the id of the matched rule

rule_index: int

the index of the matched rule

evaluated_outputs: list[EvaluatedDecisionOutput]

the evaluated decision outputs

class EvaluatedDecisionInput(input_id: 'str', input_name: 'str', input_value: 'JsonType')
input_id: str

the id of the evaluated decision input

input_name: str

the name of the evaluated decision input

input_value: Mapping[str, JsonType] | Sequence[JsonType] | str | int | float | bool | None

the value of the evaluated decision input

decision_key: int

the unique key identifying the decision which was evaluated (e.g. returned from a decision in the DeployResourceResponse message)

decision_id: str

the ID of the decision which was evaluated

decision_name: str

the name of the decision which was evaluated

decision_version: int

the version of the decision which was evaluated

decision_type: str

the type of the decision which was evaluated

decision_output: JsonType

JSON document that will instantiate the result of the decision which was evaluated; it will be a JSON object, as the result output will be mapped in a key-value fashion, e.g. { “a”: 1 }.

matched_rules: list[MatchedDecisionRule]

the decision rules that matched within this decision evaluation

evaluated_inputs: list[EvaluatedDecisionInput]

the decision inputs that were evaluated within this decision evaluation

tenant_id: str | None

the tenant identifier of the evaluated decision

decision_key: int

the unique key identifying the decision which was evaluated (e.g. returned from a decision in the DeployResourceResponse message)

decision_id: str

the ID of the decision which was evaluated

decision_name: str

the name of the decision which was evaluated

decision_version: int

the version of the decision which was evaluated

decision_requirements_id: str

the ID of the decision requirements graph that the decision which was evaluated is part of.

decision_requirements_key: int

the unique key identifying the decision requirements graph that the decision which was evaluated is part of.

decision_output: JsonType

JSON document that will instantiate the result of the decision which was evaluated; it will be a JSON object, as the result output will be mapped in a key-value fashion, e.g. { “a”: 1 }.

evaluated_decisions: list[EvaluatedDecision]

a list of decisions that were evaluated within the requested decision evaluation

failed_decision_id: str

an optional string indicating the ID of the decision which failed during evaluation

failure_message: str

an optional message describing why the decision which was evaluated failed

tenant_id: str | None

the tenant identifier of the evaluated decision

decision_instance_key: int

the unique key identifying this decision evaluation

class pyzeebe.grpc_internals.types.BroadcastSignalResponse(key: 'int', tenant_id: 'str | None')
key: int

the unique ID of the signal that was broadcasted

tenant_id: str | None

the tenant ID of the signal that was broadcasted

class pyzeebe.grpc_internals.types.PublishMessageResponse(key: 'int', tenant_id: 'str | None')
key: int

the unique ID of the message that was published

tenant_id: str | None

the tenant ID of the message

class pyzeebe.grpc_internals.types.CompleteJobResponse
class pyzeebe.grpc_internals.types.FailJobResponse
class pyzeebe.grpc_internals.types.ThrowErrorResponse
class pyzeebe.grpc_internals.types.TopologyResponse(brokers: 'list[BrokerInfo]', cluster_size: 'int', partitions_count: 'int', replication_factor: 'int', gateway_version: 'str')
class BrokerInfo(node_id: 'int', host: 'str', port: 'int', partitions: 'list[Partition]', version: 'str')
class Partition(partition_id: 'int', role: 'PartitionBrokerRole', health: 'PartitionBrokerHealth')
class PartitionBrokerRole(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Describes the Raft role of the broker for a given partition

LEADER = 0
FOLLOWER = 1
INACTIVE = 2
class PartitionBrokerHealth(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Describes the current health of the partition

HEALTHY = 0
UNHEALTHY = 1
DEAD = 2
partition_id: int

the unique ID of this partition

role: PartitionBrokerRole

the role of the broker for this partition

health: PartitionBrokerHealth

the health of this partition

node_id: int

unique (within a cluster) node ID for the broker

host: str

hostname of the broker

port: int

port for the broker

partitions: list[Partition]

list of partitions managed or replicated on this broker

version: str

broker version

brokers: list[BrokerInfo]

list of brokers part of this cluster

cluster_size: int

how many nodes are in the cluster

partitions_count: int

how many partitions are spread across the cluster

replication_factor: int

configured replication factor for this cluster

gateway_version: str

gateway version