-1
我有很多服務任務調用休息服務,有時服務不可用。我想在我的JavaDelegate能夠無限次重試作業:503錯誤後活動重試作業
@Override
public void execute(DelegateExecution execution)
{
try
{
//call_rest_service
}
catch (Exception503 error)
{
CommandContext commandContext = Context.getCommandContext();
JobEntity jobEntity = commandContext.getJobEntityManager().findById(job.getId());
jobEntity.setRetries(10);
//then throw original error
}
}
但這似乎不工作!