From 4a6595e56a2a5cb05cbadb37a4d14953156320f7 Mon Sep 17 00:00:00 2001 From: frikky Date: Fri, 19 Jun 2020 20:42:34 +0200 Subject: [PATCH] Fixed regex parsing for action variables --- backend/app_sdk/app_base.py | 3 ++- frontend/src/AngularWorkflow.js | 13 ++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/backend/app_sdk/app_base.py b/backend/app_sdk/app_base.py index a5e52921..9131d5d8 100644 --- a/backend/app_sdk/app_base.py +++ b/backend/app_sdk/app_base.py @@ -415,7 +415,7 @@ class AppBase: def parse_params(action, fullexecution, parameter): # Skip if it starts with $? jsonparsevalue = "$." - match = ".*([$]{1}([a-zA-Z0-9()# _-]+\.?){1,})" + match = ".*([$]{1}([a-zA-Z0-9# _-]+\.?){1,})" # Regex to find all the things if parameter["variant"] == "STATIC_VALUE": @@ -424,6 +424,7 @@ class AppBase: #self.logger.debug(f"\n\nHandle static data with JSON: {data}\n\n") #self.logger.info("STATIC PARSED: %s" % actualitem) if len(actualitem) > 0: + print("ACTUAL: %s", actualitem) for replace in actualitem: try: to_be_replaced = replace[0] diff --git a/frontend/src/AngularWorkflow.js b/frontend/src/AngularWorkflow.js index 822bcfa7..51200e49 100644 --- a/frontend/src/AngularWorkflow.js +++ b/frontend/src/AngularWorkflow.js @@ -1455,7 +1455,7 @@ const AngularWorkflow = (props) => { return (
- What are WORKFLOW variables? + What are WORKFLOW variables? {workflow.workflow_variables === null ? null : workflow.workflow_variables.map(variable=> { return ( @@ -1519,8 +1519,8 @@ const AngularWorkflow = (props) => {
- What are EXECUTION variables? - {workflow.execution_variables === null ? + What are EXECUTION variables? + {workflow.execution_variables === null || workflow.execution_variables === undefined ? null : workflow.execution_variables.map(variable=> { return (
@@ -2142,7 +2142,14 @@ const AngularWorkflow = (props) => { // appname & version // description // ACTION select + // const selectedNameChange = (event) => { + event.target.value = event.target.value.replace("(", "") + event.target.value = event.target.value.replace(")", "") + event.target.value = event.target.value.replace("$", "") + event.target.value = event.target.value.replace("#", "") + event.target.value = event.target.value.replace(".", "") + event.target.value = event.target.value.replace(",", "") selectedAction.label = event.target.value setSelectedAction(selectedAction) }