kappa_sdk.user_tasks.Context#
- class kappa_sdk.user_tasks.Context(field_id=None, well_id=None, context_dict=None, workflow_id=None)[source]#
User task context.
Provides an ability to persist values between different runs of the User Task.
- Parameters:
field_id (str | None)
well_id (str | None)
context_dict (Dict[str, Any] | None)
workflow_id (str | None)
- __getitem__(key)[source]#
Gets the value associated with the specified string key.
If the value could not be found, a default one is returned. Only string keys are supported.
- Parameters:
key (str) – The name of the key.
- Raises:
TypeError – If key has an unexpected type.
- Return type:
Any | None
- __setitem__(key, value)[source]#
Sets the value for the specified string key.
Only string keys are supported.
- Parameters:
key (str) – The name of the key.
value (Any) – The value to save.
- Raises:
TypeError – If key has an unexpected type.
- Return type:
None
Attributes
Context.field_id
Gets the field id.
Context.well_id
Gets the well id.
Context.workflow_id
Gets the workflow id.
Methods
Context.dumps
()