Case Definition¶
This module provides access to the case definition REST api of Camunda.
CaseDefinition¶
-
class
pycamunda.casedef.
CaseDefinition
(id_: str, key: str, category: str, name: str, version: int, resource: str, deployment_id: str, tenant_id: str, history_time_to_live: int)¶ Data class of case definition as returned by the REST api of Camunda.
GetList¶
-
class
pycamunda.casedef.
GetList
(url: str, id_: Optional[str] = None, id_in: Optional[Iterable[str]] = None, name: Optional[str] = None, name_like: Optional[str] = None, deployment_id: Optional[str] = None, key: Optional[str] = None, key_like: Optional[str] = None, category: Optional[str] = None, category_like: Optional[str] = None, version: Optional[str] = None, latest_version: bool = False, resource_name: Optional[str] = None, resource_name_like: Optional[str] = None, tenant_id_in: Optional[Iterable[str]] = None, without_tenant_id: bool = False, include_without_tenant_id: bool = False, sort_by: Optional[str] = None, ascending: bool = True, first_result: Optional[int] = None, max_results: Optional[int] = None)¶ Query for a list of case definitions using a list of parameters. The size of the result set can be retrieved by using the Count method.
Parameters: - url – Camunda Rest engine URL.
- id – Filter by id.
- id_in – Filter whether the id is one of multiple ones.
- name – Filter by name.
- name_like – Filter by a substring of the name.
- deployment_id – Filter by deployment id.
- key – Key of the process definition.
- key_like – Filter by a substring of the key.
- category – Filter by category.
- category_like – Filter by a substring of the category.
- version – Filter by version.
- latest_version – Whether to include only the latest versions.
- resource_name – Filter by resource name.
- resource_name_like – Filter by a substring of the resource name.
- tenant_id_in – Filter whether the tenant id is one of multiple ones.
- without_tenant_id – Whether to include only case definitions that belong to no tenant.
- include_without_tenant_id – Whether to include case definitions that belong to no tenant.
- sort_by – Sort the results by ‘category’, ‘key’, ‘id_’, ‘name’, ‘version’, ‘deployment_id’ or ‘tenant_id’. Sorting by ‘version_tag’ is string-based.
- ascending – Sort order.
- first_result – Pagination of results. Index of the first result to return.
- max_results – Pagination of results. Maximum number of results to return.
-
__call__
(*args, **kwargs) → Tuple[pycamunda.casedef.CaseDefinition]¶ Send the request.
Count¶
-
class
pycamunda.casedef.
Count
(url: str, id_: Optional[str] = None, id_in: Optional[Iterable[str]] = None, name: Optional[str] = None, name_like: Optional[str] = None, deployment_id: Optional[str] = None, key: Optional[str] = None, key_like: Optional[str] = None, category: Optional[str] = None, category_like: Optional[str] = None, version: Optional[int] = None, latest_version: bool = False, resource_name: Optional[str] = None, resource_name_like: Optional[str] = None, tenant_id_in: Optional[Iterable[str]] = None, without_tenant_id: bool = False, include_without_tenant_id: bool = False)¶ Count case definitions.
Parameters: - url – Camunda Rest engine URL.
- id – Filter by id.
- id_in – Filter whether the id is one of multiple ones.
- name – Filter by name.
- name_like – Filter by a substring of the name.
- deployment_id – Filter by deployment id.
- key – Key of the case definition.
- key_like – Filter by a substring of the key.
- category – Filter by category.
- category_like – Filter by a substring of the category.
- version – Filter by version.
- latest_version – Whether to include only the latest versions.
- resource_name – Filter by resource name.
- resource_name_like – Filter by a substring of the resource name.
- tenant_id_in – Filter whether the tenant id is one of multiple ones.
- without_tenant_id – Whether to include only case definitions that belong to no tenant.
- include_without_tenant_id – Whether to include case definitions that belong to no tenant.
-
__call__
(*args, **kwargs) → int¶ Send the request.
Get¶
-
class
pycamunda.casedef.
Get
(url: str, id_: Optional[str] = None, key: Optional[str] = None, tenant_id: Optional[str] = None)¶ Get a case definition.
Parameters: - url – Camunda Rest engine URL.
- id – Id of the case definition.
- key – Key of the case definition.
- tenant_id – Id of the tenant the case definition belongs to.
-
__call__
(*args, **kwargs) → pycamunda.casedef.CaseDefinition¶ Send the request.
GetXML¶
-
class
pycamunda.casedef.
GetXML
(url: str, id_: Optional[str] = None, key: Optional[str] = None, tenant_id: Optional[str] = None)¶ Retrieve the CMMN XML of a case definition.
Parameters: - url – Camunda Rest engine URL.
- id – Id of the case definition.
- key – Key of the case definition.
- tenant_id – Id of the tenant the case definition belongs to.
-
__call__
(*args, **kwargs) → str¶ Send the request.
GetDiagram¶
-
class
pycamunda.casedef.
GetDiagram
(url: str, id_: Optional[str] = None, key: Optional[str] = None, tenant_id: Optional[str] = None)¶ Get the diagram of a case definition.
Parameters: - url – Camunda Rest engine URL.
- id – Id of the process definition.
- key – Key of the process definition.
-
__call__
(*args, **kwargs)¶ Send the request.
CreateInstance¶
-
class
pycamunda.casedef.
CreateInstance
(url: str, id_: Optional[str] = None, key: Optional[str] = None, tenant_id: Optional[str] = None, business_key: Optional[str] = None)¶ Create a case instance.
Parameters: - url – Camunda Rest engine URL.
- id – Id of the case definition.
- key – Key of the case definition.
- tenant_id – Id of the tenant the case definition belongs to.
- business_key – The business key to initialize the case instance with.
-
__call__
(*args, **kwargs) → pycamunda.caseinst.CaseInstance¶ Send the request.
-
add_variable
(name: str, value: Any, type_: Optional[str] = None, value_info: Optional[str] = None) → None¶ Add a variable to initialize the case instance with.
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.
UpdateHistoryTimeToLive¶
-
class
pycamunda.casedef.
UpdateHistoryTimeToLive
(url: str, history_time_to_live: int, id_: Optional[str] = None, key: Optional[str] = None, tenant_id: Optional[str] = None)¶ Update the history time to live of a case definition.
Parameters: - url – Camunda Rest engine URL.
- history_time_to_live – New history time to live. Can be set to ‘None’.
- id – Id of the case definition.
- key – Key of the case definition.
- tenant_id – Id of the tenant the case definition belongs to.
-
__call__
(*args, **kwargs) → None¶ Send the request.