@@ -749,6 +749,7 @@ CONSTRAINTS
749749- Do NOT invent values
750750- MUST use keys present in original JSON
751751- Make sure all "Required data" values are in the output.
752+ - Do not focus on authentication unless necessary
752753
753754END CONSTRAINTS
754755---
@@ -1192,9 +1193,24 @@ func UpdateActionBody(action WorkflowAppAction) (string, error) {
11921193}
11931194
11941195// Uploads modifyable parameter data to file storage, as to be used in the future executions of the app
1195- func UploadParameterBase (ctx context.Context , orgId , appId , actionName , paramName , paramValue string ) error {
1196+ func UploadParameterBase (ctx context.Context , fields [] Valuereplace , orgId , appId , actionName , paramName , paramValue string ) error {
11961197 timeNow := time .Now ().Unix ()
11971198
1199+ // If NOT JSON:
1200+ // /rest/api/3/10010/comment -> /rest/api/3/{input.fields[i].key}/comment
1201+ // Does that mean we should look for the value in the data?
1202+
1203+
1204+ // Moving window to look for field.Value in the paramValue to directly replace
1205+ for _ , field := range fields {
1206+ // Arbitrary limit (for now)
1207+ if len (field .Value ) > 1024 {
1208+ continue
1209+ }
1210+
1211+ paramValue = strings .ReplaceAll (paramValue , field .Value , fmt .Sprintf ("{%s}" , field .Key ))
1212+ }
1213+
11981214 // Check if the file already exists
11991215 fileId := fmt .Sprintf ("file_parameter_%s-%s-%s-%s.json" , orgId , strings .ToLower (appId ), strings .Replace (strings .ToLower (actionName ), " " , "_" , - 1 ), strings .ToLower (paramName ))
12001216
@@ -6595,7 +6611,6 @@ SINGUL ACTIONS:
65956611
65966612 log .Printf ("PARAM: %s" , param .Value )
65976613 log .Printf ("Systemmessage: %s" , systemMessage )
6598- //os.Exit(3)
65996614
66006615 systemMessage += "\n \n "
66016616 }
@@ -6724,7 +6739,6 @@ SINGUL ACTIONS:
67246739
67256740 _ = userMessageChanged
67266741 //log.Printf("[INFO] INFO NEXT NODE PREDICTIONS")
6727- //os.Exit(3)
67286742 }
67296743
67306744 if lastFinishedIndex < - 1 {
0 commit comments