|
2021년 1월부터 기존 파일 형식을 더 이상 사용할 수 없습니다. 기존 파일을 전환하거나 PDF를 다운로드할 수 있습니다. 자세히 알아보기

Stop Chain

답변함
0

댓글

댓글 5개

  • 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

댓글을 남기려면 로그인하세요.