Add a Name to Workflow Execution
This commit is contained in:
@@ -56,6 +56,9 @@ func (wfa *workflowMongoAccessor) execution(id string, realData *Workflow, delet
|
||||
}
|
||||
for s := c.Next(*realData.Schedule.Start); !s.IsZero() && s.Before(*realData.Schedule.End); s = c.Next(s) {
|
||||
obj := &workflow_execution.WorkflowExecution{
|
||||
AbstractObject: utils.AbstractObject{
|
||||
Name: realData.Schedule.Name,
|
||||
},
|
||||
ExecDate: &s,
|
||||
EndDate: realData.Schedule.End,
|
||||
State: 1,
|
||||
@@ -66,6 +69,9 @@ func (wfa *workflowMongoAccessor) execution(id string, realData *Workflow, delet
|
||||
|
||||
} else {
|
||||
obj := &workflow_execution.WorkflowExecution{
|
||||
AbstractObject: utils.AbstractObject{
|
||||
Name: realData.Schedule.Name,
|
||||
},
|
||||
ExecDate: realData.Schedule.Start,
|
||||
EndDate: realData.Schedule.End,
|
||||
State: 1,
|
||||
|
@@ -4,6 +4,7 @@ import "time"
|
||||
|
||||
type WorkflowSchedule struct {
|
||||
Id string `json:"id"`
|
||||
Name string `json:"name" bson:"name" validate:"required"`
|
||||
Start *time.Time `json:"start" bson:"start" validate:"required"`
|
||||
End *time.Time `json:"end,omitempty" bson:"end,omitempty"`
|
||||
Cron string `json:"cron,omitempty" bson:"cron,omitempty"`
|
||||
|
Reference in New Issue
Block a user