diff --git a/models/common/pricing/interfaces.go b/models/common/pricing/interfaces.go index 30c6f79..55ee888 100755 --- a/models/common/pricing/interfaces.go +++ b/models/common/pricing/interfaces.go @@ -9,6 +9,7 @@ import ( type PricedItemITF interface { GetID() string + GetInstanceID() string GetType() tools.DataType IsPurchasable() bool IsBooked() bool diff --git a/models/resources/priced_resource.go b/models/resources/priced_resource.go index c6b67f1..4ccf019 100755 --- a/models/resources/priced_resource.go +++ b/models/resources/priced_resource.go @@ -47,6 +47,10 @@ func (abs *PricedResource) GetID() string { return abs.ResourceID } +func (abs *PricedResource) GetInstanceID() string { + return abs.InstanceID +} + func (abs *PricedResource) GetType() tools.DataType { return abs.ResourceType } diff --git a/models/workflow_execution/workflow_execution.go b/models/workflow_execution/workflow_execution.go index bec36e5..750d609 100755 --- a/models/workflow_execution/workflow_execution.go +++ b/models/workflow_execution/workflow_execution.go @@ -162,6 +162,7 @@ func (d *WorkflowExecution) buyEach(bs pricing.BillingStrategy, executionsID str ExecutionsID: executionsID, DestPeerID: priced.GetCreatorID(), ResourceID: priced.GetID(), + InstanceID: priced.GetInstanceID(), ResourceType: dt, EndDate: &end, } @@ -212,6 +213,7 @@ func (d *WorkflowExecution) bookEach(executionsID string, wfID string, dt tools. ExecutionsID: executionsID, State: enum.SCHEDULED, ResourceID: priced.GetID(), + InstanceID: priced.GetInstanceID(), ResourceType: dt, DestPeerID: priced.GetCreatorID(), WorkflowID: wfID,