From fa5b7543332d4bd3e0fe4353a6aa42aa84086c1e Mon Sep 17 00:00:00 2001 From: mr Date: Wed, 14 Jan 2026 13:57:49 +0100 Subject: [PATCH] add Selected in Workflow Exec --- models/workflow/workflow.go | 5 ----- models/workflow_execution/workflow_execution.go | 6 ++++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/models/workflow/workflow.go b/models/workflow/workflow.go index 5f37275..f9738ba 100644 --- a/models/workflow/workflow.go +++ b/models/workflow/workflow.go @@ -42,11 +42,6 @@ type Workflow struct { ScheduleActive bool `json:"schedule_active" bson:"schedule_active"` // ScheduleActive is a flag that indicates if the schedule is active, if not the workflow is not scheduled and no execution or booking will be set // Schedule *WorkflowSchedule `bson:"schedule,omitempty" json:"schedule,omitempty"` // Schedule is the schedule of the workflow Shared []string `json:"shared,omitempty" bson:"shared,omitempty"` // Shared is the ID of the shared workflow // AbstractWorkflow contains the basic fields of a workflow - - SelectedInstances ConfigItem `json:"selected_instances"` - SelectedPartnerships ConfigItem `json:"selected_partnerships"` - SelectedBuyings ConfigItem `json:"selected_buyings"` - SelectedStrategies ConfigItem `json:"selected_strategies"` } func (d *Workflow) GetAccessor(request *tools.APIRequest) utils.Accessor { diff --git a/models/workflow_execution/workflow_execution.go b/models/workflow_execution/workflow_execution.go index 8e0f2d6..bec36e5 100755 --- a/models/workflow_execution/workflow_execution.go +++ b/models/workflow_execution/workflow_execution.go @@ -11,6 +11,7 @@ import ( "cloud.o-forge.io/core/oc-lib/models/common/pricing" "cloud.o-forge.io/core/oc-lib/models/resources/purchase_resource" "cloud.o-forge.io/core/oc-lib/models/utils" + "cloud.o-forge.io/core/oc-lib/models/workflow" "cloud.o-forge.io/core/oc-lib/tools" "github.com/google/uuid" "go.mongodb.org/mongo-driver/bson/primitive" @@ -31,6 +32,11 @@ type WorkflowExecution struct { EndDate *time.Time `json:"end_date,omitempty" bson:"end_date,omitempty"` // EndDate is the end date of the workflow State enum.BookingStatus `json:"state" bson:"state" default:"0"` // TEMPORARY TODO DEFAULT 1 -> 0 State is the state of the workflow WorkflowID string `json:"workflow_id" bson:"workflow_id,omitempty"` // WorkflowID is the ID of the workflow + + SelectedInstances workflow.ConfigItem `json:"selected_instances"` + SelectedPartnerships workflow.ConfigItem `json:"selected_partnerships"` + SelectedBuyings workflow.ConfigItem `json:"selected_buyings"` + SelectedStrategies workflow.ConfigItem `json:"selected_strategies"` } func (r *WorkflowExecution) StoreDraftDefault() {