diff --git a/core/services/workflows/engine.go b/core/services/workflows/engine.go index b958e171c0c..b1fca324d94 100644 --- a/core/services/workflows/engine.go +++ b/core/services/workflows/engine.go @@ -352,7 +352,16 @@ func (e *Engine) init(ctx context.Context) { } } - e.logger.Info("engine initialized") + var name string + if e.workflow != nil { + nameBytes, err := hex.DecodeString(e.workflow.name) + if err != nil { + e.logger.Errorf("failed to decode workflow name: %s", e.workflow.name) + } + name = string(nameBytes[:]) + } + + e.logger.Infof("engine initialized for %s", name) logCustMsg(ctx, e.cma, "workflow registered", e.logger) e.afterInit(true) } diff --git a/core/services/workflows/engine_test.go b/core/services/workflows/engine_test.go index 3a2bc17bc36..f976b4bf0a9 100644 --- a/core/services/workflows/engine_test.go +++ b/core/services/workflows/engine_test.go @@ -41,6 +41,8 @@ import ( const testWorkflowId = "" const hardcodedWorkflow = ` +name: "hcwf" + triggers: - id: "mercury-trigger@1.0.0" config: @@ -165,12 +167,14 @@ func newTestEngine(t *testing.T, reg *coreCap.Registry, sdkSpec sdk.WorkflowSpec reg.SetLocalRegistry(&testConfigProvider{}) cfg := Config{ - WorkflowID: testWorkflowId, - Lggr: logger.TestLogger(t), - Registry: reg, - Workflow: sdkSpec, - maxRetries: 1, - retryMs: 100, + WorkflowID: testWorkflowId, + WorkflowName: sdkSpec.Name, + WorkflowOwner: sdkSpec.Owner, + Lggr: logger.TestLogger(t), + Registry: reg, + Workflow: sdkSpec, + maxRetries: 1, + retryMs: 100, afterInit: func(success bool) { if success { close(initSuccessful)