|
Os tipos de arquivos clássicos não estarão mais disponíveis para uso a partir de janeiro de 2021. Você pode fazer a transição de seus arquivos clássicos ou baixar um PDF. Saber mais

Stop Chain

Respondida
0

Comentários

5 comentários

  • Jeff Hickey

    Hi Daniela Smits, the Stop Chain command allows you to programmatically stop a currently running Chain from withing your Chain logic. This is useful when you want to end a Chain run based on a condition, validation failure, or other runtime logic. To use the Command, you must provide the ID of a running Chain that you want to stop.

    0
  • Daniela Smits

    What would you recommend is a way to implement it for the purpose of stopping chains that run for a prolonged period without failing/erroring? Would this be implemented in each chain or as a separate chain that tracks all other chains?

    0
  • Jeff Hickey

    Hi Daniela Smits,

    There are a few ways you could implement this. One approach would be to create a dedicated "monitor" Chain. At the start of a long running Chain, you could launch the monitor Chain using a Run Chain event and pass it the ID of the running Chain to monitor. The monitor Chain could periodically check whether the target Chain is still running and, if it exceeds a defined timeout threshold, use the Stop Chain command to stop it.

    I would also recommend investigating the root cause of the prolonged execution. Determine whether the Chain is still actively processing data or if it has entered a hung state where it is no longer making progress but also isn't failing. The Stop Chain command can be used as a safeguard to terminate long running executions, but identifying and addressing the underlying cause will help prevent the issue from recurring.

    0
  • Daniela Smits

    Thank you! Last question, which chain Id needs to be used? The chain run id (unique to each run) or the chain ID that is fixed?

    0
  • Jeff Hickey

    Hi Daniela Smits

    You will need to use the ID of the Chain run and not the Chain ID. You can get the ID of the Chain run in Runtime variables and using the 'Chain.ExecutorId' variable.

    0

Por favor, entrar para comentar.