java controller workflow