+

+
+
+ {organization}
- }
+
- {answer !== undefined && answer !== null ? null :
-
{workflow.name}
- }
-
- {workflowQuestion.length > 0 ?
-
-
- {workflowQuestion}
+ {disabledButtons && message.length > 0 ? null :
+
+ {message}
+ }
+
+ {answer !== undefined && answer !== null ? null :
+ {workflow.name}
+ }
+
+ {workflowQuestion.length > 0 ?
+
+
+ {workflowQuestion}
+
+
+ : null}
+
+
+ }
+
+ {workflow.input_questions !== undefined && workflow.input_questions !== null && workflow.input_questions.length > 0 ?
+
+ {workflow.input_questions.map((question, index) => {
+
+ // Multiple choice checks for semicolon-splits
+ var multiChoiceOptions = question.value !== undefined && question.value !== null && question.value.length > 0 && question.value.includes(";") ? question.value.split(";") : []
+ // Remove empty keys from array
+ multiChoiceOptions = multiChoiceOptions.filter(function(e) { return e !== "" })
+ if (multiChoiceOptions.length > 1 && (executionArgument[multiChoiceOptions[0]] === undefined || executionArgument[multiChoiceOptions[0]] === null || executionArgument[multiChoiceOptions[0]] === "")) {
+ // Set the first item to be default
+ executionArgument[multiChoiceOptions[0]] = multiChoiceOptions[1]
+ }
+
+ return (
+
+
+ {multiChoiceOptions.length > 1 ?
+
+ {question.name}
+
+
+ :
+
{
+ executionArgument[question.value] = e.target.value
+ setExecutionArgument(executionArgument)
+ setUpdate(Math.random())
+ }}
+ />
+ }
+
+ )
+ })}
+
+ :
+ answer !== undefined && answer !== null ? null :
+
+ Runtime Argument
+
+ {
+ setExecutionArgument(e.target.value)
+ }}
+ />
+
+
+ }
+
+
+
+ {executionRunning ?
+
+
+
+ {/*executionData.status !== undefined && executionData.status !== null && executionData.status !== "" ?
+
+ Status: {executionData.status}
+
+ : null*/}
+
+ :
+ ((answer !== undefined && answer !== null) || (foundSourcenode !== undefined && foundSourcenode !== null)) ?
+
+
+ {disabledButtons && message.length > 0 ?
+
+ {message}. You may close this window.
+
+ :
+
+ {disabledButtons ? "Answered. You may close this window." : ""}
+
+ }
+
+ {disabledButtons ? null :
+
+ What do you want to do?
+
+ }
+
+
+
+ or
+
+
+
+
+ :
+
+
+
+ }
+
+
+ {workflow.output_yields !== undefined && workflow.output_yields !== null && workflow.output_yields.length > 0 ?
+
+ {workflow.output_yields.map((yieldItem, index) => {
+ if (executionData.results === undefined || executionData.results === null || executionData.results.length === 0) {
+ return null
+ }
+
+ const foundresult = executionData.results.find((result) => {
+ return result.action.id === yieldItem
+ })
+
+ if (foundresult === undefined || foundresult === null) {
+ return null
+ }
+
+ if (foundresult.status === "SKIPPED") {
+ return null
+ }
+
+ const validate = validateJson(foundresult.result)
+ validResults += 1
+ var appendedDetails = foundresult.result
+ if (validate.valid) {
+ appendedDetails =
{
+ return collapseField(jsonField)
+ }}
+ iconStyle={theme.palette.jsonIconStyle}
+ collapseStringsAfterLength={theme.palette.jsonCollapseStringsAfterLength}
+ displayArrayKey={false}
+ enableClipboard={(copy) => {
+ //handleReactJsonClipboard(copy);
+ }}
+ displayDataTypes={false}
+ onSelect={(select) => {
+ //HandleJsonCopy(validate.result, select, "exec");
+ }}
+ name={false}
+ />
+ }
+
+ return (
+
+ {foundresult?.action?.label?.replaceAll("_", " ")} - {foundresult.status}:
+
+
+ {appendedDetails}
+
+ )
+ })}
: null}
+
+ {executionInfo}
- }
-
- {workflow.input_questions !== undefined && workflow.input_questions !== null && workflow.input_questions.length > 0 ?
-
- {workflow.input_questions.map((question, index) => {
- return (
-
- {question.name}
- {
- //setExecutionArgument(e.target.value)
- executionArgument[question.value] = e.target.value
- setUpdate(Math.random())
- }}
- />
-
- )
- })}
-
- :
- answer !== undefined && answer !== null ? null :
-
- Runtime Argument
-
- {
- setExecutionArgument(e.target.value)
- }}
- />
-
-
- }
-
- {executionRunning ?
-
-
-
- {executionData.status !== undefined && executionData.status !== null && executionData.status !== "" ?
-
- Status: {executionData.status}
-
- : null}
-
- :
- ((answer !== undefined && answer !== null) || (foundSourcenode !== undefined && foundSourcenode !== null)) ?
-
-
- {disabledButtons && message.length > 0 ?
-
- {message}. You may close this window.
-
- :
-
- {disabledButtons ? "Answered. You may close this window." : ""}
-
- }
-
- {disabledButtons ? null :
-
- What do you want to do?
-
- }
-
-
-
- or
-
-
-
-
- :
-
-
-
- }
-
- {/*buttonClicked !== undefined && buttonClicked !== null && buttonClicked !== "finished" && buttonClicked.length > 0 ?
-

{
- console.log("Img loaded.")
- setTimeout(() => {
- console.log("Img closing.")
- setButtonClicked("finished")
-
- }, 1250)
-
- }}
- />
- : null*/}
-
-
- {executionInfo}
-
- {answer !== undefined && answer !== null ? null :
-
- }
-
+ {answer !== undefined && answer !== null ? null :
+
+ }
+
+
+
+
+ }
+