Package de.dlr.proseo.planner.util
Klasse OrderUtil
java.lang.Object
de.dlr.proseo.planner.util.OrderUtil
Handle processing orders
- Autor:
- Ernst Melchinger
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibung(Package privat) ProductionPlannerConfiguration
Planner configuration(Package privat) org.springframework.boot.web.client.RestTemplateBuilder
REST template builder -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungapprove
(ProcessingOrder order) Approve the processing order and it jobs and job steps.cancel
(ProcessingOrder orderX) Cancel the processing order and it jobs and job steps.checkAutoClose
(ProcessingOrder order) If the order is in systematic processing and the mission has an order retention period, the order is automatically closed after completion and the eviction time is set.checkFinish
(Long orderId) Check whether the processing order and it jobs and job steps are finished.void
Look for next order in state PLANNING, RELEASING and SUSPENDING to restart.Close the processing order and it jobs and job steps.delete
(ProcessingOrder order) Delete the processing order and it jobs and job steps.getProcessingFacilities
(long id) Get the processing facility(-ies) processing the order At the moment there is normally only one facility to do so.void
logOrderState
(ProcessingOrder order) plan
(long id, ProcessingFacility procFacility, Boolean wait) Plan the processing order and it jobs and job steps.prepareSuspend
(long id, Boolean force) Prepare the suspend of the processing order.reset
(ProcessingOrder order) Reset the processing order and it jobs and job steps.void
restartReleasingOrder
(long id) restart the corresponding thread.void
restartSuspendingOrder
(long id) restart the corresponding thread.resume
(ProcessingOrder order, Boolean wait, String user, String pw) Resume the processing order and it jobs and job steps.retry
(ProcessingOrder order) Retry the processing order and it jobs and job steps.sendNotification
(ProcessingOrder order) void
setHasFailedJobSteps
(ProcessingOrder order, Boolean failed) Set the failed job steps flag in the order on failurevoid
setStateMessage
(ProcessingOrder order, String stateMessage) Set the state message of the order.void
setTimes
(ProcessingOrder order) Set the actual completion time and the estimated completion time if it is null.startOrder
(ProcessingOrder order) Start the processing order and it jobs and job steps.Suspend the processing order and its jobs and job steps.
-
Felddetails
-
config
Planner configuration -
rtb
@Autowired org.springframework.boot.web.client.RestTemplateBuilder rtbREST template builder
-
-
Konstruktordetails
-
OrderUtil
public OrderUtil()
-
-
Methodendetails
-
cancel
@Transactional(isolation=REPEATABLE_READ) public PlannerResultMessage cancel(ProcessingOrder orderX) Cancel the processing order and it jobs and job steps.- Parameter:
order
- The processing Order- Gibt zurück:
- Result message
-
reset
Reset the processing order and it jobs and job steps.- Parameter:
order
- The processing Order- Gibt zurück:
- Result message
-
delete
Delete the processing order and it jobs and job steps.- Parameter:
order
- The processing Order- Gibt zurück:
- Result message
-
approve
@Transactional(isolation=REPEATABLE_READ) public PlannerResultMessage approve(ProcessingOrder order) Approve the processing order and it jobs and job steps.- Parameter:
order
- The processing Order- Gibt zurück:
- Result message
-
plan
Plan the processing order and it jobs and job steps.- Parameter:
procFacility
- The processing facility to run the orderwait
- indicates whether to wait for the order planning to completeorder
- The processing order- Gibt zurück:
- Result message
-
resume
Resume the processing order and it jobs and job steps.- Parameter:
order
- The processing Orderwait
- indicates whether to wait for the order releasing to completeuser
- the username for calling other prosEO services (e. g. AIP Client)pw
- the password for calling other prosEO services (e. g. AIP Client)- Gibt zurück:
- Result message
-
startOrder
@Transactional(isolation=REPEATABLE_READ) public PlannerResultMessage startOrder(ProcessingOrder order) Start the processing order and it jobs and job steps.- Parameter:
order
- The processing Order- Gibt zurück:
- Result message
-
suspend
Suspend the processing order and its jobs and job steps.- Parameter:
force
- The flag to force kill of currently running job steps on processing facilityorder
- The processing order id- Gibt zurück:
- Result message
-
prepareSuspend
Prepare the suspend of the processing order. All jobs are set to state ON_HOLD first to avoid start of further job steps.- Parameter:
force
- The flag to force kill of currently running job steps on processing facilityorder
- The processing order id- Gibt zurück:
- Result message
-
retry
Retry the processing order and it jobs and job steps.- Parameter:
order
- The processing Order- Gibt zurück:
- Result message
-
close
Close the processing order and it jobs and job steps.- Parameter:
order
- The processing Order- Gibt zurück:
- Result message
-
checkFinish
Check whether the processing order and it jobs and job steps are finished.- Parameter:
order
- The processing Order- Gibt zurück:
- true after success
-
checkAutoClose
If the order is in systematic processing and the mission has an order retention period, the order is automatically closed after completion and the eviction time is set.- Parameter:
order
- The processing order- Gibt zurück:
- true if closed
-
setTimes
Set the actual completion time and the estimated completion time if it is null.- Parameter:
order
- The processing order
-
setStateMessage
@Transactional(isolation=REPEATABLE_READ) public void setStateMessage(ProcessingOrder order, String stateMessage) Set the state message of the order.- Parameter:
order
- The processing order
-
sendNotification
-
getProcessingFacilities
@Transactional(isolation=REPEATABLE_READ) public List<ProcessingFacility> getProcessingFacilities(long id) Get the processing facility(-ies) processing the order At the moment there is normally only one facility to do so.- Parameter:
order
- The processing order- Gibt zurück:
- List of processinig facilities
-
setHasFailedJobSteps
@Transactional(isolation=REPEATABLE_READ) public void setHasFailedJobSteps(ProcessingOrder order, Boolean failed) Set the failed job steps flag in the order on failure- Parameter:
order
- the order to updatefailed
- indicates whether a job step has failed
-
logOrderState
-
checkNextForRestart
public void checkNextForRestart()Look for next order in state PLANNING, RELEASING and SUSPENDING to restart. -
restartReleasingOrder
public void restartReleasingOrder(long id) restart the corresponding thread. -
restartSuspendingOrder
public void restartSuspendingOrder(long id) restart the corresponding thread.
-