Code-Fight commented on code in PR #838:
URL: 
https://github.com/apache/incubator-seata-go/pull/838#discussion_r2144060318


##########
pkg/saga/statemachine/engine/core/process_ctrl_statemachine_engine.go:
##########
@@ -32,7 +35,7 @@ import (
 )
 
 type ProcessCtrlStateMachineEngine struct {

Review Comment:
   How about placing it directly under the ‘engine ’ package?



##########
pkg/saga/statemachine/engine/core/default_statemachine_config.go:
##########
@@ -18,9 +18,13 @@
 package core

Review Comment:
   Would it be more appropriate to place this implementation in the ‘config’ 
package?



##########
pkg/saga/statemachine/engine/core/status_decision.go:
##########
@@ -22,33 +22,23 @@ import (
        "errors"
        "github.com/seata/seata-go/pkg/saga/statemachine/constant"
        "github.com/seata/seata-go/pkg/saga/statemachine/engine/exception"
+       "github.com/seata/seata-go/pkg/saga/statemachine/engine/pcext"
+       "github.com/seata/seata-go/pkg/saga/statemachine/process_ctrl"
        "github.com/seata/seata-go/pkg/saga/statemachine/statelang"
        "github.com/seata/seata-go/pkg/util/log"
 )
 
-type StatusDecisionStrategy interface {
-       // DecideOnEndState Determine state machine execution status when 
executing to EndState
-       DecideOnEndState(ctx context.Context, processContext ProcessContext,
-               stateMachineInstance statelang.StateMachineInstance, exp error) 
error
-       // DecideOnTaskStateFail Determine state machine execution status when 
executing TaskState error
-       DecideOnTaskStateFail(ctx context.Context, processContext 
ProcessContext,
-               stateMachineInstance statelang.StateMachineInstance, exp error) 
error
-       // DecideMachineForwardExecutionStatus Determine the forward execution 
state of the state machine
-       DecideMachineForwardExecutionStatus(ctx context.Context,
-               stateMachineInstance statelang.StateMachineInstance, exp error, 
specialPolicy bool) error
-}
-
 type DefaultStatusDecisionStrategy struct {
 }
 
 func NewDefaultStatusDecisionStrategy() *DefaultStatusDecisionStrategy {

Review Comment:
   How about creating a new ‘Strategy ’ package under the engine and placing it 
there?



##########
pkg/saga/statemachine/engine/core/process_context_utils.go:
##########
@@ -19,17 +19,19 @@ package core
 

Review Comment:
   How about creating a new ‘util’ package under the engine and placing it 
there?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to