Java-based workflow engine