Skip to content

Commit 6ac512e

Browse files
ValerioValerio Crecco
authored andcommitted
Improve exchaging of data between workflow functions
Co-authored-by: Valerio Crecco <valerio.crecco@alumni.uniroma2.eu> Co-authored-by: Ludovico De Santis <ludovico.desantis@alumni.uniroma2.eu>
1 parent 77fcf8b commit 6ac512e

17 files changed

Lines changed: 500 additions & 224 deletions

internal/api/composition.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,6 @@ func InvokeFunctionComposition(e echo.Context) error {
220220
OffloadLatency: 0,
221221
SchedAction: "",
222222
})
223-
224-
//fcReq.ExecReport.Reports[execReportId] = &function.ExecutionReport{
225-
// SchedAction: "",
226-
// OffloadLatency: 0.0,
227-
//}
228223
}
229224

230225
if fcReq.Async {

internal/fc/asl.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ func BuildFromChoiceState(builder *DagBuilder, c *asl.ChoiceState, name string,
6262
nextState = c.Choices[i].GetNextState()
6363
} else {
6464
// we add one more branch to the ChoiceNode to handle the default branch
65+
6566
nextState = c.Default
6667
}
6768
dag, errBranch := GetBranchForChoiceFromStates(entireSM, nextState, i)

internal/fc/conditions.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,17 @@ func (c Condition) findInputs(input map[string]interface{}) ([]interface{}, bool
185185
ops = append(ops, nil)
186186
} else {
187187
var value2 interface{}
188+
/* handling of numeric strings */
188189
_, err := value.(string)
189190
if !err {
190-
value2 = strconv.Itoa(value.(int))
191+
_, err := value.(int)
192+
if !err {
193+
ops = append(ops, value)
194+
continue
195+
} else {
196+
value2 = strconv.Itoa(value.(int))
197+
}
198+
191199
} else {
192200
value2 = value
193201
}
@@ -895,7 +903,6 @@ func parseFloat(num interface{}) (float64, bool) {
895903
case string:
896904
num, err := strconv.Atoi(n)
897905
if err != nil {
898-
fmt.Println("Error during strconv.Atoi():", err)
899906
return 0.0, false
900907
}
901908
return float64(num), true

0 commit comments

Comments
 (0)