Add judgement of current action. Is save action or update action.