<@ULVA73B9P> I am trying to create a Human in the ...
# ask-marvin
p
@Marvin I am trying to create a Human in the loop system using the wait for user input, how can i reject it based on timeout like if the user doesn't respond within 48 hours I want to cancel the flow
m
Error: I've reached my tool use limit for this response. Please ask a follow-up question if you need more information.
I've reached my tool use limit for this response. Please ask a follow-up question if you need more information.
n
sorry i am fixing this now
you probably want a automation that changes the state of the flow if you find one sitting and waiting for too long
p
also, @Nate one more question is there a way I cancel a flow using a API suppose I want to create the reject button in the HITL system
n
you could just click cancel in the UI instead of resume right?
p
yes something similar, I have a slack app that send a message to the approvers when my prefect flow pauses, I can resume, but I can't cancel, yes but the approvers but have prefect UI access in this case
But thank you very much, I will try to make some work around :)
n
i mean so you can build an arbitrary
BaseModel
subclass as the result that must be provided when resuming, you can have a bool field on that class that represents whether you should continue or not, and then if its false the flow can end itself in
Cancelled
so it seems like a stakeholder preference question
p
sounds interesting I will try this out, thank you!
catjam 1