@ -33,17 +33,17 @@ def AgentActivityItemAdd(inGSettings, inHostNameStr, inUserStr, inActivityItemDi
if lAgentDictItemKeyTurple not in inGSettings [ " AgentDict " ] :
inGSettings [ " AgentDict " ] [ lAgentDictItemKeyTurple ] = SettingsTemplate . __AgentDictItemCreate__ ( )
lThisAgentDict = inGSettings [ " AgentDict " ] [ lAgentDictItemKeyTurple ]
lThisAgentDict [ " ActivityList " ] += inActivityItemDict
lThisAgentDict [ " ActivityList " ] .append ( inActivityItemDict )
# Send to agent activity item to OSCMD
def AgentOSCMD ( inGSettings , inHostNameStr , inUserStr , inCMDStr ):
def AgentOSCMD ( inGSettings , inHostNameStr , inUserStr , inCMDStr , inRunAsyncBool = True ):
# pyOpenRPA.Agent: Send CMD to OS. Result return to log + Orchestrator by the A2O connection
# def OSCMD(inCMDStr, inRunAsyncBool=True, inGSettings=None):
# Create Activity Item for the agent
lActivityItemDict = {
" Def " : " OSCMD " , # def alias (look pyOpeRPA.Agent gSettings["ProcessorDict"]["AliasDefDict"])
" ArgList " : [ ] , # Args list
" ArgDict " : { " inCMDStr " : inCMDStr , " inRunAsyncBool " : False } , # Args dictionary
" ArgDict " : { " inCMDStr " : inCMDStr , " inRunAsyncBool " : inRunAsyncBool } , # Args dictionary
" ArgGSettings " : " inGSettings " , # Name of GSettings attribute: str (ArgDict) or index (for ArgList)
" ArgLogger " : None # Name of GSettings attribute: str (ArgDict) or index (for ArgList)
}
@ -51,20 +51,26 @@ def AgentOSCMD(inGSettings, inHostNameStr, inUserStr, inCMDStr):
AgentActivityItemAdd ( inGSettings = inGSettings , inHostNameStr = inHostNameStr , inUserStr = inUserStr , inActivityItemDict = lActivityItemDict )
# Send to agent activity item to OSCMD
def AgentOSFile BytesCreate( inGSettings , inHostNameStr , inUserStr , inFilePathStr , inFile Bytes) :
def AgentOSFile Data BytesCreate( inGSettings , inHostNameStr , inUserStr , inFilePathStr , inFile Data Bytes) :
# pyOpenRPA.Agent: Send CMD to OS. Result return to log + Orchestrator by the A2O connection
# def OSFileBytesCreate(inFilePathStr, inFile Bytes,inGSettings = None):
# def OSFileBytesCreate(inFilePathStr, inFile Data Bytes,inGSettings = None):
# Create Activity Item for the agent
lActivityItemDict = {
" Def " : " OSFile BytesCreate" , # def alias (look pyOpeRPA.Agent gSettings["ProcessorDict"]["AliasDefDict"])
" Def " : " OSFile Data BytesCreate" , # def alias (look pyOpeRPA.Agent gSettings["ProcessorDict"]["AliasDefDict"])
" ArgList " : [ ] , # Args list
" ArgDict " : { " inFilePathStr " : inFilePathStr , " inFile Bytes" : inFile Bytes} , # Args dictionary
" ArgDict " : { " inFilePathStr " : inFilePathStr , " inFile Data Bytes" : inFile Data Bytes} , # Args dictionary
" ArgGSettings " : " inGSettings " , # Name of GSettings attribute: str (ArgDict) or index (for ArgList)
" ArgLogger " : None # Name of GSettings attribute: str (ArgDict) or index (for ArgList)
}
#Send item in AgentDict for the futher data transmition
AgentActivityItemAdd ( inGSettings = inGSettings , inHostNameStr = inHostNameStr , inUserStr = inUserStr , inActivityItemDict = lActivityItemDict )
# Send to agent activity item to OSCMD
def AgentOSFileDataStrCreate ( inGSettings , inHostNameStr , inUserStr , inFilePathStr , inFileDataStr , inEncodingStr = " utf-8 " ) :
# pyOpenRPA.Agent: Send CMD to OS. Result return to log + Orchestrator by the A2O connection
# def OSFileBytesCreate(inFilePathStr, inFileDataBytes,inGSettings = None):
# Create Activity Item for the agent
AgentOSFileDataBytesCreate ( inGSettings = inGSettings , inHostNameStr = inHostNameStr , inUserStr = inUserStr , inFilePathStr = inFilePathStr , inFileDataBytes = inFileDataStr . encode ( inEncodingStr ) )
# OS DEFS
# Defs to use in orchestrator