1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
| package jnpf.dmsService;
|
| import lombok.RequiredArgsConstructor;
| import org.springframework.stereotype.Service;
|
| /** Orchestrates separate transactions; never holds a transaction across file RPC. */
| @Service
| @RequiredArgsConstructor
| public class DmsApprovedDisableFlowService {
| private final DmsApprovedDisableService service;
| private final DmsApprovedFileRetryService retry;
| private final DmsDisableOccupancyService occupancy;
|
| public void onEvent(String tenantId, String flowId, String taskId, String operation, String eventType) {
| if (occupancy.onEvent(tenantId, flowId, taskId, operation, eventType))
| accept(tenantId, flowId, taskId, operation);
| }
|
| public void accept(String tenantId, String flowId, String taskId, String operation) {
| retry.process(service.enqueue(tenantId, flowId, taskId, operation));
| }
| }
|
|