https://www.youtube.com/watch?v=Pr0FrvIIfTU
At 3040 they have check operators. The guy giving the presentation has a bunch of them that they run in a row.
At 3620 there is a lightweight API that allows you to pass messages between the states. For example he mentioned sending the max ID that you selected in the previous query.