add workflow func tools
This commit is contained in:
parent
91128313fc
commit
3388fcc6f3
@ -26,6 +26,15 @@ type AbstractWorkflow struct {
|
||||
Shared []string `json:"shared,omitempty" bson:"shared,omitempty"` // Shared is the ID of the shared workflow
|
||||
}
|
||||
|
||||
func (w *AbstractWorkflow) getWorkflows() (list_computings []graph.GraphItem) {
|
||||
for _, item := range w.Graph.Items {
|
||||
if item.Workflow != nil {
|
||||
list_computings = append(list_computings, item)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (w *AbstractWorkflow) GetStoragesByRelatedProcessing(processingID string, relatedToData bool, ignoreRelation bool) (map[string][]utils.DBObject, map[string]map[string][]utils.DBObject) {
|
||||
storages := make(map[string][]utils.DBObject)
|
||||
datasRelatedToStorage := make(map[string]map[string][]utils.DBObject)
|
||||
@ -93,7 +102,7 @@ func (w *AbstractWorkflow) GetDatasByRelatedProcessing(dataID string, relatedToS
|
||||
return datas, datasRelatedToData
|
||||
}
|
||||
|
||||
func (w *AbstractWorkflow) getProcessingsByRelatedProcessing() (list_computings []graph.GraphItem) {
|
||||
func (w *AbstractWorkflow) getProcessings() (list_computings []graph.GraphItem) {
|
||||
for _, item := range w.Graph.Items {
|
||||
if item.Processing != nil {
|
||||
list_computings = append(list_computings, item)
|
||||
|
Loading…
Reference in New Issue
Block a user