Filter¶
This module provides access to the filter REST api of Camunda.
Filter¶
GetList¶
-
class
pycamunda.filter.
GetList
(url: str, id_: Optional[str] = None, name: Optional[str] = None, name_like: Optional[str] = None, owner: Optional[str] = None, item_count: 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 filters using a list of parameters. The size of the result set can be retrieved by using the Get Count request.
Parameters: - url – Camunda Rest engine URL.
- id – Id of the filter.
- name – Filter by the name of the filter.
- name_like – Filter by a substring of the name of the filter.
- owner – Filter by the user id of the owner of the filter.
- item_count – Return the number of items matched by the respective filters.
- sort_by – Sort the results by id_, first_name, last_name or email of the user.
- 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.filter.Filter]¶ Send the request
Count¶
-
class
pycamunda.filter.
Count
(url: str, id_: Optional[str] = None, name: Optional[str] = None, name_like: Optional[str] = None, owner: Optional[str] = None)¶ Count filters.
Parameters: - url – Camunda Rest engine URL.
- id – Id of the filter.
- name – Filter by the name of the filter.
- name_like – Filter by a substring of the name of the filter.
- owner – Filter by the user id of the owner of the filter.
-
__call__
(*args, **kwargs) → int¶ Send the request
Get¶
-
class
pycamunda.filter.
Get
(url: str, id_: str, item_count: bool = False)¶ Query for a filter.
Parameters: - url – Camunda Rest engine URL.
- id – Id of the filter.
- item_count – Return the number of items matched by the respective filter.
-
__call__
(*args, **kwargs) → pycamunda.filter.Filter¶ Send the request
Create¶
-
class
pycamunda.filter.
Create
(url: str, name: str, owner: Optional[str] = None)¶ Create a new filter.
Parameters: - url – Camunda Rest engine URL.
- name – Name of the filter.
- owner – User id of the owner of the filter.
-
__call__
(*args, **kwargs) → pycamunda.filter.Filter¶ Send the request
-
add_case_definition_criteria
(id_: str = Ellipsis, key: str = Ellipsis, name: str = Ellipsis, name_like: str = Ellipsis) → None¶ Add criteria that filter by the case definition.
Parameters: - id – Filter by the id of the case definition.
- key – Filter by the key of the case definition.
- name – Filter by the name of the case definition.
- name_like – Filter by a substring of the name of the case definition.
-
add_case_instance_criteria
(id_: str = Ellipsis, business_key: str = Ellipsis, business_key_like: str = Ellipsis)¶ Add criteria that filter by the case instance.
Parameters: - id – Filter by the id of the case instance.
- business_key – Filter by the business key of the case instance.
- business_key_like – Filter by a substring of the business key of the case instance.
-
add_datetime_criteria
(created_before: datetime.datetime = Ellipsis, created_after: datetime.datetime = Ellipsis, due_before: datetime.datetime = Ellipsis, due_after: datetime.datetime = Ellipsis, follow_up_after: datetime.datetime = Ellipsis, follow_up_before: datetime.datetime = Ellipsis, follow_up_before_or_not_existent: datetime.datetime = Ellipsis) → None¶ Add criteria that filter by datetime. Datetime objects are expected to contain timezone information.
Parameters: - created_before – Filter by tasks that were created before the given date.
- created_after – Filter by tasks that were created after the given date.
- due_before – Filter by tasks where due date has already passed at given date.
- due_after – Filter by tasks where due date has not passed at given date.
- follow_up_after – Filter by tasks that have a follow up date that has not passed yet at given date.
- follow_up_before – Filter by tasks that have a follow up date that has already passed at given date.
- follow_up_before_or_not_existent – Filter by tasks that do not have a follow up date or one that has already passed.
-
add_other_criteria
(active: bool = Ellipsis, activity_instance_id_in: Iterable[str] = Ellipsis, execution_id: str = Ellipsis) → None¶ Add criteria that filter by active status, activity instance or execution id.
Parameters: - active – Filter only active tasks.
- activity_instance_id_in – Filter by activity instance ids.
- execution_id – Filter by the execution id.
-
add_process_definition_criteria
(id_: str = Ellipsis, key: str = Ellipsis, key_in: Iterable[str] = Ellipsis, name: str = Ellipsis, name_like: str = Ellipsis) → None¶ Add criteria that filter by the process definition.
Parameters: - id – Filter by the id of the process definition.
- key – Filter by the key of the process definition.
- key_in – Filter by a substring of the key of the process definition.
- name – Filter by the name of the process definition.
- name_like – Filter by a substring of the name of the process definition.
-
add_process_instance_criteria
(id_: str = Ellipsis, business_key: str = Ellipsis, business_key_like: str = Ellipsis) → None¶ Add criteria that filter by process instance.
Parameters: - id – Filter by the id of the process instance.
- business_key – Filter by the business key of the process instance.
- business_key_like – Filter by a substring of the business key of the filter.
-
add_task_criteria
(definition_key: str = Ellipsis, definition_key_in: Iterable[str] = Ellipsis, definition_key_like: str = Ellipsis, task_name: str = Ellipsis, task_name_like: str = Ellipsis, description: str = Ellipsis, description_like: str = Ellipsis, priority: int = Ellipsis, max_priority: int = Ellipsis, min_priority: int = Ellipsis, tenant_id_in: Iterable[str] = Ellipsis, without_tenant_id: bool = False) → None¶ Add criteria that filter by task.
Parameters: - definition_key – Filter by the definition key of the task.
- definition_key_in – Filter whether definition key of the task is one of multiple ones.
- definition_key_like – Filter by a substring of the definition key of the task.
- task_name – Filter by the name of the task.
- task_name_like – Filter by a substring of the name of the task.
- description – Filter by the description of the task.
- description_like – Filter by a substring of the description of the task.
- priority – Filter by the priority of the task.
- max_priority – Filter by a maximum priority of the task.
- min_priority – Filter by a minimum priority of the task.
- tenant_id_in – Filter whether the tenant id is one of multiple ones.
- without_tenant_id – Filter only tasks without tenant id.
-
add_user_criteria
(assignee: str = Ellipsis, assignee_in: Iterable[str] = Ellipsis, assignee_like: str = Ellipsis, task_owner: str = Ellipsis, candidate_group: str = Ellipsis, candidate_groups: Iterable[str] = Ellipsis, candidate_user: str = Ellipsis, involved_user: str = Ellipsis, unassigned: bool = Ellipsis, delegation_state: Union[str, pycamunda.task.DelegationState] = Ellipsis) → None¶ Add criteria that filter by user.
Parameters: - assignee – Filter by the assignee of the task.
- assignee_in – Filter whether assignee of the task is one of multiple ones.
- assignee_like – Filter by a substring of the assignee of the task.
- task_owner – Filter by the owner of the task.
- candidate_group – Filter by the candidate group of the task.
- candidate_groups – Filter whether the candidate group of the task is one of multiple ones.
- candidate_user – Filter by the candidate user of the task.
- involved_user – TODO
- unassigned – Filter only unassigned tasks.
- delegation_state – Filter by delegation state.
Update¶
-
class
pycamunda.filter.
Update
(url: str, id_: str, name: Optional[str] = None, owner: Optional[str] = None)¶ Update a filter.
Parameters: - url – Camunda Rest engine URL.
- id – Id of the filter.
- name – Name of the filter.
- owner – User id of the owner of the filter.
-
__call__
(*args, **kwargs) → None¶ Send the request
-
add_case_definition_criteria
(id_: str = Ellipsis, key: str = Ellipsis, name: str = Ellipsis, name_like: str = Ellipsis) → None¶ Add criteria that filter by the case definition.
Parameters: - id – Filter by the id of the case definition.
- key – Filter by the key of the case definition.
- name – Filter by the name of the case definition.
- name_like – Filter by a substring of the name of the case definition.
-
add_case_instance_criteria
(id_: str = Ellipsis, business_key: str = Ellipsis, business_key_like: str = Ellipsis)¶ Add criteria that filter by the case instance.
Parameters: - id – Filter by the id of the case instance.
- business_key – Filter by the business key of the case instance.
- business_key_like – Filter by a substring of the business key of the case instance.
-
add_datetime_criteria
(created_before: datetime.datetime = Ellipsis, created_after: datetime.datetime = Ellipsis, due_before: datetime.datetime = Ellipsis, due_after: datetime.datetime = Ellipsis, follow_up_after: datetime.datetime = Ellipsis, follow_up_before: datetime.datetime = Ellipsis, follow_up_before_or_not_existent: datetime.datetime = Ellipsis) → None¶ Add criteria that filter by datetime. Datetime objects are expected to contain timezone information.
Parameters: - created_before – Filter by tasks that were created before the given date.
- created_after – Filter by tasks that were created after the given date.
- due_before – Filter by tasks where due date has already passed at given date.
- due_after – Filter by tasks where due date has not passed at given date.
- follow_up_after – Filter by tasks that have a follow up date that has not passed yet at given date.
- follow_up_before – Filter by tasks that have a follow up date that has already passed at given date.
- follow_up_before_or_not_existent – Filter by tasks that do not have a follow up date or one that has already passed.
-
add_other_criteria
(active: bool = Ellipsis, activity_instance_id_in: Iterable[str] = Ellipsis, execution_id: str = Ellipsis) → None¶ Add criteria that filter by active status, activity instance or execution id.
Parameters: - active – Filter only active tasks.
- activity_instance_id_in – Filter by activity instance ids.
- execution_id – Filter by the execution id.
-
add_process_definition_criteria
(id_: str = Ellipsis, key: str = Ellipsis, key_in: Iterable[str] = Ellipsis, name: str = Ellipsis, name_like: str = Ellipsis) → None¶ Add criteria that filter by the process definition.
Parameters: - id – Filter by the id of the process definition.
- key – Filter by the key of the process definition.
- key_in – Filter by a substring of the key of the process definition.
- name – Filter by the name of the process definition.
- name_like – Filter by a substring of the name of the process definition.
-
add_process_instance_criteria
(id_: str = Ellipsis, business_key: str = Ellipsis, business_key_like: str = Ellipsis) → None¶ Add criteria that filter by process instance.
Parameters: - id – Filter by the id of the process instance.
- business_key – Filter by the business key of the process instance.
- business_key_like – Filter by a substring of the business key of the filter.
-
add_task_criteria
(definition_key: str = Ellipsis, definition_key_in: Iterable[str] = Ellipsis, definition_key_like: str = Ellipsis, task_name: str = Ellipsis, task_name_like: str = Ellipsis, description: str = Ellipsis, description_like: str = Ellipsis, priority: int = Ellipsis, max_priority: int = Ellipsis, min_priority: int = Ellipsis, tenant_id_in: Iterable[str] = Ellipsis, without_tenant_id: bool = False) → None¶ Add criteria that filter by task.
Parameters: - definition_key – Filter by the definition key of the task.
- definition_key_in – Filter whether definition key of the task is one of multiple ones.
- definition_key_like – Filter by a substring of the definition key of the task.
- task_name – Filter by the name of the task.
- task_name_like – Filter by a substring of the name of the task.
- description – Filter by the description of the task.
- description_like – Filter by a substring of the description of the task.
- priority – Filter by the priority of the task.
- max_priority – Filter by a maximum priority of the task.
- min_priority – Filter by a minimum priority of the task.
- tenant_id_in – Filter whether the tenant id is one of multiple ones.
- without_tenant_id – Filter only tasks without tenant id.
-
add_user_criteria
(assignee: str = Ellipsis, assignee_in: Iterable[str] = Ellipsis, assignee_like: str = Ellipsis, task_owner: str = Ellipsis, candidate_group: str = Ellipsis, candidate_groups: Iterable[str] = Ellipsis, candidate_user: str = Ellipsis, involved_user: str = Ellipsis, unassigned: bool = Ellipsis, delegation_state: Union[str, pycamunda.task.DelegationState] = Ellipsis) → None¶ Add criteria that filter by user.
Parameters: - assignee – Filter by the assignee of the task.
- assignee_in – Filter whether assignee of the task is one of multiple ones.
- assignee_like – Filter by a substring of the assignee of the task.
- task_owner – Filter by the owner of the task.
- candidate_group – Filter by the candidate group of the task.
- candidate_groups – Filter whether the candidate group of the task is one of multiple ones.
- candidate_user – Filter by the candidate user of the task.
- involved_user – TODO
- unassigned – Filter only unassigned tasks.
- delegation_state – Filter by delegation state.
Delete¶
Execute¶
-
class
pycamunda.filter.
Execute
(url: str, id_: str, single_result: bool = False)¶ Execute a filter.
Parameters: - url – Camunda Rest engine URL.
- id – Id of the filter.
-
__call__
(*args, **kwargs) → Union[pycamunda.task.Task, Tuple[pycamunda.task.Task]]¶ Send the request.
-
add_case_definition_criteria
(id_: str = Ellipsis, key: str = Ellipsis, name: str = Ellipsis, name_like: str = Ellipsis) → None¶ Add criteria that filter by the case definition.
Parameters: - id – Filter by the id of the case definition.
- key – Filter by the key of the case definition.
- name – Filter by the name of the case definition.
- name_like – Filter by a substring of the name of the case definition.
-
add_case_instance_criteria
(id_: str = Ellipsis, business_key: str = Ellipsis, business_key_like: str = Ellipsis)¶ Add criteria that filter by the case instance.
Parameters: - id – Filter by the id of the case instance.
- business_key – Filter by the business key of the case instance.
- business_key_like – Filter by a substring of the business key of the case instance.
-
add_datetime_criteria
(created_before: datetime.datetime = Ellipsis, created_after: datetime.datetime = Ellipsis, due_before: datetime.datetime = Ellipsis, due_after: datetime.datetime = Ellipsis, follow_up_after: datetime.datetime = Ellipsis, follow_up_before: datetime.datetime = Ellipsis, follow_up_before_or_not_existent: datetime.datetime = Ellipsis) → None¶ Add criteria that filter by datetime. Datetime objects are expected to contain timezone information.
Parameters: - created_before – Filter by tasks that were created before the given date.
- created_after – Filter by tasks that were created after the given date.
- due_before – Filter by tasks where due date has already passed at given date.
- due_after – Filter by tasks where due date has not passed at given date.
- follow_up_after – Filter by tasks that have a follow up date that has not passed yet at given date.
- follow_up_before – Filter by tasks that have a follow up date that has already passed at given date.
- follow_up_before_or_not_existent – Filter by tasks that do not have a follow up date or one that has already passed.
-
add_other_criteria
(active: bool = Ellipsis, activity_instance_id_in: Iterable[str] = Ellipsis, execution_id: str = Ellipsis) → None¶ Add criteria that filter by active status, activity instance or execution id.
Parameters: - active – Filter only active tasks.
- activity_instance_id_in – Filter by activity instance ids.
- execution_id – Filter by the execution id.
-
add_process_definition_criteria
(id_: str = Ellipsis, key: str = Ellipsis, key_in: Iterable[str] = Ellipsis, name: str = Ellipsis, name_like: str = Ellipsis) → None¶ Add criteria that filter by the process definition.
Parameters: - id – Filter by the id of the process definition.
- key – Filter by the key of the process definition.
- key_in – Filter by a substring of the key of the process definition.
- name – Filter by the name of the process definition.
- name_like – Filter by a substring of the name of the process definition.
-
add_process_instance_criteria
(id_: str = Ellipsis, business_key: str = Ellipsis, business_key_like: str = Ellipsis) → None¶ Add criteria that filter by process instance.
Parameters: - id – Filter by the id of the process instance.
- business_key – Filter by the business key of the process instance.
- business_key_like – Filter by a substring of the business key of the filter.
-
add_task_criteria
(definition_key: str = Ellipsis, definition_key_in: Iterable[str] = Ellipsis, definition_key_like: str = Ellipsis, task_name: str = Ellipsis, task_name_like: str = Ellipsis, description: str = Ellipsis, description_like: str = Ellipsis, priority: int = Ellipsis, max_priority: int = Ellipsis, min_priority: int = Ellipsis, tenant_id_in: Iterable[str] = Ellipsis, without_tenant_id: bool = False) → None¶ Add criteria that filter by task.
Parameters: - definition_key – Filter by the definition key of the task.
- definition_key_in – Filter whether definition key of the task is one of multiple ones.
- definition_key_like – Filter by a substring of the definition key of the task.
- task_name – Filter by the name of the task.
- task_name_like – Filter by a substring of the name of the task.
- description – Filter by the description of the task.
- description_like – Filter by a substring of the description of the task.
- priority – Filter by the priority of the task.
- max_priority – Filter by a maximum priority of the task.
- min_priority – Filter by a minimum priority of the task.
- tenant_id_in – Filter whether the tenant id is one of multiple ones.
- without_tenant_id – Filter only tasks without tenant id.
-
add_user_criteria
(assignee: str = Ellipsis, assignee_in: Iterable[str] = Ellipsis, assignee_like: str = Ellipsis, task_owner: str = Ellipsis, candidate_group: str = Ellipsis, candidate_groups: Iterable[str] = Ellipsis, candidate_user: str = Ellipsis, involved_user: str = Ellipsis, unassigned: bool = Ellipsis, delegation_state: Union[str, pycamunda.task.DelegationState] = Ellipsis) → None¶ Add criteria that filter by user.
Parameters: - assignee – Filter by the assignee of the task.
- assignee_in – Filter whether assignee of the task is one of multiple ones.
- assignee_like – Filter by a substring of the assignee of the task.
- task_owner – Filter by the owner of the task.
- candidate_group – Filter by the candidate group of the task.
- candidate_groups – Filter whether the candidate group of the task is one of multiple ones.
- candidate_user – Filter by the candidate user of the task.
- involved_user – TODO
- unassigned – Filter only unassigned tasks.
- delegation_state – Filter by delegation state.