Fixed startnode management during schedule startup

This commit is contained in:
frikky
2022-08-06 01:34:04 +02:00
parent 09c02a14dc
commit 12670ddb72
3 changed files with 17 additions and 11 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ require (
github.com/h2non/filetype v1.1.3 github.com/h2non/filetype v1.1.3
github.com/nirasan/go-oauth-pkce-code-verifier v0.0.0-20170819232839-0fbfe93532da // indirect github.com/nirasan/go-oauth-pkce-code-verifier v0.0.0-20170819232839-0fbfe93532da // indirect
github.com/satori/go.uuid v1.2.0 github.com/satori/go.uuid v1.2.0
github.com/shuffle/shuffle-shared v0.2.78 github.com/shuffle/shuffle-shared v0.2.79
go4.org v0.0.0-20201209231011-d4a079459e60 // indirect go4.org v0.0.0-20201209231011-d4a079459e60 // indirect
golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce
google.golang.org/api v0.65.0 google.golang.org/api v0.65.0
+12 -7
View File
@@ -1504,14 +1504,19 @@ func scheduleWorkflow(resp http.ResponseWriter, request *http.Request) {
// Finds the startnode for the specific schedule // Finds the startnode for the specific schedule
startNode := "" startNode := ""
for _, branch := range workflow.Branches { if schedule.Start != "" {
if branch.SourceID == schedule.Id { startNode = schedule.Start
startNode = branch.DestinationID } else {
}
}
if startNode == "" { for _, branch := range workflow.Branches {
startNode = workflow.Start if branch.SourceID == schedule.Id {
startNode = branch.DestinationID
}
}
if startNode == "" {
startNode = workflow.Start
}
} }
//log.Printf("Startnode: %s", startNode) //log.Printf("Startnode: %s", startNode)
+4 -3
View File
@@ -4903,9 +4903,10 @@ const AngularWorkflow = (defaultprops) => {
} }
var mappedStartnode = "" var mappedStartnode = ""
const edges = cy.edges.jsons() const alledges = cy.edges().jsons()
for (var key in edges.length) { for (var key in alledges) {
const tmp = edges[key] const tmp = alledges[key]
console.log("TMP: ", tmp, tmp.data.source)
if (tmp.data.source === trigger.id) { if (tmp.data.source === trigger.id) {
mappedStartnode = tmp.data.target mappedStartnode = tmp.data.target
break break