Testing pyOpenRPA.Orchestrator.Managers.Process defs

dev-linux
Ivan Maslov 3 years ago
parent 6026c771ae
commit e14bed7fca

@ -33,6 +33,7 @@ class Process():
self.mProcessNameWOExeStr = inProcessNameWOExeStr
self.mStopSafeTimeoutSecFloat = inStopSafeTimeoutSecFloat
__Orchestrator__.GSettingsGet()["ManagersProcessDict"][inProcessNameWOExeStr.upper()]=self
self.StatusCheck()
def Manual2Auto(self):
"""
@ -54,6 +55,8 @@ class Process():
# Send activity item to agent - wait result
if self.mStartPathStr is not None: lCMDStr = f"start {os.path.abspath(self.mStartPathStr)}"
elif self.mStartCMDStr is not None: lCMDStr = f"start {self.mStartCMDStr}"
#import pdb
#pdb.set_trace()
lActivityItemStart = __Orchestrator__.ProcessorActivityItemCreate(inDef="OSCMD",
inArgDict={"inCMDStr":lCMDStr,"inSendOutputToOrchestratorLogsBool":False},
inArgGSettingsStr="inGSettings")
@ -88,7 +91,7 @@ class Process():
:return:
"""
# Send activity item to agent - wait result
lCMDStr = f'taskkill /im "{self.mProcessNameWOExeStr}" /fi "username eq %USERNAME%"'
lCMDStr = f'taskkill /im "{self.mProcessNameWOExeStr}.exe" /fi "username eq %USERNAME%"'
lActivityItemStart = __Orchestrator__.ProcessorActivityItemCreate(
inDef="OSCMD",inArgDict={"inCMDStr": lCMDStr,"inSendOutputToOrchestratorLogsBool":False},inArgGSettingsStr="inGSettings")
lGUIDStr = __Orchestrator__.AgentActivityItemAdd(inHostNameStr=self.mAgentHostNameStr,

@ -1,2 +1,2 @@
from .ControlPanel import ControlPanel
from .Process import Process
from .ControlPanel import *
from .Process import *

@ -391,6 +391,7 @@ def pyOpenRPA_Debugging_HelperDefList(inRequest, inGSettings):
lPathSplitList = __Orchestrator__.WebRequestParsePath(inRequest=inRequest).split('/')
lQueryStr = None
if "HelperDefList" != lPathSplitList[-1] and "" != lPathSplitList[-1]: lQueryStr = lPathSplitList[-1]
if lQueryStr != "" and lQueryStr is not None:
lDefList = __Orchestrator__.ActivityItemHelperDefList(inDefQueryStr=lQueryStr)
for lDefStr in lDefList:
lResultDict["results"].append({"name": lDefStr, "value": lDefStr, "text": lDefStr})
@ -473,6 +474,7 @@ def SettingsUpdate(inGlobalConfiguration):
{"Method": "POST", "URL": "/pyOpenRPA/ProcessorQueueAdd", "MatchType": "Equal","ResponseDefRequestGlobal": pyOpenRPA_Processor, "ResponseContentType": "application/json"},
{"Method": "POST", "URL": "/pyOpenRPA/ActivityListExecute", "MatchType": "Equal","ResponseDefRequestGlobal": pyOpenRPA_ActivityListExecute, "ResponseContentType": "application/json"},
{"Method": "POST", "URL": "/pyOpenRPA/Agent/O2A", "MatchType": "Equal","ResponseDefRequestGlobal": pyOpenRPA_Agent_O2A, "ResponseContentType": "application/json"},
{"Method": "POST", "URL": "/pyOpenRPA/Agent/A2O", "MatchType": "Equal","ResponseDefRequestGlobal": pyOpenRPA_Agent_A2O, "ResponseContentType": "application/json"},
{"Method": "GET", "URL": "/pyOpenRPA/Debugging/HelperDefList/", "MatchType": "BeginWith","ResponseDefRequestGlobal": pyOpenRPA_Debugging_HelperDefList, "ResponseContentType": "application/json"},
{"Method": "GET", "URL": "/pyOpenRPA/Debugging/HelperDefAutofill/", "MatchType": "BeginWith","ResponseDefRequestGlobal": pyOpenRPA_Debugging_HelperDefAutofill, "ResponseContentType": "application/json"},
]

@ -1208,6 +1208,7 @@ def ActivityItemHelperDefAutofill(inDef):
}
lResultDict["Def"] = inDef
lGS = GSettingsGet()
if inDef in lGS["ProcessorDict"]["AliasDefDict"]:
lDefSignature = inspect.signature(lGS["ProcessorDict"]["AliasDefDict"][inDef])
for lItemKeyStr in lDefSignature.parameters:
lItemValue = lDefSignature.parameters[lItemKeyStr]

Loading…
Cancel
Save