This commit is contained in:
mr
2026-03-19 10:50:00 +01:00
parent c7884f5cde
commit 4eb53917b8
7 changed files with 5 additions and 46 deletions

View File

@@ -189,7 +189,6 @@ func (d *Workflow) ExtractFromPlantUML(plantUML multipart.File, request *tools.A
newRes := new()
newRes.SetID(uuid.New().String())
varName, graphItem, err := d.extractResourcePlantUML(parseLine, newRes, n, request.PeerID)
fmt.Println(varName, graphItem, err)
if err != nil {
return d, err
}
@@ -229,7 +228,6 @@ func (d *Workflow) ExtractFromPlantUML(plantUML multipart.File, request *tools.A
d.generateResource(d.GetResources(tools.STORAGE_RESOURCE), request)
d.generateResource(d.GetResources(tools.COMPUTE_RESOURCE), request)
d.generateResource(d.GetResources(tools.WORKFLOW_RESOURCE), request)
fmt.Println("graphVarName", graphVarName)
d.Graph.Items = graphVarName
return d, nil
}
@@ -243,8 +241,7 @@ func (d *Workflow) generateResource(datas []resources.ResourceInterface, request
json.Unmarshal(b, &liv)
data, _, err := access.StoreOne(&liv)
if err == nil {
_, _, err := access.CopyOne(data)
fmt.Println("COPY ", err)
access.CopyOne(data)
}
}
continue
@@ -255,14 +252,12 @@ func (d *Workflow) generateResource(datas []resources.ResourceInterface, request
json.Unmarshal(b, &liv)
data, _, err := access.StoreOne(&liv)
if err == nil {
_, _, err := access.CopyOne(data)
fmt.Println("COPY ", err)
access.CopyOne(data)
}
}
continue
}
_, _, err := d.GetAccessor(request).StoreOne(d)
fmt.Println("ERR", err)
d.GetAccessor(request).StoreOne(d)
}
return nil
}
@@ -364,7 +359,6 @@ func (d *Workflow) extractResourcePlantUML(line string, resource resources.Resou
varName := splittedParams[0]
splitted := strings.Split(splittedParams[1], "\"")
fmt.Println(varName, splitted)
if len(splitted) <= 1 {
return "", nil, errors.New("Can't deserialize Object, there's no name")