PostRunTask#

class fews_py_wrapper._api.endpoints.PostRunTask[source]#
static endpoint_function(*, client, body=<fews_openapi_py_client.types.Unset object>, workflow_id, start_time=<fews_openapi_py_client.types.Unset object>, end_time=<fews_openapi_py_client.types.Unset object>, time_zero=<fews_openapi_py_client.types.Unset object>, cold_state_id=<fews_openapi_py_client.types.Unset object>, scenario_id=<fews_openapi_py_client.types.Unset object>, user_id=<fews_openapi_py_client.types.Unset object>, description=<fews_openapi_py_client.types.Unset object>, run_option=<fews_openapi_py_client.types.Unset object>, run_locally_and_promote_to_server=<fews_openapi_py_client.types.Unset object>)#

Runs a one-off task for a given workflowId

Runs a one-off task for a given workflowId. The application/x-www-form-urlencoded encoding has to be

used. Returns a handle to the task in the form of a taskId. This taskId can be used to track the status of the workflow using the taskrunstatus method. Since 2018.02 it is possible to use a workflow descriptor attribute: waitWhenAlreadyRunning. This will allow running a task that hasn’t been scheduled to wait when another task of that workflow is already running. Since 2022.02 properties can be included in the url. These will be used as taskRunProperties, and override global or workflow properties. Each property has to be added to the URL separately. Example: &property(fileName)=exportFile&property(outputValue)=9.0 , where the name of the property is fileName, the value is exportFile. The name of the second property is outputValue, the value is 9.0

Parameters:
  • workflow_id (str)

  • start_time (datetime.datetime | Unset) – Date-time string that adheres to RFC 3339. Example: 2020-03-18T15:00:00Z.

  • end_time (datetime.datetime | Unset) – Date-time string that adheres to RFC 3339. Example: 2020-03-18T15:00:00Z.

  • time_zero (datetime.datetime | Unset) – Date-time string that adheres to RFC 3339. Example: 2020-03-18T15:00:00Z.

  • cold_state_id (str | Unset)

  • scenario_id (str | Unset)

  • user_id (str | Unset)

  • description (str | Unset)

  • run_option (PostruntaskRunOption | Unset)

  • run_locally_and_promote_to_server (PostruntaskRunLocallyAndPromoteToServer | Unset)

  • body (PostruntaskBody | Unset)

  • client (AuthenticatedClient | Client)

Raises:
  • errors.UnexpectedStatus – If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

  • httpx.TimeoutException – If the request takes longer than Client.timeout.

Returns:

Response[str]

Return type:

Response[str]

execute(*, client, **kwargs)[source]#

Execute the API endpoint call.

Parameters:
  • client (AuthenticatedClient | Client) – AuthenticatedClient or Client instance for API calls.

  • document_format – Format of the returned document.

  • **kwargs (Any) – Keyword arguments for the API call.

Returns:

Parsed response content based on the returned content type.

Return type:

str