Custumize java code for workflow