<@ULVA73B9P> is there a way to execute a job when ...
# ask-marvin
b
@Marvin is there a way to execute a job when the results of another are success?
m
It seems that the Prefect documentation does mention states and how they can be used to know the status of a task run or flow run, and how workflows can take advantage of state information. Based on my search, to execute a job when the results of another are a success, you might want to use state handlers in Prefect or specific triggers that react to state changes, such as a task entering a 'Success' state. Here's a relevant excerpt from the Prefect documentation:
States are rich objects that contain information about the status of a particular task run or flow run. ...you can give your workflows superpowers by taking advantage of it. At any moment, you can learn anything you need to know about a task or flow by examining its current state or the history of its states.
You can find more details in the Prefect documentation on states. If you're looking to configure actions that execute when specific trigger criteria are met, including job success, you might want to look into automation and observability features as hinted at in another excerpt:
Users can configure one or more actions to execute when their trigger criteria are met, including starting or stopping flow runs, work queues, deployment schedules, or sending notifications.
Unfortunately, the links provided in the excerpts don't seem to point directly to detailed guides or tutorials on how to implement these features. You may wish to consult the official Prefect documentation or community for code examples or detailed guidance on setting up tasks to run conditionally upon the successful completion of other tasks.