@@ -36,7 +36,7 @@ def flowLogicEval(data,logicVar):
3636
3737def getObjectFromCode (codeFunction ):
3838 functionName = codeFunction .split ("(" )[0 ]
39- args = regexCommor .split (codeFunction [(len (functionName )+ 1 ):- 1 ])
39+ args = regexCommor .split (codeFunction . strip () [(len (functionName )+ 1 ):- 1 ])
4040 classObject = model ._model ().getAsClass (query = { "name" : functionName })[0 ].classObject ()
4141 classObject .enabled = True
4242 members = [attr for attr in dir (classObject ) if not callable (getattr (classObject , attr )) and not "__" in attr and attr ]
@@ -109,12 +109,15 @@ def executeCodifyFlow(eventsData,codifyData):
109109 while True :
110110 if currentObject :
111111 if currentFlow ["type" ] == "trigger" :
112- outputText += "\n TRIGGER"
113- outputText += "\n {0}" .format (currentFlow ["codeLine" ])
114- outputText += "\n pre-data={0}" .format (data )
112+ if currentObject .name == "" :
113+ outputText += "\n TRIGGER"
114+ else :
115+ outputText += "\n (t) - {0}:" .format (currentObject .name )
116+ outputText += "\n \t [function]\n \t \t {0}" .format (currentFlow ["codeLine" ])
117+ outputText += "\n \t [pre-data]\n \t \t {0}" .format (data )
115118 objectContinue = True
116119 if currentObject .logicString .startswith ("if" ):
117- outputText += "\n Checking logic {0} = " .format (currentObject .logicString )
120+ outputText += "\n \t [ logic] \n \t \t {0}\n \t \t " .format (currentObject .logicString )
118121 if logic .ifEval (currentObject .logicString ,{ "data" : data }):
119122 outputText += "Pass"
120123 if currentObject .varDefinitions :
@@ -133,27 +136,30 @@ def executeCodifyFlow(eventsData,codifyData):
133136 passData = copy .deepcopy (data )
134137 processQueue .append ({ "flow" : nextFlow , "data" : passData })
135138 passData = None
136- outputText += "\n post -data= {0}" .format (data )
139+ outputText += "\n \t [post -data] - \n \t \t {0}" .format (data )
137140 outputText += "\n "
138141 elif currentFlow ["type" ] == "action" :
139- outputText += "\n ACTION"
142+ if currentObject .name == "" :
143+ outputText += "\n ACTION"
144+ else :
145+ outputText += "\n (a) - {0}:" .format (currentObject .name )
140146 if currentObject .enabled :
141- outputText += "\n {0}" .format (currentFlow ["codeLine" ])
142- outputText += "\n pre -data= {0}" .format (data )
147+ outputText += "\n \t [function] \n \t \t {0}" .format (currentFlow ["codeLine" ])
148+ outputText += "\n \t [pre -data] \n \t \t {0}" .format (data )
143149 logic = currentFlow ["logic" ][5 :]
144- outputText += "\n Checking Flow logic {0} = " .format (logic )
150+ outputText += "\n \t [link logic] \n \t \t {0}\n \t \t " .format (logic )
145151 if flowLogicEval (data ,helpers .typeCast (logic )):
146152 outputText += "Pass"
147153 debugText , data ["action" ] = currentObject .runHandler (data ,persistentData ,debug = True )
148154 if debugText != "" :
149- outputText += "\n {0}" .format (debugText )
155+ outputText += "{0}" .format (debugText )
150156 passData = data
151157 for nextFlow in currentFlow ["next" ]:
152158 if not passData :
153159 passData = copy .deepcopy (data )
154160 processQueue .append ({ "flow" : nextFlow , "data" : passData })
155161 passData = None
156- outputText += "\n post -data= {0}" .format (data )
162+ outputText += "\n \t [post -data] \n \t \t {0}" .format (data )
157163 else :
158164 outputText += "Failed"
159165 outputText += "\n "
0 commit comments