Skip to content

Need a way to timeout a running flow. #13

@Chengxuan

Description

@Chengxuan

In IBM App Connect, this lib is the one we've chosen as the framework for our integration executions. To ensure the fairness and control the workload of our back-end system, we set a maximum running time for each integration/flow.

I couldn't find any easy way to achieve that in this lib. Here is my current workaround:

  1. set the expiry time as a global value in the context of the flow before start running the flow.
  2. each task will first check the expiry time in their execute function, if the flow is expired, the task will call flow.fail(TimeoutError) to terminate the flow.
  3. the error event listener will distinguish this special error and tell the user the flow is timed out.

Do you have a better way of achieving this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions