Fixed execution problems for subflows related to multiple executions and missing execution argument
This commit is contained in:
@@ -1488,7 +1488,7 @@ class AppBase:
|
||||
# Means it's a single item -> continue
|
||||
if seconditem == "":
|
||||
print("[INFO] In first - handling %s. Len: %d" % (firstitem, len(basejson)))
|
||||
if firstitem.lower() == "max" or firstitem.lower() == "last":
|
||||
if firstitem.lower() == "max" or firstitem.lower() == "last" or firstitem.lower() == "end":
|
||||
firstitem = len(basejson)-1
|
||||
elif firstitem.lower() == "min" or firstitem.lower() == "first":
|
||||
firstitem = 0
|
||||
@@ -1503,14 +1503,14 @@ class AppBase:
|
||||
newvalue, is_loop = (tmpitem, parsersplit[outercnt+1:])
|
||||
else:
|
||||
print("[INFO] In ELSE - handling %s and %s" % (firstitem, seconditem))
|
||||
if firstitem.lower() == "max" or firstitem.lower() == "last":
|
||||
if firstitem.lower() == "max" or firstitem.lower() == "last" or firstitem.lower() == "end":
|
||||
firstitem = len(basejson)-1
|
||||
elif firstitem.lower() == "min" or firstitem.lower() == "first":
|
||||
firstitem = 0
|
||||
else:
|
||||
firstitem = int(firstitem)
|
||||
|
||||
if seconditem.lower() == "max" or seconditem.lower() == "last":
|
||||
if seconditem.lower() == "max" or seconditem.lower() == "last" or firstitem.lower() == "end":
|
||||
seconditem = len(basejson)-1
|
||||
elif seconditem.lower() == "min" or seconditem.lower() == "first":
|
||||
seconditem = 0
|
||||
|
||||
@@ -2,7 +2,7 @@ module main
|
||||
|
||||
go 1.15
|
||||
|
||||
replace github.com/shuffle/shuffle-shared => ../../../../git/shuffle-shared
|
||||
//replace github.com/shuffle/shuffle-shared => ../../../../git/shuffle-shared
|
||||
|
||||
//replace github.com/frikky/kin-openapi => ../../../../git/kin-openapi
|
||||
//replace github.com/frikky/go-elasticsearch => ../../../../git/go-elasticsearch
|
||||
@@ -22,7 +22,7 @@ require (
|
||||
github.com/gorilla/mux v1.8.0
|
||||
github.com/h2non/filetype v1.1.1
|
||||
github.com/satori/go.uuid v1.2.0
|
||||
github.com/shuffle/shuffle-shared v0.1.62
|
||||
github.com/shuffle/shuffle-shared v0.1.70
|
||||
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e // indirect
|
||||
go4.org v0.0.0-20201209231011-d4a079459e60 // indirect
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
|
||||
|
||||
@@ -2885,7 +2885,7 @@ func handleSwaggerValidation(body []byte) (shuffle.ParsedOpenApi, error) {
|
||||
}
|
||||
} else {
|
||||
isJson = true
|
||||
log.Printf("Successfully parsed JSON!")
|
||||
//log.Printf("[DEBUG] Successfully parsed JSON!")
|
||||
}
|
||||
|
||||
if len(version.SwaggerVersion) > 0 && len(version.Swagger) == 0 {
|
||||
|
||||
@@ -1040,7 +1040,6 @@ func executeWorkflow(resp http.ResponseWriter, request *http.Request) {
|
||||
}
|
||||
|
||||
user, userErr := shuffle.HandleApiAuthentication(resp, request)
|
||||
|
||||
if user.Role == "org-reader" {
|
||||
log.Printf("[WARNING] Org-reader doesn't have access to run workflow: %s (%s)", user.Username, user.Id)
|
||||
resp.WriteHeader(401)
|
||||
@@ -2171,7 +2170,7 @@ func iterateOpenApiGithub(fs billy.Filesystem, dir []os.FileInfo, extra string,
|
||||
}
|
||||
|
||||
if appCounter > 0 {
|
||||
log.Printf("Preloaded %d OpenApi apps in folder %s!", appCounter, extra)
|
||||
//log.Printf("Preloaded %d OpenApi apps in folder %s!", appCounter, extra)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user