Add workflow execution process
This commit is contained in:
29
internal/workflow/node-processor/condition_node.go
Normal file
29
internal/workflow/node-processor/condition_node.go
Normal file
@@ -0,0 +1,29 @@
|
||||
package nodeprocessor
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/usual2970/certimate/internal/domain"
|
||||
"github.com/usual2970/certimate/internal/utils/xtime"
|
||||
)
|
||||
|
||||
type conditionNode struct {
|
||||
node *domain.WorkflowNode
|
||||
*Logger
|
||||
}
|
||||
|
||||
func NewConditionNode(node *domain.WorkflowNode) *conditionNode {
|
||||
return &conditionNode{
|
||||
node: node,
|
||||
Logger: NewLogger(node),
|
||||
}
|
||||
}
|
||||
|
||||
// 条件节点没有任何操作
|
||||
func (c *conditionNode) Run(ctx context.Context) error {
|
||||
c.AddOutput(ctx, xtime.BeijingTimeStr(),
|
||||
c.node.Name,
|
||||
"完成",
|
||||
)
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user