示例一

Camunda Asynchronous continuations_continuations

@Service
public class ExceptionService implements JavaDelegate {
    @Override
    public void execute(DelegateExecution execution) {
        System.out.println(1/0);
    }
}

ACT_RU_TASK :明明是UserTask2完成任务了,ServiceTask内部出错了,按说事务应该听到ServiceTask这个节点上,但是实际上又重新回到了上一步,这和想象的不一样。

Camunda Asynchronous continuations_System_02

Camunda Asynchronous continuations_Asynchronou_03

二:示例二

这里Type选择Java class,选择Deleage expression在手动重试时会报错。

Camunda Asynchronous continuations_ide_04

Camunda Asynchronous continuations_continuations_05

Camunda Asynchronous continuations_ide_06

Camunda Asynchronous continuations_Asynchronou_07


失败了默认会自动重试3次(camunda.bpm.default-number-of-retries),也可以通过手动刷新进行重试。

Camunda Asynchronous continuations_continuations_08