Add task state transitions to the graph