Add workflow execution process

This commit is contained in:
yoan
2024-11-18 19:40:24 +08:00
parent bde2147dd3
commit 775b12aec1
23 changed files with 741 additions and 21 deletions

View File

@@ -0,0 +1,29 @@
package nodeprocessor
import (
"context"
"github.com/usual2970/certimate/internal/domain"
"github.com/usual2970/certimate/internal/utils/xtime"
)
type startNode struct {
node *domain.WorkflowNode
*Logger
}
func NewStartNode(node *domain.WorkflowNode) *startNode {
return &startNode{
node: node,
Logger: NewLogger(node),
}
}
// 开始节点没有任何操作
func (s *startNode) Run(ctx context.Context) error {
s.AddOutput(ctx, xtime.BeijingTimeStr(),
s.node.Name,
"完成",
)
return nil
}