Draft booking flow
This commit is contained in:
@@ -165,8 +165,9 @@ func (d *WorkflowExecution) buyEach(bs pricing.BillingStrategy, executionsID str
|
||||
end := start.Add(time.Duration(priced.GetExplicitDurationInS()) * time.Second)
|
||||
bookingItem := &purchase_resource.PurchaseResource{
|
||||
AbstractObject: utils.AbstractObject{
|
||||
UUID: uuid.New().String(),
|
||||
Name: d.GetName() + "_" + executionsID + "_" + wfID,
|
||||
UUID: uuid.New().String(),
|
||||
Name: d.GetName() + "_" + executionsID + "_" + wfID,
|
||||
IsDraft: true,
|
||||
},
|
||||
PricedItem: m,
|
||||
ExecutionID: d.GetID(),
|
||||
@@ -224,12 +225,13 @@ func (d *WorkflowExecution) bookEach(executionsID string, wfID string, dt tools.
|
||||
json.Unmarshal(b, &m)
|
||||
bookingItem := &booking.Booking{
|
||||
AbstractObject: utils.AbstractObject{
|
||||
UUID: uuid.New().String(),
|
||||
Name: d.GetName() + "_" + executionsID + "_" + wfID,
|
||||
UUID: uuid.New().String(),
|
||||
Name: d.GetName() + "_" + executionsID + "_" + wfID,
|
||||
IsDraft: true,
|
||||
},
|
||||
PricedItem: m,
|
||||
ExecutionsID: executionsID,
|
||||
State: enum.SCHEDULED,
|
||||
State: enum.DRAFT,
|
||||
ResourceID: priced.GetID(),
|
||||
InstanceID: priced.GetInstanceID(),
|
||||
ResourceType: dt,
|
||||
|
||||
Reference in New Issue
Block a user