PSEUDO tasks rename

This commit is contained in:
ialbert 2025-07-01 12:52:50 +03:00
parent eb3577fd06
commit 764f3f82d9
4 changed files with 29 additions and 29 deletions

View file

@ -154,8 +154,8 @@ public class FinalSessionStateMachineConfig
TaskType.FormingPaymentInstruction, TaskType.FormingPaymentInstruction,
TaskType.FinishingSession, TaskType.FinishingSession,
TaskType.EndStageNotification, TaskType.EndStageNotification,
TaskType.PSEUDO_waitingForSdf, TaskType.PSEUDO_waitSdfAfterPaymentInstructions,
TaskType.PSEUDO_waitingForObligationAdmission TaskType.PSEUDO_waitAfterObligationAdmissionError
))) )))
.end(TaskType.EndStageNotification); .end(TaskType.EndStageNotification);
} }
@ -183,16 +183,16 @@ public class FinalSessionStateMachineConfig
.and() .and()
.withExternal() .withExternal()
.source(TaskType.ObligationsAdmission) .source(TaskType.ObligationsAdmission)
.target(TaskType.PSEUDO_waitingForObligationAdmission) .target(TaskType.PSEUDO_waitAfterObligationAdmissionError)
.guard(oblAdmGuard) .guard(oblAdmGuard)
.and() .and()
.withExternal() .withExternal()
.source(TaskType.PSEUDO_waitingForObligationAdmission).target(TaskType.InclusionToPool) .source(TaskType.PSEUDO_waitAfterObligationAdmissionError).target(TaskType.InclusionToPool)
.action(chain(obligationAdmissionContinueAction, inclusionToPoolAction)) .action(chain(obligationAdmissionContinueAction, inclusionToPoolAction))
.event(SsnEvent.CONTINUE) .event(SsnEvent.CONTINUE)
.and() .and()
.withExternal() .withExternal()
.source(TaskType.PSEUDO_waitingForObligationAdmission).target(TaskType.ObligationsAdmission) .source(TaskType.PSEUDO_waitAfterObligationAdmissionError).target(TaskType.ObligationsAdmission)
.action(StateMachineUtil.chain(discardOblAdmStash, obligationAdmissionAction)) .action(StateMachineUtil.chain(discardOblAdmStash, obligationAdmissionAction))
.event(SsnEvent.REPEAT) .event(SsnEvent.REPEAT)
.and() .and()
@ -221,11 +221,11 @@ public class FinalSessionStateMachineConfig
//если создались paymentInstruction, переходим в режим ожидания //если создались paymentInstruction, переходим в режим ожидания
.withExternal() .withExternal()
.source(TaskType.FormingPaymentInstruction) .source(TaskType.FormingPaymentInstruction)
.target(TaskType.PSEUDO_waitingForSdf) .target(TaskType.PSEUDO_waitSdfAfterPaymentInstructions)
.guard(PaymentsWereCreatedGuard.instance) .guard(PaymentsWereCreatedGuard.instance)
.and() .and()
.withExternal() .withExternal()
.source(TaskType.PSEUDO_waitingForSdf) .source(TaskType.PSEUDO_waitSdfAfterPaymentInstructions)
.target(TaskType.FinishingSession) .target(TaskType.FinishingSession)
.guard(new SdfGuard(SdfGuardExtractorAfterAssets.instance)) .guard(new SdfGuard(SdfGuardExtractorAfterAssets.instance))
.action(finishingSessionAction) .action(finishingSessionAction)
@ -237,7 +237,7 @@ public class FinalSessionStateMachineConfig
for (var event: EnumSet.of(SsnEvent.SDF_01, SsnEvent.SDF_57, SsnEvent.SDF_04)) { for (var event: EnumSet.of(SsnEvent.SDF_01, SsnEvent.SDF_57, SsnEvent.SDF_04)) {
transitions transitions
.withInternal() .withInternal()
.source(TaskType.PSEUDO_waitingForSdf) .source(TaskType.PSEUDO_waitSdfAfterPaymentInstructions)
.event(event) .event(event)
.action(SdfReceivedAction.instance); .action(SdfReceivedAction.instance);
} }

View file

@ -150,8 +150,8 @@ public class IntermediateMkrSessionStateMachineConfig
TaskType.FormingPaymentInstruction, TaskType.FormingPaymentInstruction,
TaskType.FinishingSession, TaskType.FinishingSession,
TaskType.EndStageNotification, TaskType.EndStageNotification,
TaskType.PSEUDO_waitingForSdf, TaskType.PSEUDO_waitSdfAfterPaymentInstructions,
TaskType.PSEUDO_waitingForObligationAdmission TaskType.PSEUDO_waitAfterObligationAdmissionError
))) )))
.end(TaskType.EndStageNotification); .end(TaskType.EndStageNotification);
} }
@ -179,16 +179,16 @@ public class IntermediateMkrSessionStateMachineConfig
.and() .and()
.withExternal() .withExternal()
.source(TaskType.ObligationsAdmission) .source(TaskType.ObligationsAdmission)
.target(TaskType.PSEUDO_waitingForObligationAdmission) .target(TaskType.PSEUDO_waitAfterObligationAdmissionError)
.guard(oblAdmGuard) .guard(oblAdmGuard)
.and() .and()
.withExternal() .withExternal()
.source(TaskType.PSEUDO_waitingForObligationAdmission).target(TaskType.InclusionToPool) .source(TaskType.PSEUDO_waitAfterObligationAdmissionError).target(TaskType.InclusionToPool)
.action(chain(obligationAdmissionContinueAction, inclusionToPoolAction)) .action(chain(obligationAdmissionContinueAction, inclusionToPoolAction))
.event(SsnEvent.CONTINUE) .event(SsnEvent.CONTINUE)
.and() .and()
.withExternal() .withExternal()
.source(TaskType.PSEUDO_waitingForObligationAdmission).target(TaskType.ObligationsAdmission) .source(TaskType.PSEUDO_waitAfterObligationAdmissionError).target(TaskType.ObligationsAdmission)
.action(StateMachineUtil.chain(discardOblAdmStash, obligationAdmissionAction)) .action(StateMachineUtil.chain(discardOblAdmStash, obligationAdmissionAction))
.event(SsnEvent.REPEAT) .event(SsnEvent.REPEAT)
.and() .and()
@ -215,11 +215,11 @@ public class IntermediateMkrSessionStateMachineConfig
//если создались paymentInstruction, переходим в режим ожидания //если создались paymentInstruction, переходим в режим ожидания
.withExternal() .withExternal()
.source(TaskType.FormingPaymentInstruction) .source(TaskType.FormingPaymentInstruction)
.target(TaskType.PSEUDO_waitingForSdf) .target(TaskType.PSEUDO_waitSdfAfterPaymentInstructions)
.guard(PaymentsWereCreatedGuard.instance) .guard(PaymentsWereCreatedGuard.instance)
.and() .and()
.withExternal() .withExternal()
.source(TaskType.PSEUDO_waitingForSdf) .source(TaskType.PSEUDO_waitSdfAfterPaymentInstructions)
.target(TaskType.AgainRevise) .target(TaskType.AgainRevise)
.guard(new SdfGuard(SdfGuardExtractorAfterAssets.instance)) .guard(new SdfGuard(SdfGuardExtractorAfterAssets.instance))
.action(againRevise) .action(againRevise)
@ -232,11 +232,11 @@ public class IntermediateMkrSessionStateMachineConfig
.and() .and()
.withExternal() .withExternal()
.source(TaskType.AgainRevise) .source(TaskType.AgainRevise)
.target(TaskType.PSEUDO_waitingForSdfAfterAgainRevise) .target(TaskType.PSEUDO_waitSdfAfterAgainRevise)
.guard(invert(reviseSuccessGuard)) .guard(invert(reviseSuccessGuard))
.and() .and()
.withExternal() .withExternal()
.source(TaskType.PSEUDO_waitingForSdfAfterAgainRevise) .source(TaskType.PSEUDO_waitSdfAfterAgainRevise)
.target(TaskType.AgainRevise) .target(TaskType.AgainRevise)
.guard(new SdfGuard(SdfGuardExtractorAfterAgainRevise.instance)) .guard(new SdfGuard(SdfGuardExtractorAfterAgainRevise.instance))
.action(againRevise) .action(againRevise)
@ -248,7 +248,7 @@ public class IntermediateMkrSessionStateMachineConfig
for (var event: EnumSet.of(SsnEvent.SDF_01, SsnEvent.SDF_57, SsnEvent.SDF_04)) { for (var event: EnumSet.of(SsnEvent.SDF_01, SsnEvent.SDF_57, SsnEvent.SDF_04)) {
transitions transitions
.withInternal() .withInternal()
.source(TaskType.PSEUDO_waitingForSdf) .source(TaskType.PSEUDO_waitSdfAfterPaymentInstructions)
.event(event) .event(event)
.action(SdfReceivedAction.instance); .action(SdfReceivedAction.instance);
} }

View file

@ -56,9 +56,9 @@ public enum TaskType implements IEnumKey {
* Step 11 * Step 11
*/ */
EndStageNotification("CL11"), EndStageNotification("CL11"),
PSEUDO_waitingForSdf("PSEUDO_waitingForSdf"), PSEUDO_waitSdfAfterPaymentInstructions("PSEUDO_waitSdfAfterPaymentInstructions"),
PSEUDO_waitingForSdfAfterAgainRevise("PSEUDO_waitingForSdfAfterAgainRevise"), PSEUDO_waitSdfAfterAgainRevise("PSEUDO_waitSdfAfterAgainRevise"),
PSEUDO_waitingForObligationAdmission("PSEUDO_waitingForObligationAdmission"), PSEUDO_waitAfterObligationAdmissionError("PSEUDO_waitAfterObligationAdmissionError"),
; ;
private String key; private String key;

View file

@ -56,8 +56,8 @@ public class TestStateMachineConfig extends EnumStateMachineConfigurerAdapter<Ta
TaskType.FormingPaymentInstruction, TaskType.FormingPaymentInstruction,
TaskType.FinishingSession, TaskType.FinishingSession,
TaskType.EndStageNotification, TaskType.EndStageNotification,
TaskType.PSEUDO_waitingForSdf, TaskType.PSEUDO_waitSdfAfterPaymentInstructions,
TaskType.PSEUDO_waitingForObligationAdmission TaskType.PSEUDO_waitAfterObligationAdmissionError
))) )))
.end(TaskType.EndStageNotification); .end(TaskType.EndStageNotification);
@ -85,16 +85,16 @@ public class TestStateMachineConfig extends EnumStateMachineConfigurerAdapter<Ta
.and() .and()
.withExternal() .withExternal()
.source(TaskType.ObligationsAdmission) .source(TaskType.ObligationsAdmission)
.target(TaskType.PSEUDO_waitingForObligationAdmission) .target(TaskType.PSEUDO_waitAfterObligationAdmissionError)
.guard(context -> true) .guard(context -> true)
.and() .and()
.withExternal() .withExternal()
.source(TaskType.PSEUDO_waitingForObligationAdmission).target(TaskType.InclusionToPool) .source(TaskType.PSEUDO_waitAfterObligationAdmissionError).target(TaskType.InclusionToPool)
.action(chain(ctx -> log.info("obligationAdmissionContinueAction"), ctx -> log.info("inclusionToPoolAction"))) .action(chain(ctx -> log.info("obligationAdmissionContinueAction"), ctx -> log.info("inclusionToPoolAction")))
.event(SsnEvent.CONTINUE) .event(SsnEvent.CONTINUE)
.and() .and()
.withExternal() .withExternal()
.source(TaskType.PSEUDO_waitingForObligationAdmission).target(TaskType.ObligationsAdmission) .source(TaskType.PSEUDO_waitAfterObligationAdmissionError).target(TaskType.ObligationsAdmission)
.action(chain(act("discardOblAdmStash"), act("obligationAdmissionAction"))) .action(chain(act("discardOblAdmStash"), act("obligationAdmissionAction")))
.event(SsnEvent.REPEAT) .event(SsnEvent.REPEAT)
.and() .and()
@ -123,11 +123,11 @@ public class TestStateMachineConfig extends EnumStateMachineConfigurerAdapter<Ta
//если создались paymentInstruction, переходим в режим ожидания //если создались paymentInstruction, переходим в режим ожидания
.withExternal() .withExternal()
.source(TaskType.FormingPaymentInstruction) .source(TaskType.FormingPaymentInstruction)
.target(TaskType.PSEUDO_waitingForSdf) .target(TaskType.PSEUDO_waitSdfAfterPaymentInstructions)
.guard(PaymentsWereCreatedGuard.instance) .guard(PaymentsWereCreatedGuard.instance)
.and() .and()
.withExternal() .withExternal()
.source(TaskType.PSEUDO_waitingForSdf) .source(TaskType.PSEUDO_waitSdfAfterPaymentInstructions)
.target(TaskType.FinishingSession) .target(TaskType.FinishingSession)
.guard(new SdfGuard(SdfGuardExtractorAfterAssets.instance)) .guard(new SdfGuard(SdfGuardExtractorAfterAssets.instance))
.action(act("finishingSessionAction")) .action(act("finishingSessionAction"))
@ -139,7 +139,7 @@ public class TestStateMachineConfig extends EnumStateMachineConfigurerAdapter<Ta
for (var event: EnumSet.of(SsnEvent.SDF_01, SsnEvent.SDF_57, SsnEvent.SDF_04)) { for (var event: EnumSet.of(SsnEvent.SDF_01, SsnEvent.SDF_57, SsnEvent.SDF_04)) {
transitions transitions
.withInternal() .withInternal()
.source(TaskType.PSEUDO_waitingForSdf) .source(TaskType.PSEUDO_waitSdfAfterPaymentInstructions)
.event(event) .event(event)
.action(SdfReceivedAction.instance); .action(SdfReceivedAction.instance);
} }