Provided Methods
executeAsync
Description
Executes the workflow with the given ID and version, or with name and the given project ID and version asynchronously. Execute by name can be configured with force_exact_match and force_distinct. Use variables, if the workflow relies on them.
The WorkflowJob is returned immediately, even if the execution is still running. If version is not specified, the latest version is executed. Optional request options (request_transformers, response_transformers, timeout, verify, sleep_after_response_millis, deserializer) can be specified.
Returns: WorkflowJob
Parameters
Property | Type | Required | Default | Description |
---|---|---|---|---|
id | uuid.UUID | false | None | ID of the workflow |
version | uuid.UUID | false | None | version of the workflow |
name | str | false | None | name of the workflow |
project_id | uuid.UUID | false | None | Id of the project workflow belongs to. When execute by id, project_id will be ignored. |
force_exact_match | bool | false | True | Search for exact match, False: Data table includes the name |
force_distinct | bool | false | True | Raise exception if name is ambiguous, False: execute first match |
variable_assignments | [dict] | false | None | list of variable assignments |
Usage
# execute the workflow async
job: WorkflowJob = od.workflows.execute_async(id=workflow.id, variable_assignments=[
{"variableType": "integer", "variableName": "myVar", "variableValue": 5}])
executeSync
Description
Executes the workflow with the given ID and version, or with name and the given project ID and version synchronously. Execute by name can be configured with force_exact_match and force_distinct. Use variables, if the workflow relies on them. The WorkflowJob is not returned immediately. The SDK will request the WorkflowJob until a terminal state of the execution is reached. If version is not specified, the latest version is executed.
Optional request options (request_transformers, response_transformers, timeout, verify, sleep_after_response_millis, deserializer) can be specified.
Returns: WorkflowJob
Parameters
Property | Type | Required | Default | Description |
---|---|---|---|---|
id | uuid.UUID | false | None | ID of the workflow |
version | uuid.UUID | false | None | version of the workflow |
name | str | false | None | name of the workflow |
project_id | uuid.UUID | false | None | Id of the project workflow belongs to. When execute by id, project_id will be ignored. |
force_exact_match | bool | false | True | Search for exact match, False: Data table includes the name |
force_distinct | bool | false | True | Raise exception if name is ambiguous, False: execute first match |
variable_assignments | [dict] | false | None | list of variable assignments |
Usage
# execute the workflow sync
job: WorkflowJob = onedata_api.workflows.execute_sync(workflow.id)