else:raiseException(f"Managers.Git ({inAgentHostNameStr}, {inAgentUserNameStr}, {lAbsPathUpperStr}): Can't init the Git instance because it already inited in early")
Orchestrator.OrchestratorLoggerGet().info(f"Managers.Git ({self.mAbsPathStr}): self.BranchRevLastGet, new rev (branch: {inBranchLocalStr}) has been detected - merge (branch: {inBranchRemoteStr})")
else:raiseException(f"Managers.Process ({inAgentHostNameStr}, {inAgentUserNameStr}, {inProcessNameWOExeStr}): Can't init the Process instance because it already inited in early (see ProcessInitSafe)")
lStr=f"Managers.Process ({self.mAgentHostNameStr}, {self.mAgentUserNameStr}, {self.mProcessNameWOExeStr}): Process will not start because of stopped manual or stop safe is now."
lL.info(f"Managers.Process ({self.mAgentHostNameStr}, {self.mAgentUserNameStr}, {self.mProcessNameWOExeStr}): Safe stop has been wait for {inStopSafeTimeoutSecFloat} sec. Now do the force stop.")
iflWarnSafeBool==True:__Orchestrator__.OrchestratorLoggerGet().warning(f"Managers.Process ({self.mAgentHostNameStr}, {self.mAgentUserNameStr}, {self.mProcessNameWOExeStr}): Safe status has been catched when safe > change saved status to stopped.")
returnself.mStatusStr
defStatusCheckIntervalRestore(self):
"""Call from orchestrator when init
"""
ifself.mStatusCheckIntervalSecFloatisnotNone:
__Orchestrator__.OrchestratorLoggerGet().info(f"Managers.Process ({self.mAgentHostNameStr}, {self.mAgentUserNameStr}, {self.mProcessNameWOExeStr}): Restore schedule to StatusCheck in interval of {self.mStatusCheckIntervalSecFloat} sec.")
Orchestrator.OrchestratorLoggerGet().info(f"Managers.Process ({self.mAgentHostNameStr}, {self.mAgentUserNameStr}, {self.mProcessNameWOExeStr}): Status has been restored to {self.mStatusSavedStr}")
self.mStatusStr=self.mStatusSavedStr
self.mStatusSavedStr=None
returnself.mStatusStr
defStatusChangeLog(self):
"""
Lofinformationaboutstatuschange
:return:
"""
# Log info about process
lL=__Orchestrator__.OrchestratorLoggerGet()
lL.info(f"Managers.Process ({self.mAgentHostNameStr}, {self.mAgentUserNameStr}, {self.mProcessNameWOExeStr}): Status has been changed to {self.mStatusStr})")
defStatusCheck(self):
"""
Checkifprocessisalive.Thedefwillsavethemanualflagisexists.Don't wait mute but set mute if it is not set.
@ -348,10 +366,12 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler):
self.end_headers()
# Write content as utf-8 data
self.wfile.write(inResponseDict["Body"])
exceptConnectionResetErrorase:
iflL:lL.warning(f"An existing connection was forcibly closed by the remote host - OK for the network interactions (ConnectionResetError: [WinError 10054])")
iflL:lL.warning(f"SERVER: Connection was forcibly closed by the client side - OK for the network interactions (ConnectionResetError: [WinError 10054] or ConnectionAbortedError: [WinError 10053])")
defdo_GET(self):
try:
threading.current_thread().request=self
self.OpenRPA={}
self.OpenRPA["AuthToken"]=None
self.OpenRPA["Domain"]=None
@ -361,6 +381,16 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler):
lUACBool=dUAC(inRoleKeyList=lUACCPTemplateKeyList+[lItemKeyStr])# Check if render function is applicable User Access Rights (UAC)
iflItemKeyStr=="VersionCheck":lUACBool=True# For backward compatibility for the old fron version which not reload page when new orch version is comming
iflUACBool:# Run function if UAC is TRUE
# JSONGeneratorDef
iflJSInitGeneratorDefisnotNone:# Call def (inRequest, inGSettings) or def (inGSettings)
lJSResult=None
lDEFSignature=signature(lJSInitGeneratorDef)# Get signature of the def
lDEFARGLen=len(lDEFSignature.parameters.keys())# get count of the def args
lUACBool=dUAC(inRoleKeyList=lUACCPTemplateKeyList+[lItemKeyStr])# Check if render function is applicable User Access Rights (UAC)
iflItemKeyStr=="VersionCheck":lUACBool=True# For backward compatibility for the old fron version which not reload page when new orch version is comming
iflUACBool:# Run function if UAC is TRUE
lCPItemDict={"HTMLStr":None,"JSONDict":None}
# HTMLRenderDef
iflItemHTMLRenderDefisnotNone:# Call def (inRequest, inGSettings) or def (inGSettings)
lHTMLResult=None
lDEFSignature=signature(lItemHTMLRenderDef)# Get signature of the def
lDEFARGLen=len(lDEFSignature.parameters.keys())# get count of the def args
iflL:lL.debug(f"SERVER: pyOpenRPA_Agent_A2O:: Has recieved result of the activity items from agent! ActivityItem GUID Str: {lActivityReturnItemKeyStr}; Return value: {lActivityReturnItemValue}")
lLogStr="x bytes"
try:
iflActivityReturnItemValueisnotNone:
lLogStr=f"{len(lActivityReturnItemValue)} bytes"
exceptExceptionase:
pass
iflL:lL.debug(f"SERVER: pyOpenRPA_Agent_A2O:: Has recieved result of the activity items from agent! ActivityItem GUID Str: {lActivityReturnItemKeyStr}; Return value len: {lLogStr}")
# Terminator.IsSignalClose() # True - WM_CLOSE SIGNAL has come
# Terminator.SessionLogoff() # Logoff the session
# from pyOpenRPA.Tools import StopSafe
# StopSafe.Init(inLogger=None)
# StopSafe.IsSafeStop() # True - WM_CLOSE SIGNAL has come. taskkill /im someprocess.exe
"""
importwin32con
importwin32gui
@ -12,33 +14,35 @@ gLogger = None
gWindowTitleStr="PythonTerminator"# Title of the phantom window
gWindowDescriptionStr="pyOpenRPA library for safe turn off the program (by send the WM_CLOSE signal from task kill)"# Description of the phantom window
Python job scheduling for humans. Run Python functions (or any other callable) periodically using a friendly syntax.
- A simple to use API for scheduling jobs, made for humans.
- In-process scheduler for periodic jobs. No extra processes needed!
- Very lightweight and no external dependencies.
- Excellent test coverage.
- Tested on Python and 3.6, 3.7, 3.8, 3.9
Usage
-----
.. code-block:: bash
$ pip install schedule
.. code-block:: python
import schedule
import time
def job():
print("I'm working...")
schedule.every(10).seconds.do(job)
schedule.every(10).minutes.do(job)
schedule.every().hour.do(job)
schedule.every().day.at("10:30").do(job)
schedule.every(5).to(10).minutes.do(job)
schedule.every().monday.do(job)
schedule.every().wednesday.at("13:15").do(job)
schedule.every().minute.at(":17").do(job)
while True:
schedule.run_pending()
time.sleep(1)
Documentation
-------------
Schedule's documentation lives at `schedule.readthedocs.io <https://schedule.readthedocs.io/>`_.
Meta
----
Daniel Bader - `@dbader_org <https://twitter.com/dbader_org>`_ - mail@dbader.org
Inspired by `Adam Wiggins' <https://github.com/adamwiggins>`_ article `"Rethinking Cron" <https://adam.herokuapp.com/past/2010/4/13/rethinking_cron/>`_ and the `clockwork <https://github.com/Rykian/clockwork>`_ Ruby module.
Distributed under the MIT license. See `LICENSE.txt <https://github.com/dbader/schedule/blob/master/LICENSE.txt>`_ for more information.
else:raiseException(f"Managers.Git ({inAgentHostNameStr}, {inAgentUserNameStr}, {lAbsPathUpperStr}): Can't init the Git instance because it already inited in early")
Orchestrator.OrchestratorLoggerGet().info(f"Managers.Git ({self.mAbsPathStr}): self.BranchRevLastGet, new rev (branch: {inBranchLocalStr}) has been detected - merge (branch: {inBranchRemoteStr})")
else:raiseException(f"Managers.Process ({inAgentHostNameStr}, {inAgentUserNameStr}, {inProcessNameWOExeStr}): Can't init the Process instance because it already inited in early (see ProcessInitSafe)")
lStr=f"Managers.Process ({self.mAgentHostNameStr}, {self.mAgentUserNameStr}, {self.mProcessNameWOExeStr}): Process will not start because of stopped manual or stop safe is now."
lL.info(f"Managers.Process ({self.mAgentHostNameStr}, {self.mAgentUserNameStr}, {self.mProcessNameWOExeStr}): Safe stop has been wait for {inStopSafeTimeoutSecFloat} sec. Now do the force stop.")
iflWarnSafeBool==True:__Orchestrator__.OrchestratorLoggerGet().warning(f"Managers.Process ({self.mAgentHostNameStr}, {self.mAgentUserNameStr}, {self.mProcessNameWOExeStr}): Safe status has been catched when safe > change saved status to stopped.")
returnself.mStatusStr
defStatusCheckIntervalRestore(self):
"""Call from orchestrator when init
"""
ifself.mStatusCheckIntervalSecFloatisnotNone:
__Orchestrator__.OrchestratorLoggerGet().info(f"Managers.Process ({self.mAgentHostNameStr}, {self.mAgentUserNameStr}, {self.mProcessNameWOExeStr}): Restore schedule to StatusCheck in interval of {self.mStatusCheckIntervalSecFloat} sec.")
Orchestrator.OrchestratorLoggerGet().info(f"Managers.Process ({self.mAgentHostNameStr}, {self.mAgentUserNameStr}, {self.mProcessNameWOExeStr}): Status has been restored to {self.mStatusSavedStr}")
self.mStatusStr=self.mStatusSavedStr
self.mStatusSavedStr=None
returnself.mStatusStr
defStatusChangeLog(self):
"""
Lofinformationaboutstatuschange
:return:
"""
# Log info about process
lL=__Orchestrator__.OrchestratorLoggerGet()
lL.info(f"Managers.Process ({self.mAgentHostNameStr}, {self.mAgentUserNameStr}, {self.mProcessNameWOExeStr}): Status has been changed to {self.mStatusStr})")
defStatusCheck(self):
"""
Checkifprocessisalive.Thedefwillsavethemanualflagisexists.Don't wait mute but set mute if it is not set.
@ -348,10 +366,12 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler):
self.end_headers()
# Write content as utf-8 data
self.wfile.write(inResponseDict["Body"])
exceptConnectionResetErrorase:
iflL:lL.warning(f"An existing connection was forcibly closed by the remote host - OK for the network interactions (ConnectionResetError: [WinError 10054])")
iflL:lL.warning(f"SERVER: Connection was forcibly closed by the client side - OK for the network interactions (ConnectionResetError: [WinError 10054] or ConnectionAbortedError: [WinError 10053])")
defdo_GET(self):
try:
threading.current_thread().request=self
self.OpenRPA={}
self.OpenRPA["AuthToken"]=None
self.OpenRPA["Domain"]=None
@ -361,6 +381,16 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler):
lUACBool=dUAC(inRoleKeyList=lUACCPTemplateKeyList+[lItemKeyStr])# Check if render function is applicable User Access Rights (UAC)
iflItemKeyStr=="VersionCheck":lUACBool=True# For backward compatibility for the old fron version which not reload page when new orch version is comming
iflUACBool:# Run function if UAC is TRUE
# JSONGeneratorDef
iflJSInitGeneratorDefisnotNone:# Call def (inRequest, inGSettings) or def (inGSettings)
lJSResult=None
lDEFSignature=signature(lJSInitGeneratorDef)# Get signature of the def
lDEFARGLen=len(lDEFSignature.parameters.keys())# get count of the def args
lUACBool=dUAC(inRoleKeyList=lUACCPTemplateKeyList+[lItemKeyStr])# Check if render function is applicable User Access Rights (UAC)
iflItemKeyStr=="VersionCheck":lUACBool=True# For backward compatibility for the old fron version which not reload page when new orch version is comming
iflUACBool:# Run function if UAC is TRUE
lCPItemDict={"HTMLStr":None,"JSONDict":None}
# HTMLRenderDef
iflItemHTMLRenderDefisnotNone:# Call def (inRequest, inGSettings) or def (inGSettings)
lHTMLResult=None
lDEFSignature=signature(lItemHTMLRenderDef)# Get signature of the def
lDEFARGLen=len(lDEFSignature.parameters.keys())# get count of the def args
iflL:lL.debug(f"SERVER: pyOpenRPA_Agent_A2O:: Has recieved result of the activity items from agent! ActivityItem GUID Str: {lActivityReturnItemKeyStr}; Return value: {lActivityReturnItemValue}")
lLogStr="x bytes"
try:
iflActivityReturnItemValueisnotNone:
lLogStr=f"{len(lActivityReturnItemValue)} bytes"
exceptExceptionase:
pass
iflL:lL.debug(f"SERVER: pyOpenRPA_Agent_A2O:: Has recieved result of the activity items from agent! ActivityItem GUID Str: {lActivityReturnItemKeyStr}; Return value len: {lLogStr}")
# Terminator.IsSignalClose() # True - WM_CLOSE SIGNAL has come
# Terminator.SessionLogoff() # Logoff the session
# from pyOpenRPA.Tools import StopSafe
# StopSafe.Init(inLogger=None)
# StopSafe.IsSafeStop() # True - WM_CLOSE SIGNAL has come. taskkill /im someprocess.exe
"""
importwin32con
importwin32gui
@ -12,33 +14,35 @@ gLogger = None
gWindowTitleStr="PythonTerminator"# Title of the phantom window
gWindowDescriptionStr="pyOpenRPA library for safe turn off the program (by send the WM_CLOSE signal from task kill)"# Description of the phantom window
Dear RPA-tors. Let me congratulate you with great change in the RPA world. Since 2019 the first enterprise level open source RPA platform is here!
pyOpenRPA is absolutely open source commercial project. Hosted by LLC PYOPENRPA (RUSSIA)
The pyOpenRPA - free, fast and reliable
Powerful OpenSource RPA tool for business (based on python 3). Best performance and absolutely free!
The pyOpenRPA is based on Python and using well known OpenSource solutions such as Selenium, OpenCV, Win32, UI automation and others. Thanks to it we were able to create consolidated platform with all possible features.
The pyOpenRPA is distributed under the MIT license which allows you to use it in any way you want and any time you need without any restrictions.
The pyOpenRPA is distributed under the PYOPENRPA license.
At the time of this writing the pyOpenRPA is successfully using in several big Russian companies. Companies in which it was decided to develop own RPA division with no dependencies on expensive licenses.
<li><p><strong>inGSettings</strong>– Agent global settings dict</p></li>
<li><p><strong>inSendOutputToOrchestratorLogsBool</strong>– True - catch cmd execution output and send it to the Orchestrator logs; Flase - else case; Default True</p></li>
<li><p><strong>inCMDEncodingStr</strong>– Set the encoding of the DOS window on the Agent server session. Windows is beautiful :) . Default is “cp1251” early was “cp866” - need test</p></li>
<li><p><strong>inCaptureBool</strong>– !ATTENTION! If you need to start absolutely encapsulated app - set this flag as False. If you set True - the app output will come to Agent</p></li>
</ul>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p></p>
</dd>
</dl>
<p>!ATTENTION! If you need to start absolutely encapsulated app - set this flag as False. If you set True - the app output will come to Agent
:param inCMDEncodingStr: Set the encoding of the DOS window on the Agent server session. Windows is beautiful :) . Default is “cp1251” early was “cp866” - need test
:return:</p>
</dd></dl>
<dlclass="py function">
@ -273,6 +278,20 @@
</dl>
</dd></dl>
<dlclass="py function">
<dtid="pyOpenRPA.Agent.__Agent__.OSFileMTimeGet">
<codeclass="sig-prename descclassname">pyOpenRPA.Agent.__Agent__.</code><codeclass="sig-name descname">OSFileMTimeGet</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inFilePathStr</span><spanclass="p">:</span><spanclass="n">str</span></em><spanclass="sig-paren">)</span>→ float<aclass="reference internal"href="../_modules/pyOpenRPA/Agent/__Agent__.html#OSFileMTimeGet"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Agent.__Agent__.OSFileMTimeGet"title="Permalink to this definition">¶</a></dt>
<dd><p>Read file modification time timestamp format (float)</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>inFilePathStr</strong>– File path to read</p>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>timestamp (float) Return None if file is not exist</p>
<codeclass="sig-prename descclassname">pyOpenRPA.Agent.__Agent__.</code><codeclass="sig-name descname">OSFileTextDataStrCreate</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inFilePathStr</span></em>, <emclass="sig-param"><spanclass="n">inFileDataStr</span></em>, <emclass="sig-param"><spanclass="n">inEncodingStr</span><spanclass="o">=</span><spanclass="default_value">'utf-8'</span></em>, <emclass="sig-param"><spanclass="n">inGSettings</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Agent/__Agent__.html#OSFileTextDataStrCreate"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Agent.__Agent__.OSFileTextDataStrCreate"title="Permalink to this definition">¶</a></dt>
<td><p>Send signal via power shell to restart remote PC ATTENTION: Orchestrator user need to have restart right on the Remote machine to restart PC.</p></td>
<td><p>Check _SessionLast_RDPList.json and _SessionLast_StorageDict.pickle in working directory. if exist - load into gsettings # _SessionLast_StorageDict.pickle (binary) _SessionLast_RDPList.json (encoding = “utf-8”) _SessionLast_StorageDict.pickle (binary).</p></td>
<td><p>Check _SessioLast… files in working directory. if exist - load into gsettings (from version 1.2.7) _SessionLast_GSettings.pickle (binary).</p></td>
<td><p>Create alias for def (can be used in ActivityItem in field Def) !WHEN DEF ALIAS IS REQUIRED! - Def alias is required when you try to call Python def from the Orchestrator WEB side (because you can’t transmit Python def object out of the Python environment) Deprecated.</p></td>
<li><p><strong>inSendOutputToOrchestratorLogsBool</strong>– True - catch cmd execution output and send it to the Orchestrator logs; Flase - else case; Default True</p></li>
<li><p><strong>inCMDEncodingStr</strong>– Set the encoding of the DOS window on the Agent server session. Windows is beautiful :) . Default is “cp1251” early was “cp866” - need test</p></li>
<li><p><strong>inCaptureBool</strong>– !ATTENTION! If you need to start absolutely encapsulated app - set this flag as False. If you set True - the app output will come to Agent</p></li>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">AgentOSFileBinaryDataReceive</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inHostNameStr</span></em>, <emclass="sig-param"><spanclass="n">inUserStr</span></em>, <emclass="sig-param"><spanclass="n">inFilePathStr</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#AgentOSFileBinaryDataReceive"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSFileBinaryDataReceive"title="Permalink to this definition">¶</a></dt>
<dd><p>Read binary file from agent (synchronious)</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>inGSettings</strong>– Global settings dict (singleton)</p></li>
<li><p><strong>inHostNameStr</strong>–</p></li>
<li><p><strong>inUserStr</strong>–</p></li>
<li><p><strong>inFilePathStr</strong>– File path to read</p></li>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">OrchestratorInitWait</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span>→ None<aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#OrchestratorInitWait"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorInitWait"title="Permalink to this definition">¶</a></dt>
<dd><p>Wait thread while orc will process initial action.
ATTENTION: DO NOT CALL THIS DEF IN THREAD WHERE ORCHESTRATOR MUST BE INITIALIZED - INFINITE LOOP</p>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">OrchestratorIsAdmin</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#OrchestratorIsAdmin"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorIsAdmin"title="Permalink to this definition">¶</a></dt>
@ -1193,9 +1232,23 @@ ATTENTION: Orchestrator user need to have restart right on the Remote machine to
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">OrchestratorIsInited</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span>→ bool<aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#OrchestratorIsInited"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorIsInited"title="Permalink to this definition">¶</a></dt>
<dd><p>Check if Orchestrator initial actions were processed</p>
<dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>True - orc is already inited; False - else</p>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">OrchestratorLoggerGet</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#OrchestratorLoggerGet"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorLoggerGet"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">OrchestratorLoggerGet</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span>→ logging.Logger<aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#OrchestratorLoggerGet"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorLoggerGet"title="Permalink to this definition">¶</a></dt>
<dd><p>Get the logger from the Orchestrator</p>
<dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
@ -1206,32 +1259,37 @@ ATTENTION: Orchestrator user need to have restart right on the Remote machine to
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">OrchestratorPySearchInit</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inGlobPatternStr</span></em>, <emclass="sig-param"><spanclass="n">inDefStr</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="n">inDefArgNameGSettingsStr</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#OrchestratorPySearchInit"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorPySearchInit"title="Permalink to this definition">¶</a></dt>
<dd><p>Search the py files by the glob and do the safe init (in try except). Also add inited module in sys.modules as imported (module name = file name without extension).</p>
<divclass="highlight-python notranslate"><divclass="highlight"><pre><span></span><spanclass="c1"># USAGE VAR 1 (without the def auto call)</span>
<spanclass="c1"># Autoinit control panels starts with CP_</span>
<spanclass="n">gSettings</span><spanclass="p">[</span><spanclass="s2">"Logger"</span><spanclass="p">]</span><spanclass="o">.</span><spanclass="n">exception</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"Exception when init CP. See below."</span><spanclass="p">)</span>
</pre></div>
</div>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">OrchestratorPySearchInit</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inGlobPatternStr</span></em>, <emclass="sig-param"><spanclass="n">inDefStr</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="n">inDefArgNameGSettingsStr</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="n">inAsyncInitBool</span><spanclass="o">=</span><spanclass="default_value">False</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#OrchestratorPySearchInit"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorPySearchInit"title="Permalink to this definition">¶</a></dt>
<dd><p>Search the py files by the glob and do the safe init (in try except). Also add inited module in sys.modules as imported (module name = file name without extension).
You can init CP in async way!
.. code-block:: python</p>
<blockquote>
<div><p># USAGE VAR 1 (without the def auto call)
# Autoinit control panels starts with <ahref="#id3"><spanclass="problematic"id="id4">CP_</span></a>
<li><p><strong>inDefStr</strong>– OPTIONAL The string name of the def. For backward compatibility if you need to auto call some def from initialized module</p></li>
<li><p><strong>inDefArgNameGSettingsStr</strong>– OPTIONAL The name of the GSettings argument in def (if exists)</p></li>
<li><p><strong>inAsyncInitBool</strong>– OPTIONAL True - init py modules in many threads - parallel execution. False (default) - sequence execution</p></li>
</ul>
</dd>
<dtclass="field-even">Returns</dt>
@ -1277,12 +1335,16 @@ ATTENTION: Orchestrator user need to have restart right on the Remote machine to
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">OrchestratorSessionRestore</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inGSettings</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#OrchestratorSessionRestore"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionRestore"title="Permalink to this definition">¶</a></dt>
<dd><p>Check _SessionLast_RDPList.json and _SessionLast_StorageDict.pickle in working directory. if exist - load into gsettings
# _SessionLast_StorageDict.pickle (binary)</p>
<dd><p>Check _SessioLast… files in working directory. if exist - load into gsettings
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">OrchestratorSessionSave</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inGSettings</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#OrchestratorSessionSave"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionSave"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="simple">
<dt>Orchestrator session save in file</dt><dd><p>_SessionLast_RDPList.json (encoding = “utf-8”)
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">WebAuditMessageCreate</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inRequest</span></em>, <emclass="sig-param"><spanclass="n">inOperationCodeStr</span><spanclass="o">=</span><spanclass="default_value">'-'</span></em>, <emclass="sig-param"><spanclass="n">inMessageStr</span><spanclass="o">=</span><spanclass="default_value">'-'</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#WebAuditMessageCreate"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebAuditMessageCreate"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">WebAuditMessageCreate</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inRequest</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="n">inOperationCodeStr</span><spanclass="o">=</span><spanclass="default_value">'-'</span></em>, <emclass="sig-param"><spanclass="n">inMessageStr</span><spanclass="o">=</span><spanclass="default_value">'-'</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#WebAuditMessageCreate"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebAuditMessageCreate"title="Permalink to this definition">¶</a></dt>
<dd><p>Create message string with request user details (IP, Login etc…). Very actual for IT security in big company.</p>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">WebRequestGet</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#WebRequestGet"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebRequestGet"title="Permalink to this definition">¶</a></dt>
<dd><p>Return the web request instance if current thread was created by web request from client. else return None</p>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">WebRequestParseBodyBytes</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inRequest</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#WebRequestParseBodyBytes"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebRequestParseBodyBytes"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">WebRequestParseBodyBytes</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inRequest</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#WebRequestParseBodyBytes"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebRequestParseBodyBytes"title="Permalink to this definition">¶</a></dt>
<dd><p>Extract the body in bytes from the request</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>inRequest</strong>– inRequest from the server</p>
<ddclass="field-odd"><p><strong>inRequest</strong>– inRequest from the server. Optional if call def from request thread</p>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">WebRequestParseBodyJSON</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inRequest</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#WebRequestParseBodyJSON"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebRequestParseBodyJSON"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">WebRequestParseBodyJSON</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inRequest</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#WebRequestParseBodyJSON"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebRequestParseBodyJSON"title="Permalink to this definition">¶</a></dt>
<dd><p>Extract the body in dict/list from the request</p>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">WebRequestParseBodyStr</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inRequest</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#WebRequestParseBodyStr"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebRequestParseBodyStr"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">WebRequestParseBodyStr</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inRequest</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#WebRequestParseBodyStr"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebRequestParseBodyStr"title="Permalink to this definition">¶</a></dt>
<dd><p>Extract the body in str from the request</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>inRequest</strong>– inRequest from the server</p>
<ddclass="field-odd"><p><strong>inRequest</strong>– inRequest from the server. Optional if call def from request thread</p>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">WebRequestParseFile</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inRequest</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#WebRequestParseFile"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebRequestParseFile"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">WebRequestParseFile</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inRequest</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#WebRequestParseFile"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebRequestParseFile"title="Permalink to this definition">¶</a></dt>
<dd><p>Parse the request - extract the file (name, body in bytes)</p>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">WebRequestParsePath</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inRequest</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#WebRequestParsePath"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebRequestParsePath"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">WebRequestParsePath</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inRequest</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#WebRequestParsePath"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebRequestParsePath"title="Permalink to this definition">¶</a></dt>
<dd><p>Parse the request - extract the url. Example: /pyOpenRPA/Debugging/DefHelper/…</p>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">WebRequestResponseSend</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inRequest</span></em>, <emclass="sig-param"><spanclass="n">inResponeStr</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#WebRequestResponseSend"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebRequestResponseSend"title="Permalink to this definition">¶</a></dt>
<dd><p>Send response for the request
:return:</p>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">WebRequestResponseSend</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inResponeStr</span></em>, <emclass="sig-param"><spanclass="n">inRequest</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#WebRequestResponseSend"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebRequestResponseSend"title="Permalink to this definition">¶</a></dt>
<dd><p>Send response for the request</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>inRequest</strong>– inRequest from the server. Optional if call def from request thread</p>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">WebUserInfoGet</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inRequest</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#WebUserInfoGet"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebUserInfoGet"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">WebUserInfoGet</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inRequest</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#WebUserInfoGet"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebUserInfoGet"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">WebUserIsSuperToken</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inRequest</span></em>, <emclass="sig-param"><spanclass="n">inGSettings</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#WebUserIsSuperToken"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebUserIsSuperToken"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">WebUserIsSuperToken</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inRequest</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="n">inGSettings</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#WebUserIsSuperToken"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebUserIsSuperToken"title="Permalink to this definition">¶</a></dt>
<dd><p>Return bool if request is authentificated with supetoken (token which is never expires)</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>inRequest</strong>–</p></li>
<li><p><strong>inRequest</strong>–inRequest from the server. Optional if call def from request thread</p></li>
<li><p><strong>inGSettings</strong>– Global settings dict (singleton)</p></li>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">WebUserUACHierarchyGet</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inRequest</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#WebUserUACHierarchyGet"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebUserUACHierarchyGet"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">WebUserUACHierarchyGet</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inRequest</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#WebUserUACHierarchyGet"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.WebUserUACHierarchyGet"title="Permalink to this definition">¶</a></dt>
<dd><p>Return User UAC Hierarchy DICT Return {…}</p>
<spanclass="s2">"URL"</span><spanclass="p">:</span><spanclass="s2">"/test/"</span><spanclass="p">,</span><spanclass="c1"># URL of the request</span>
<spanclass="c1"># # "ResponseDefRequestGlobal": None #Function with str result</span>
<spanclass="c1"># # "UACBool": True # True - check user access before do this URL item</span>
<spanclass="c1">#}</span>
<spanclass="p">],</span>
<spanclass="p">},</span>
@ -343,6 +345,7 @@
<spanclass="p">],</span>
<spanclass="p">},</span>
<spanclass="s2">"ManagersProcessDict"</span><spanclass="p">:{},</span><spanclass="c1"># The key of the Process is (mAgentHostNameStr.upper(), mAgentUserNameStr.upper(), mProcessNameWOExeStr.upper())</span>
<spanclass="s2">"ManagersGitDict"</span><spanclass="p">:{},</span><spanclass="c1"># The key of the Git instance is (mAgentHostNameStr.upper(), mAgentUserNameStr.upper(), mAbsPathUpperStr.upper())</span>
<spanclass="s2">"ProcessorDict"</span><spanclass="p">:</span><spanclass="p">{</span><spanclass="c1"># Has been changed. New general processor (one threaded) v.1.2.0</span>
<spanclass="s2">"ActivityList"</span><spanclass="p">:</span><spanclass="p">[</span><spanclass="c1"># List of the activities</span>
<spanclass="c1"># {</span>
@ -354,26 +357,13 @@
<spanclass="c1"># "GUIDStr": ..., # GUID of the activity</span>
<spanclass="c1"># },</span>
<spanclass="p">],</span>
<spanclass="s2">"ActivityItemNowDict"</span><spanclass="p">:</span><spanclass="kc">None</span><spanclass="p">,</span><spanclass="c1"># Activity Item which is executing now</span>
<spanclass="s2">"AliasDefDict"</span><spanclass="p">:</span><spanclass="p">{},</span><spanclass="c1"># Storage for def with Str alias. To use it see pyOpenRPA.Orchestrator.ControlPanel</span>
<spanclass="s2">"CheckIntervalSecFloat"</span><spanclass="p">:</span><spanclass="mf">1.0</span><spanclass="p">,</span><spanclass="c1"># Interval for check gSettings in ProcessorDict > ActivityList</span>
<spanclass="s2">"ExecuteBool"</span><spanclass="p">:</span><spanclass="kc">True</span><spanclass="p">,</span><spanclass="c1"># Flag to execute thread processor</span>
<spanclass="s2">"ThreadIdInt"</span><spanclass="p">:</span><spanclass="kc">None</span><spanclass="p">,</span><spanclass="c1"># Technical field - will be setup when processor init</span>
<spanclass="s2">"WarningExecutionMoreThanSecFloat"</span><spanclass="p">:</span><spanclass="mf">60.0</span><spanclass="c1"># Push warning if execution more than n seconds</span>
<spanclass="p">},</span>
<spanclass="c1"># TODO REMOVE DEPRECATED KEYS IN v.2.0.0</span>
<spanclass="s2">"ControlPanelDict"</span><spanclass="p">:</span><spanclass="p">{</span><spanclass="c1"># Old structure > CPDict</span>
<p>If you need more configurations - so you can see here:</p>
<divclass="highlight-default notranslate"><divclass="highlight"><pre><span></span><spanclass="kn">import</span><spanclass="nn">psutil</span><spanclass="o">,</span><spanclass="nn">datetime</span><spanclass="o">,</span><spanclass="nn">logging</span><spanclass="o">,</span><spanclass="nn">os</span><spanclass="o">,</span><spanclass="nn">sys</span><spanclass="c1"># stdout from logging</span>
<spanclass="n">lPyOpenRPASourceFolderPathStr</span><spanclass="o">=</span><spanclass="sa">r</span><spanclass="s2">"..\Sources"</span><spanclass="c1"># Path for test pyOpenRPA package</span>
<spanclass="nb">print</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"Orchestrator will be run as administrator!"</span><spanclass="p">)</span>
<spanclass="k">elif</span><spanclass="vm">__name__</span><spanclass="o">==</span><spanclass="s2">"__main__"</span><spanclass="p">:</span><spanclass="c1"># New init way - allow run as module -m PyOpenRPA.Orchestrator</span>
<spanclass="c1">#gSettings = SettingsTemplate.Create(inModeStr="BASIC") # Create GSettings with basic configuration - no more config is available from the box - you can create own</span>
<spanclass="nb">print</span><spanclass="p">(</span><spanclass="s2">"!WARNING! Current orchestrator settings do not support old type of the Orchestrator start. Use new Orchestrator type start (see v1.2.0)"</span><spanclass="p">)</span>
<spanclass="kn">from</span><spanclass="nn">.</span><spanclass="kn">import</span><spanclass="n">O2A</span><spanclass="p">,</span><spanclass="n">A2O</span><spanclass="c1"># Data flow Orchestrator To Agent</span>
<spanclass="kn">from</span><spanclass="nn">subprocess</span><spanclass="kn">import</span><spanclass="n">CREATE_NEW_CONSOLE</span><spanclass="c1"># Flag to create new process in another CMD</span>
<spanclass="n">lMessageStr</span><spanclass="o">=</span><spanclass="sa">f</span><spanclass="s2">"AGENT Binary file </span><spanclass="si">{</span><spanclass="n">inFilePathStr</span><spanclass="si">}</span><spanclass="s2"> has been read."</span>
<spanclass="n">lMessageStr</span><spanclass="o">=</span><spanclass="sa">f</span><spanclass="s2">"OSFileBinaryDataBase64StrReceive: file </span><spanclass="si">{</span><spanclass="n">inFilePathStr</span><spanclass="si">}</span><spanclass="s2"> has been read"</span>
<spanclass="k">if</span><spanclass="n">lL</span><spanclass="p">:</span><spanclass="n">lL</span><spanclass="o">.</span><spanclass="n">debug</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"OSFileBinaryDataBase64StrReceive: file </span><spanclass="si">{</span><spanclass="n">inFilePathStr</span><spanclass="si">}</span><spanclass="s2"> is not exists - return None"</span><spanclass="p">)</span>
<spanclass="k">if</span><spanclass="n">lL</span><spanclass="p">:</span><spanclass="n">lL</span><spanclass="o">.</span><spanclass="n">debug</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"OSFileMTimeGet: file </span><spanclass="si">{</span><spanclass="n">inFilePathStr</span><spanclass="si">}</span><spanclass="s2"> has been read"</span><spanclass="p">)</span>
<spanclass="k">else</span><spanclass="p">:</span>
<spanclass="k">if</span><spanclass="n">lL</span><spanclass="p">:</span><spanclass="n">lL</span><spanclass="o">.</span><spanclass="n">debug</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"OSFileMTimeGet: file </span><spanclass="si">{</span><spanclass="n">inFilePathStr</span><spanclass="si">}</span><spanclass="s2"> is not exists - return None"</span><spanclass="p">)</span>
<spanclass="n">lMessageStr</span><spanclass="o">=</span><spanclass="sa">f</span><spanclass="s2">"AGENT Text file </span><spanclass="si">{</span><spanclass="n">inFilePathStr</span><spanclass="si">}</span><spanclass="s2"> has been read."</span>
<spanclass="n">lMessageStr</span><spanclass="o">=</span><spanclass="sa">f</span><spanclass="s2">"OSFileTextDataStrReceive: file </span><spanclass="si">{</span><spanclass="n">inFilePathStr</span><spanclass="si">}</span><spanclass="s2"> has been read"</span>
<spanclass="k">if</span><spanclass="n">lL</span><spanclass="p">:</span><spanclass="n">lL</span><spanclass="o">.</span><spanclass="n">info</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"OSFileTextDataStrReceive: file </span><spanclass="si">{</span><spanclass="n">inFilePathStr</span><spanclass="si">}</span><spanclass="s2"> is not exists - return None"</span><spanclass="p">)</span>
<spanclass="sd"> :param inGSettings: Agent global settings dict</span>
<spanclass="sd"> :param inSendOutputToOrchestratorLogsBool: True - catch cmd execution output and send it to the Orchestrator logs; Flase - else case; Default True</span>
<spanclass="sd"> !ATTENTION! If you need to start absolutely encapsulated app - set this flag as False. If you set True - the app output will come to Agent</span>
<spanclass="sd"> :param inCMDEncodingStr: Set the encoding of the DOS window on the Agent server session. Windows is beautiful :) . Default is "cp1251" early was "cp866" - need test</span>
<spanclass="sd"> :param inCaptureBool: !ATTENTION! If you need to start absolutely encapsulated app - set this flag as False. If you set True - the app output will come to Agent</span>
<spanclass="n">lMessageStr</span><spanclass="o">=</span><spanclass="sa">f</span><spanclass="s2">"</span><spanclass="si">{</span><spanclass="n">lOSCMDKeyStr</span><spanclass="si">}</span><spanclass="s2">: # # # # AGENT CMD Process has been STARTED # # # # "</span>
<spanclass="k">if</span><spanclass="n">inSendOutputToOrchestratorLogsBool</span><spanclass="o">==</span><spanclass="kc">True</span><spanclass="p">:</span><spanclass="c1"># Capturing can be turned on!</span>
<spanclass="k">if</span><spanclass="n">inSendOutputToOrchestratorLogsBool</span><spanclass="o">==</span><spanclass="kc">True</span><spanclass="p">:</span><spanclass="c1"># Capturing can be turned on!</span>
<spanclass="k">if</span><spanclass="n">inSendOutputToOrchestratorLogsBool</span><spanclass="o">==</span><spanclass="kc">True</span><spanclass="p">:</span><spanclass="c1"># Capturing can be turned on!</span>
<spanclass="c1">#if inSendOutputToOrchestratorLogsBool == True: # Capturing can be turned on!</span>
<spanclass="k">if</span><spanclass="n">inCaptureBool</span><spanclass="o">==</span><spanclass="kc">True</span><spanclass="p">:</span><spanclass="c1"># Capturing can be turned on!</span>
<spanclass="k">if</span><spanclass="n">inSendOutputToOrchestratorLogsBool</span><spanclass="o">==</span><spanclass="kc">True</span><spanclass="p">:</span><spanclass="c1"># Capturing can be turned on!</span>
<spanclass="k">if</span><spanclass="n">inSendOutputToOrchestratorLogsBool</span><spanclass="o">==</span><spanclass="kc">True</span><spanclass="p">:</span><spanclass="c1"># Capturing can be turned on!</span>
<spanclass="n">lResultStr</span><spanclass="o">=</span><spanclass="s2">"ActivityList has been started in async mode - no output is available here."</span>
<spanclass="sd"> Manager process, which is need to be started / stopped / restarted</span>
<spanclass="sd"> With Process instance you can automate your process activity. Use schedule package to set interval when process should be active and when not.</span>
<spanclass="sd"> All defs in class are pickle safe! After orchestrator restart (if not the force stop of the orchestrator process) your instance with properties will be restored. But it not coverage the scheduler which is in __Orchestrator__ .</span>
<spanclass="sd"> After orc restart you need to reinit all schedule rules: Orchestrator.OrchestratorScheduleGet</span>
<spanclass="sd"> Process instance has the following statuses:</span>
<spanclass="n">mAgentMuteBool</span><spanclass="o">=</span><spanclass="kc">False</span><spanclass="c1"># Mute any sends to agent while some action is perfomed</span>
<spanclass="n">mStatusSavedStr</span><spanclass="o">=</span><spanclass="kc">None</span><spanclass="c1"># Saved status to the further restore</span>
<spanclass="sd"> !ATTENTION! Function can raise exception if process with the same (inAgentHostNameStr, inAgentUserNameStr, inProcessNameWOExeStr) is already exists in GSettings (can be restored from previous Orchestrator session). See ProcessInitSafe to sefaty init the instance or restore previous</span>
<spanclass="sd"> !ATTENTION! Schedule options you must</span>
<spanclass="sd"> :param inAgentHostNameStr: Agent hostname in any case. Required to identify Process</span>
<spanclass="sd"> :param inAgentUserNameStr: Agent user name in any case. Required to identify Process</span>
<spanclass="sd"> :param inProcessNameWOExeStr: The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case</span>
<spanclass="sd"> :param inStartPathStr: Path to start process (.cmd/ .exe or something else). Path can be relative (from orc working directory) or absolute</span>
<spanclass="sd"> :param inStartCMDStr: CMD script to start program (if no start file is exists)</span>
<spanclass="sd"> :param inStopSafeTimeoutSecFloat: Time to wait for stop safe. After that do the stop force (if process is not stopped)</span>
<spanclass="k">else</span><spanclass="p">:</span><spanclass="k">raise</span><spanclass="ne">Exception</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"Managers.Process (</span><spanclass="si">{</span><spanclass="n">inAgentHostNameStr</span><spanclass="si">}</span><spanclass="s2">, </span><spanclass="si">{</span><spanclass="n">inAgentUserNameStr</span><spanclass="si">}</span><spanclass="s2">, </span><spanclass="si">{</span><spanclass="n">inProcessNameWOExeStr</span><spanclass="si">}</span><spanclass="s2">): Can't init the Process instance because it already inited in early (see ProcessInitSafe)"</span><spanclass="p">)</span>
<spanclass="sd"> Manual/Auto start. Manual start will block scheduling execution. To return schedule execution use def Manual2Auto.</span>
<spanclass="sd"> Will not start if STOP SAFE is now and don't start auto is stopped manual now</span>
@ -326,19 +363,25 @@
<spanclass="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<spanclass="sd">"""</span>
<spanclass="k">if</span><spanclass="n">inIsManualBool</span><spanclass="o">==</span><spanclass="kc">False</span><spanclass="p">:</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">ManualStopTriggerNewStart</span><spanclass="p">()</span><spanclass="c1"># Set the time</span>
<spanclass="n">lStr</span><spanclass="o">=</span><spanclass="sa">f</span><spanclass="s2">"Managers.Process (</span><spanclass="si">{</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">mAgentHostNameStr</span><spanclass="si">}</span><spanclass="s2">, </span><spanclass="si">{</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">mAgentUserNameStr</span><spanclass="si">}</span><spanclass="s2">, </span><spanclass="si">{</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">mProcessNameWOExeStr</span><spanclass="si">}</span><spanclass="s2">): Process will not start because of stopped manual or stop safe is now."</span>
<spanclass="sd"> Manual/Auto stop safe. Stop safe is the operation which send signal to process to terminate own work (send term signal to process). Managers.Process wait for the mStopSafeTimeoutSecFloat seconds. After that, if process is not terminated - self will StopForce it.</span>
<spanclass="sd"> Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto</span>
<spanclass="sd"> :param inIsManualBool: Default is True - Mark this operation as manual - StatusCheckStart/Stop will be blocked - only StatusCheck will be working. False - Auto operation</span>
<spanclass="sd"> :param inStopSafeTimeoutSecFloat: Default value goes from the instance. You can specify time is second to wait while safe stop. After that program will stop force</span>
<spanclass="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<spanclass="n">lL</span><spanclass="o">.</span><spanclass="n">info</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"Managers.Process (</span><spanclass="si">{</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">mAgentHostNameStr</span><spanclass="si">}</span><spanclass="s2">, </span><spanclass="si">{</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">mAgentUserNameStr</span><spanclass="si">}</span><spanclass="s2">, </span><spanclass="si">{</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">mProcessNameWOExeStr</span><spanclass="si">}</span><spanclass="s2">): Safe stop has been wait for </span><spanclass="si">{</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">mStopSafeTimeoutSecFloat</span><spanclass="si">}</span><spanclass="s2"> sec. Now do the force stop."</span><spanclass="p">)</span>
<spanclass="n">lL</span><spanclass="o">.</span><spanclass="n">info</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"Managers.Process (</span><spanclass="si">{</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">mAgentHostNameStr</span><spanclass="si">}</span><spanclass="s2">, </span><spanclass="si">{</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">mAgentUserNameStr</span><spanclass="si">}</span><spanclass="s2">, </span><spanclass="si">{</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">mProcessNameWOExeStr</span><spanclass="si">}</span><spanclass="s2">): Safe stop has been wait for </span><spanclass="si">{</span><spanclass="n">inStopSafeTimeoutSecFloat</span><spanclass="si">}</span><spanclass="s2"> sec. Now do the force stop."</span><spanclass="p">)</span>
<spanclass="sd"> Stop safe program if auto started (4_STARTED).</span>
<spanclass="sd"> :param inStopSafeTimeoutSecFloat: Default value goes from the instance. You can specify time is second to wait while safe stop. After that program will stop force</span>
<spanclass="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<spanclass="sd"> Manual/Auto stop force. Force stop don't wait process termination - it just terminate process now.</span>
<spanclass="sd"> Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto</span>
@ -423,12 +470,13 @@
<spanclass="sd"> :param inIsManualBool: Default is True - Mark this operation as manual - StatusCheckStart/Stop will be blocked - only StatusCheck will be working. False - Auto operation</span>
<spanclass="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<spanclass="sd"> Save current status of the process. After that you can restore process activity. Work when orchestrator is restarted. Don't save "STOP_SAFE" status >"STOPPED"</span>
<spanclass="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<spanclass="k">if</span><spanclass="n">lWarnSafeBool</span><spanclass="o">==</span><spanclass="kc">True</span><spanclass="p">:</span><spanclass="n">__Orchestrator__</span><spanclass="o">.</span><spanclass="n">OrchestratorLoggerGet</span><spanclass="p">()</span><spanclass="o">.</span><spanclass="n">warning</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"Managers.Process (</span><spanclass="si">{</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">mAgentHostNameStr</span><spanclass="si">}</span><spanclass="s2">, </span><spanclass="si">{</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">mAgentUserNameStr</span><spanclass="si">}</span><spanclass="s2">, </span><spanclass="si">{</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">mProcessNameWOExeStr</span><spanclass="si">}</span><spanclass="s2">): Safe status has been catched when safe > change saved status to stopped."</span><spanclass="p">)</span>
<spanclass="n">__Orchestrator__</span><spanclass="o">.</span><spanclass="n">OrchestratorLoggerGet</span><spanclass="p">()</span><spanclass="o">.</span><spanclass="n">info</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"Managers.Process (</span><spanclass="si">{</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">mAgentHostNameStr</span><spanclass="si">}</span><spanclass="s2">, </span><spanclass="si">{</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">mAgentUserNameStr</span><spanclass="si">}</span><spanclass="s2">, </span><spanclass="si">{</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">mProcessNameWOExeStr</span><spanclass="si">}</span><spanclass="s2">): Restore schedule to StatusCheck in interval of </span><spanclass="si">{</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">mStatusCheckIntervalSecFloat</span><spanclass="si">}</span><spanclass="s2"> sec."</span><spanclass="p">)</span>
<spanclass="sd"> Execute the StatusCheck, after that restore status to the saved state (see StatusSave). Work when orchestrator is restarted.</span>
<spanclass="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<spanclass="sd">"""</span>
<spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">StatusCheck</span><spanclass="p">()</span><spanclass="c1"># check current status</span>
<spanclass="n">Orchestrator</span><spanclass="o">.</span><spanclass="n">OrchestratorLoggerGet</span><spanclass="p">()</span><spanclass="o">.</span><spanclass="n">info</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"Managers.Process (</span><spanclass="si">{</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">mAgentHostNameStr</span><spanclass="si">}</span><spanclass="s2">, </span><spanclass="si">{</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">mAgentUserNameStr</span><spanclass="si">}</span><spanclass="s2">, </span><spanclass="si">{</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">mProcessNameWOExeStr</span><spanclass="si">}</span><spanclass="s2">): Status has been restored to </span><spanclass="si">{</span><spanclass="bp">self</span><spanclass="o">.</span><spanclass="n">mStatusSavedStr</span><spanclass="si">}</span><spanclass="s2">"</span><spanclass="p">)</span>
<spanclass="sd"> Exception safe function. Check if process instance is not exists in GSettings (it can be after restart because Orchestrator restore objects from dump of the previous Orchestrator session)</span>
<spanclass="sd"> Return existing instance (if exists) or create new instance and return it.</span>
<spanclass="sd"> :param inAgentHostNameStr: Agent hostname in any case. Required to identify Process</span>
<spanclass="sd"> :param inAgentUserNameStr: Agent user name in any case. Required to identify Process</span>
<spanclass="sd"> :param inProcessNameWOExeStr: The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case</span>
<spanclass="sd"> :param inStartPathStr: Path to start process (.cmd/ .exe or something else). Path can be relative (from orc working directory) or absolute</span>
<spanclass="sd"> :param inStartCMDStr: CMD script to start program (if no start file is exists)</span>
<spanclass="sd"> :param inStopSafeTimeoutSecFloat: Time to wait for stop safe. After that do the stop force (if process is not stopped)</span>
<spanclass="sd"> Check if the Process instance is exists in GSettings by the (inAgentHostNameStr: str, inAgentUserNameStr: str, inProcessNameWOExeStr: str)</span>
<spanclass="sd"> :param inAgentHostNameStr: Agent hostname in any case. Required to identify Process</span>
<spanclass="sd"> :param inAgentUserNameStr: Agent user name in any case. Required to identify Process</span>
<spanclass="sd"> :param inProcessNameWOExeStr: The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case</span>
<spanclass="sd"> :return: True - process exists in gsettings; False - else</span>
<spanclass="sd"> Manual/Auto stop safe. Stop safe is the operation which send signal to process to terminate own work (send term signal to process). Managers.Process wait for the mStopSafeTimeoutSecFloat seconds. After that, if process is not terminated - self will StopForce it.</span>
<spanclass="sd"> Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto</span>
@ -617,6 +729,7 @@
<spanclass="sd"> :param inAgentUserNameStr: Agent user name in any case. Required to identify Process</span>
<spanclass="sd"> :param inProcessNameWOExeStr: The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case</span>
<spanclass="sd"> :param inIsManualBool: Default is True - Mark this operation as manual - StatusCheckStart/Stop will be blocked - only StatusCheck will be working. False - Auto operation</span>
<spanclass="sd"> :param inStopSafeTimeoutSecFloat: Default value goes from the instance. You can specify time is second to wait while safe stop. After that program will stop force</span>
<spanclass="sd"> :return: Process status. See self.mStatusStr.</span>
<spanclass="sd"> Process instance has the following statuses:</span>
<spanclass="sd"> Save current status of the process. After that you can restore process activity. Work when orchestrator is restarted. Don't save "STOP_SAFE" status >"STOPPED"</span>
<spanclass="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<spanclass="sd"> Run status check every interval in second you specify.</span>
<spanclass="sd"> :param inAgentHostNameStr: Agent hostname in any case. Required to identify Process</span>
<spanclass="sd"> :param inAgentUserNameStr: Agent user name in any case. Required to identify Process</span>
<spanclass="sd"> :param inProcessNameWOExeStr: The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case</span>
<spanclass="sd"> :param inIntervalSecondsInt: Interval in seconds. Default is 120</span>
<spanclass="k">raise</span><spanclass="ne">Exception</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"__Orchestrator__.AgentActivityItemReturnGet !ATTENTION! Use this function only after Orchestrator initialization! Before orchestrator init exception will be raised."</span><spanclass="p">)</span></div>
<spanclass="sd"> :param inSendOutputToOrchestratorLogsBool: True - catch cmd execution output and send it to the Orchestrator logs; Flase - else case; Default True</span>
<spanclass="sd"> :param inCMDEncodingStr: Set the encoding of the DOS window on the Agent server session. Windows is beautiful :) . Default is "cp1251" early was "cp866" - need test</span>
<spanclass="sd"> :param inCaptureBool: !ATTENTION! If you need to start absolutely encapsulated app - set this flag as False. If you set True - the app output will come to Agent</span>
<spanclass="sd"> :return: GUID String of the ActivityItem - you can wait (sync or async) result by this guid!</span>
<spanclass="sd">"""</span>
<spanclass="n">inGSettings</span><spanclass="o">=</span><spanclass="n">GSettingsGet</span><spanclass="p">(</span><spanclass="n">inGSettings</span><spanclass="o">=</span><spanclass="n">inGSettings</span><spanclass="p">)</span><spanclass="c1"># Set the global settings</span>
<spanclass="s2">"ArgGSettings"</span><spanclass="p">:</span><spanclass="s2">"inGSettings"</span><spanclass="p">,</span><spanclass="c1"># Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<spanclass="s2">"ArgLogger"</span><spanclass="p">:</span><spanclass="kc">None</span><spanclass="c1"># Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<spanclass="p">}</span>
@ -533,6 +534,45 @@
<spanclass="c1">#Send item in AgentDict for the futher data transmition</span>
<spanclass="n">inGSettings</span><spanclass="o">=</span><spanclass="n">GSettingsGet</span><spanclass="p">()</span><spanclass="c1"># Set the global settings</span>
<spanclass="k">if</span><spanclass="n">inGSettings</span><spanclass="p">[</span><spanclass="s2">"Logger"</span><spanclass="p">]:</span><spanclass="n">inGSettings</span><spanclass="p">[</span><spanclass="s2">"Logger"</span><spanclass="p">]</span><spanclass="o">.</span><spanclass="n">warning</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"AgentOSFileBinaryDataReceive run before orc init - activity will be append in the processor queue."</span><spanclass="p">)</span>
<spanclass="s2">"Def"</span><spanclass="p">:</span><spanclass="n">AgentOSFileBinaryDataReceive</span><spanclass="p">,</span><spanclass="c1"># def link or def alias (look gSettings["Processor"]["AliasDefDict"])</span>
<spanclass="s2">"ArgGSettings"</span><spanclass="p">:</span><spanclass="kc">None</span><spanclass="p">,</span><spanclass="c1"># Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<spanclass="s2">"ArgLogger"</span><spanclass="p">:</span><spanclass="kc">None</span><spanclass="c1"># Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<spanclass="s2">"ArgGSettings"</span><spanclass="p">:</span><spanclass="s2">"inGSettings"</span><spanclass="p">,</span><spanclass="c1"># Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<spanclass="s2">"ArgLogger"</span><spanclass="p">:</span><spanclass="kc">None</span><spanclass="c1"># Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<spanclass="p">}</span>
<spanclass="c1">#Send item in AgentDict for the futher data transmition</span>
<spanclass="sd"> Check if not admin - then rerun orchestrator as administrator</span>
@ -738,10 +800,10 @@
<spanclass="k">else</span><spanclass="p">:</span>
<spanclass="nb">print</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"!SKIPPED! Already run as administrator!"</span><spanclass="p">)</span></div>
<spanclass="sd"> Search the py files by the glob and do the safe init (in try except). Also add inited module in sys.modules as imported (module name = file name without extension).</span>
<spanclass="sd"> You can init CP in async way!</span>
<spanclass="sd"> .. code-block:: python</span>
<spanclass="sd"> # USAGE VAR 1 (without the def auto call)</span>
<spanclass="sd"> :param inDefStr: OPTIONAL The string name of the def. For backward compatibility if you need to auto call some def from initialized module</span>
<spanclass="sd"> :param inDefArgNameGSettingsStr: OPTIONAL The name of the GSettings argument in def (if exists)</span>
<spanclass="sd"> :param inAsyncInitBool: OPTIONAL True - init py modules in many threads - parallel execution. False (default) - sequence execution</span>
<spanclass="n">lPyPathStrList</span><spanclass="o">=</span><spanclass="n">glob</span><spanclass="o">.</span><spanclass="n">glob</span><spanclass="p">(</span><spanclass="n">inGlobPatternStr</span><spanclass="p">)</span><spanclass="c1"># get the file list</span>
<spanclass="n">lL</span><spanclass="o">=</span><spanclass="n">OrchestratorLoggerGet</span><spanclass="p">()</span><spanclass="c1"># get the logger</span>
<spanclass="k">if</span><spanclass="n">lL</span><spanclass="p">:</span><spanclass="n">lL</span><spanclass="o">.</span><spanclass="n">info</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"Py module </span><spanclass="si">{</span><spanclass="n">lModuleNameStr</span><spanclass="si">}</span><spanclass="s2"> has been successfully initialized."</span><spanclass="p">)</span>
<spanclass="k">if</span><spanclass="n">lL</span><spanclass="p">:</span><spanclass="n">lL</span><spanclass="o">.</span><spanclass="n">exception</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"Exception when init the .py file </span><spanclass="si">{</span><spanclass="n">os</span><spanclass="o">.</span><spanclass="n">path</span><spanclass="o">.</span><spanclass="n">abspath</span><spanclass="p">(</span><spanclass="n">lPyPathItemStr</span><spanclass="p">)</span><spanclass="si">}</span><spanclass="s2">"</span><spanclass="p">)</span>
<spanclass="n">lPyPathStrList</span><spanclass="o">=</span><spanclass="n">glob</span><spanclass="o">.</span><spanclass="n">glob</span><spanclass="p">(</span><spanclass="n">inGlobPatternStr</span><spanclass="p">)</span><spanclass="c1"># get the file list</span>
<spanclass="n">lL</span><spanclass="o">=</span><spanclass="n">OrchestratorLoggerGet</span><spanclass="p">()</span><spanclass="c1"># get the logger</span>
<spanclass="n">lFile</span><spanclass="o">.</span><spanclass="n">write</span><spanclass="p">(</span><spanclass="n">json</span><spanclass="o">.</span><spanclass="n">dumps</span><spanclass="p">(</span><spanclass="n">inGSettings</span><spanclass="p">[</span><spanclass="s2">"RobotRDPActive"</span><spanclass="p">][</span><spanclass="s2">"RDPList"</span><spanclass="p">]))</span><spanclass="c1"># dump json to file</span>
<spanclass="n">lFile</span><spanclass="o">.</span><spanclass="n">close</span><spanclass="p">()</span><spanclass="c1"># Close the file</span>
<spanclass="sa">f</span><spanclass="s2">"Orchestrator has dump the StorageDict before the restart."</span><spanclass="p">)</span>
<spanclass="sa">f</span><spanclass="s2">"Orchestrator has dump the GSettings (new dump mode from v1.2.7) before the restart."</span><spanclass="p">)</span>
<spanclass="k">if</span><spanclass="n">lL</span><spanclass="p">:</span><spanclass="n">lL</span><spanclass="o">.</span><spanclass="n">exception</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"Exception when dump data before restart the Orchestrator"</span><spanclass="p">)</span>
<spanclass="n">in2Dict</span><spanclass="o">=</span><spanclass="n">lStorageDictDumpDict</span><spanclass="p">)</span><spanclass="c1"># Merge dict 2 into dict 1</span>
<spanclass="k">if</span><spanclass="n">lL</span><spanclass="p">:</span><spanclass="n">lL</span><spanclass="o">.</span><spanclass="n">warning</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"StorageDict was restored from previous Orchestrator session"</span><spanclass="p">)</span>
<spanclass="n">os</span><spanclass="o">.</span><spanclass="n">remove</span><spanclass="p">(</span><spanclass="s2">"_SessionLast_StorageDict.pickle"</span><spanclass="p">)</span><spanclass="c1"># remove the temp file</span></div>
<spanclass="n">os</span><spanclass="o">.</span><spanclass="n">remove</span><spanclass="p">(</span><spanclass="s2">"_SessionLast_StorageDict.pickle"</span><spanclass="p">)</span><spanclass="c1"># remove the temp file</span>
<spanclass="n">in2Dict</span><spanclass="o">=</span><spanclass="n">lStorageDictDumpDict</span><spanclass="p">)</span><spanclass="c1"># Merge dict 2 into dict 1</span>
<spanclass="k">if</span><spanclass="n">lL</span><spanclass="p">:</span><spanclass="n">lL</span><spanclass="o">.</span><spanclass="n">warning</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"GSettings was restored from previous Orchestrator session"</span><spanclass="p">)</span>
<spanclass="n">os</span><spanclass="o">.</span><spanclass="n">remove</span><spanclass="p">(</span><spanclass="s2">"_SessionLast_GSettings.pickle"</span><spanclass="p">)</span><spanclass="c1"># remove the temp file</span></div>
<spanclass="sd"> :param inUACBool: default: None; True - check user access before do this URL item. None - get Server flag if ask user</span>
<spanclass="sd">"""</span>
<spanclass="n">inGSettings</span><spanclass="o">=</span><spanclass="n">GSettingsGet</span><spanclass="p">(</span><spanclass="n">inGSettings</span><spanclass="o">=</span><spanclass="n">inGSettings</span><spanclass="p">)</span><spanclass="c1"># Set the global settings</span>
<spanclass="s2">"ResponseDefRequestGlobal"</span><spanclass="p">:</span><spanclass="n">inDef</span><spanclass="c1">#Function with str result</span>
<spanclass="s2">"ResponseDefRequestGlobal"</span><spanclass="p">:</span><spanclass="n">inDef</span><spanclass="p">,</span><spanclass="c1">#Function with str result</span>
<spanclass="sd">"inFolderPathStr": "", #Absolute or relative path</span>
<spanclass="sd">"inUACBool"</span>
<spanclass="sd"> :param inGSettings: Global settings dict (singleton)</span>
<spanclass="sd"> :param inMethodStr:</span>
<spanclass="sd"> :param inURLStr:</span>
<spanclass="sd"> :param inMatchTypeStr:</span>
<spanclass="sd"> :param inFolderPathStr:</span>
<spanclass="sd"> :param inUACBool: default: None; True - check user access before do this URL item. None - get Server flag if ask user</span>
<spanclass="sd">"""</span>
<spanclass="n">inGSettings</span><spanclass="o">=</span><spanclass="n">GSettingsGet</span><spanclass="p">(</span><spanclass="n">inGSettings</span><spanclass="o">=</span><spanclass="n">inGSettings</span><spanclass="p">)</span><spanclass="c1"># Set the global settings</span>
<spanclass="c1"># Check if last symbol is "/" - append if not exist</span>
@ -983,11 +1093,12 @@
<spanclass="s2">"ResponseFolderPath"</span><spanclass="p">:</span><spanclass="n">lFolderPathStr</span><spanclass="p">,</span><spanclass="c1"># Absolute or relative path</span>
<spanclass="sd"> :param inUACBool: default: None; True - check user access before do this URL item. None - get Server flag if ask user</span>
<spanclass="sd">"""</span>
<spanclass="n">inGSettings</span><spanclass="o">=</span><spanclass="n">GSettingsGet</span><spanclass="p">(</span><spanclass="n">inGSettings</span><spanclass="o">=</span><spanclass="n">inGSettings</span><spanclass="p">)</span><spanclass="c1"># Set the global settings</span>
<spanclass="n">inGSettings</span><spanclass="o">=</span><spanclass="n">GSettingsGet</span><spanclass="p">(</span><spanclass="n">inGSettings</span><spanclass="o">=</span><spanclass="n">inGSettings</span><spanclass="p">)</span><spanclass="c1"># Set the global settings</span>
<spanclass="n">lSysModulesSnapshot</span><spanclass="o">=</span><spanclass="n">copy</span><spanclass="o">.</span><spanclass="n">copy</span><spanclass="p">(</span><spanclass="n">sys</span><spanclass="o">.</span><spanclass="n">modules</span><spanclass="p">)</span><spanclass="c1"># Actual when start from jupyter</span>
<spanclass="sd">"Host": inHostStr, # Host address, example "77.77.22.22"</span>
@ -2136,6 +2276,7 @@
<spanclass="sd">"DepthBit": str(inDepthBitInt) # "32" or "24" or "16" or "15", example "32"</span>
<spanclass="sd"> },</span>
<spanclass="sd">"SharedDriveList": inSharedDriveList, # List of the Root sesion hard drives, example ["c"]</span>
<spanclass="n">lRDPTemplateDict</span><spanclass="o">=</span><spanclass="p">{</span><spanclass="c1"># Init the configuration item</span>
<spanclass="s2">"Host"</span><spanclass="p">:</span><spanclass="n">inHostStr</span><spanclass="p">,</span><spanclass="c1"># Host address, example "77.77.22.22"</span>
<spanclass="s2">"Port"</span><spanclass="p">:</span><spanclass="nb">str</span><spanclass="p">(</span><spanclass="n">inPortInt</span><spanclass="p">),</span><spanclass="c1"># RDP Port, example "3389"</span>
@ -2159,7 +2302,8 @@
<spanclass="s2">"FlagUseAllMonitors"</span><spanclass="p">:</span><spanclass="n">inUseBothMonitorBool</span><spanclass="p">,</span><spanclass="c1"># True or False, example False</span>
<spanclass="s2">"DepthBit"</span><spanclass="p">:</span><spanclass="nb">str</span><spanclass="p">(</span><spanclass="n">inDepthBitInt</span><spanclass="p">)</span><spanclass="c1"># "32" or "24" or "16" or "15", example "32"</span>
<spanclass="p">},</span>
<spanclass="s2">"SharedDriveList"</span><spanclass="p">:</span><spanclass="n">inSharedDriveList</span><spanclass="p">,</span><spanclass="c1"># List of the Root sesion hard drives, example ["c"]</span>
<spanclass="s2">"SharedDriveList"</span><spanclass="p">:</span><spanclass="n">inSharedDriveList</span><spanclass="p">,</span><spanclass="c1"># List of the Root sesion hard drives, example ["c"],</span>
<spanclass="s2">"RedirectClipboardBool"</span><spanclass="p">:</span><spanclass="n">inRedirectClipboardBool</span><spanclass="p">,</span><spanclass="c1"># True - share clipboard to RDP; False - else</span>
<spanclass="c1">###### Will updated in program ############</span>
<spanclass="s2">"SessionHex"</span><spanclass="p">:</span><spanclass="s2">"77777sdfsdf77777dsfdfsf77777777"</span><spanclass="p">,</span><spanclass="c1"># Hex is created when robot runs, example ""</span>
<spanclass="sd"> Create new RDPSession in RobotRDPActive. Attention - activity will be ignored if RDP key is already exists</span>
<spanclass="sd"> 2 way of the use</span>
@ -2223,7 +2367,7 @@
<spanclass="s2">"Def"</span><spanclass="p">:</span><spanclass="n">RDPSessionConnect</span><spanclass="p">,</span><spanclass="c1"># def link or def alias (look gSettings["Processor"]["AliasDefDict"])</span>
<spanclass="s2">"ArgGSettings"</span><spanclass="p">:</span><spanclass="s2">"inGSettings"</span><spanclass="p">,</span><spanclass="c1"># Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<spanclass="s2">"ArgLogger"</span><spanclass="p">:</span><spanclass="kc">None</span><spanclass="c1"># Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<spanclass="p">}</span>
@ -2234,7 +2378,7 @@
<spanclass="c1"># Var 2 - backward compatibility</span>
<spanclass="n">inHostStr</span><spanclass="o">=</span><spanclass="n">inHostStr</span><spanclass="p">,</span><spanclass="n">inPortInt</span><spanclass="o">=</span><spanclass="nb">int</span><spanclass="p">(</span><spanclass="n">inPortStr</span><spanclass="p">))</span><spanclass="c1"># ATTENTION - dont connect if RDP session is exist</span>
<spanclass="n">inHostStr</span><spanclass="o">=</span><spanclass="n">inHostStr</span><spanclass="p">,</span><spanclass="n">inPortInt</span><spanclass="o">=</span><spanclass="nb">int</span><spanclass="p">(</span><spanclass="n">inPortStr</span><spanclass="p">),</span><spanclass="n">inRedirectClipboardBool</span><spanclass="o">=</span><spanclass="n">inRedirectClipboardBool</span><spanclass="p">)</span><spanclass="c1"># ATTENTION - dont connect if RDP session is exist</span>
<spanclass="n">inGSettings</span><spanclass="p">[</span><spanclass="s2">"RobotRDPActive"</span><spanclass="p">][</span><spanclass="s2">"RDPList"</span><spanclass="p">][</span><spanclass="n">inRDPSessionKeyStr</span><spanclass="p">]</span><spanclass="o">=</span><spanclass="n">lRDPConfigurationItem</span><spanclass="c1"># Add item in RDPList</span>
<spanclass="n">time</span><spanclass="o">.</span><spanclass="n">sleep</span><spanclass="p">(</span><spanclass="n">inGSettings</span><spanclass="p">[</span><spanclass="s2">"Autocleaner"</span><spanclass="p">][</span><spanclass="s2">"IntervalSecFloat"</span><spanclass="p">])</span><spanclass="c1"># Wait for the next iteration</span>
<spanclass="k">if</span><spanclass="n">lL</span><spanclass="p">:</span><spanclass="n">lL</span><spanclass="o">.</span><spanclass="n">info</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"Autocleaner is running"</span><spanclass="p">)</span><spanclass="c1"># Info</span>
<spanclass="n">lNowDatetime</span><spanclass="o">=</span><spanclass="n">datetime</span><spanclass="o">.</span><spanclass="n">datetime</span><spanclass="o">.</span><spanclass="n">now</span><spanclass="p">()</span><spanclass="c1"># Get now time</span>
<spanclass="c1"># Clean old items in Client > Session > TechnicalSessionGUIDCache</span>
<spanclass="n">lRobotRDPActiveThread</span><spanclass="o">.</span><spanclass="n">start</span><spanclass="p">()</span><spanclass="c1"># Start the thread execution.</span>
<spanclass="k">if</span><spanclass="n">lL</span><spanclass="p">:</span><spanclass="n">lL</span><spanclass="o">.</span><spanclass="n">info</span><spanclass="p">(</span><spanclass="s2">"Robot RDP active has been started"</span><spanclass="p">)</span><spanclass="c1">#Logging</span>
<spanclass="c1"># Init autocleaner in another thread</span>
<spanclass="n">lAutocleanerThread</span><spanclass="o">.</span><spanclass="n">daemon</span><spanclass="o">=</span><spanclass="kc">True</span><spanclass="c1"># Run the thread in daemon mode.</span>
@ -2862,13 +3007,18 @@
<spanclass="n">lSchedulerThread</span><spanclass="o">.</span><spanclass="n">start</span><spanclass="p">()</span><spanclass="c1"># Start the thread execution.</span>
<spanclass="n">lScheduleThread</span><spanclass="o">.</span><spanclass="n">daemon</span><spanclass="o">=</span><spanclass="kc">True</span><spanclass="c1"># Run the thread in daemon mode.</span>
<spanclass="n">lScheduleThread</span><spanclass="o">.</span><spanclass="n">start</span><spanclass="p">()</span><spanclass="c1"># Start the thread execution.</span>
Dear RPA-tors. Let me congratulate you with great change in the RPA world. Since 2019 the first enterprise level open source RPA platform is here!
pyOpenRPA is absolutely open source commercial project. Hosted by LLC PYOPENRPA (RUSSIA)
The pyOpenRPA - free, fast and reliable
Powerful OpenSource RPA tool for business (based on python 3). Best performance and absolutely free!
The pyOpenRPA is based on Python and using well known OpenSource solutions such as Selenium, OpenCV, Win32, UI automation and others. Thanks to it we were able to create consolidated platform with all possible features.
The pyOpenRPA is distributed under the MIT license which allows you to use it in any way you want and any time you need without any restrictions.
The pyOpenRPA is distributed under the PYOPENRPA license.
At the time of this writing the pyOpenRPA is successfully using in several big Russian companies. Companies in which it was decided to develop own RPA division with no dependencies on expensive licenses.
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSFileBinaryDataBase64StrReceive">AgentOSFileBinaryDataBase64StrReceive() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSFileBinaryDataBytesCreate">AgentOSFileBinaryDataBytesCreate() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSFileBinaryDataReceive">AgentOSFileBinaryDataReceive() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSFileSend">AgentOSFileSend() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id29">ControlPanel (class in pyOpenRPA.Orchestrator.Managers.ControlPanel)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel">[1]</a>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id37">ControlPanel (class in pyOpenRPA.Orchestrator.Managers.ControlPanel)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel">[1]</a>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.Orchestrator">Orchestrator() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorInitWait">OrchestratorInitWait() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorIsAdmin">OrchestratorIsAdmin() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorIsInited">OrchestratorIsInited() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorLoggerGet">OrchestratorLoggerGet() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
@ -381,11 +396,11 @@
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorRerunAsAdmin">OrchestratorRerunAsAdmin() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorRestart">OrchestratorRestart() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorScheduleGet">OrchestratorScheduleGet() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
</ul></td>
<tdstyle="width: 33%; vertical-align: top;"><ul>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorScheduleGet">OrchestratorScheduleGet() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionRestore">OrchestratorSessionRestore() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionSave">OrchestratorSessionSave() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
@ -405,6 +420,8 @@
<li><ahref="Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSFileBinaryDataBase64StrCreate">OSFileBinaryDataBase64StrCreate() (in module pyOpenRPA.Agent.__Agent__)</a>
</li>
<li><ahref="Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSFileBinaryDataBase64StrReceive">OSFileBinaryDataBase64StrReceive() (in module pyOpenRPA.Agent.__Agent__)</a>
</li>
<li><ahref="Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSFileMTimeGet">OSFileMTimeGet() (in module pyOpenRPA.Agent.__Agent__)</a>
</li>
<li><ahref="Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSFileTextDataStrCreate">OSFileTextDataStrCreate() (in module pyOpenRPA.Agent.__Agent__)</a>
</li>
@ -424,17 +441,21 @@
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessDefIntervalCall">ProcessDefIntervalCall() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id20">ProcessGet() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessGet">[1]</a>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id23">ProcessExists() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessExists">[1]</a>
</li>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id24">ProcessGet() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessGet">[1]</a>
</li>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id25">ProcessInitSafe() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessInitSafe">[1]</a>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessIsStarted">ProcessIsStarted() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessListGet">ProcessListGet() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id21">ProcessManual2Auto() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessManual2Auto">[1]</a>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id26">ProcessManual2Auto() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessManual2Auto">[1]</a>
</li>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id22">ProcessManualStopListClear() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessManualStopListClear">[1]</a>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id27">ProcessManualStopListClear() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessManualStopListClear">[1]</a>
</li>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id23">ProcessManualStopTriggerSet() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessManualStopTriggerSet">[1]</a>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id28">ProcessManualStopTriggerSet() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessManualStopTriggerSet">[1]</a>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemAppend">ProcessorActivityItemAppend() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
@ -443,24 +464,30 @@
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorAliasDefCreate">ProcessorAliasDefCreate() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorAliasDefUpdate">ProcessorAliasDefUpdate() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id29">ProcessScheduleStatusCheckEverySeconds() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessScheduleStatusCheckEverySeconds">[1]</a>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStart">ProcessStart() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id25">ProcessStatusCheck() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStatusCheck">[1]</a>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id31">ProcessStatusCheck() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStatusCheck">[1]</a>
</li>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id26">ProcessStatusStrGet() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStatusStrGet">[1]</a>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id32">ProcessStatusRestore() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStatusRestore">[1]</a>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStop">ProcessStop() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id33">ProcessStatusSave() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStatusSave">[1]</a>
</li>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id27">ProcessStopForce() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStopForce">[1]</a>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id34">ProcessStatusStrGet() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStatusStrGet">[1]</a>
</li>
</ul></td>
<tdstyle="width: 33%; vertical-align: top;"><ul>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id28">ProcessStopSafe() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStopSafe">[1]</a>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStop">ProcessStop() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id35">ProcessStopForce() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStopForce">[1]</a>
</li>
<li><ahref="Orchestrator/06_Defs%20Managers.html#id36">ProcessStopSafe() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <ahref="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStopSafe">[1]</a>
</li>
<li><ahref="Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.ProcessWOExeUpperUserListGet">ProcessWOExeUpperUserListGet() (in module pyOpenRPA.Agent.__Agent__)</a>
</li>
@ -553,13 +580,13 @@
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.RDPTemplateCreate">RDPTemplateCreate() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.SchedulerActivityTimeAddWeekly">SchedulerActivityTimeAddWeekly() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.StorageRobotExists">StorageRobotExists() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
@ -668,6 +699,8 @@
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.WebCPUpdate">WebCPUpdate() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.WebListenCreate">WebListenCreate() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.WebRequestGet">WebRequestGet() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.WebRequestParseBodyBytes">WebRequestParseBodyBytes() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<p><em>by Ivan Maslov (Russia)</em> - see <aclass="reference internal"href="03_Copyrights_Contacts.html#copyrights-contacts"><spanclass="std std-ref">3. Copyrights & Contacts</span></a>.</p>
<p>! ATTENTION ! pyOpenRPA works only on MS Windows 7+/Server 2008+. Guys from Unix/Mac - sorry. We will come to you soon :)</p>
<divclass="section"id="donate">
<h2>Donate<aclass="headerlink"href="#donate"title="Permalink to this headline">¶</a></h2>
<p>pyOpenRPA is absolutely non-commercial project.</p>
<p>Please donate some $ if pyOpenRPA project is actual for you. Link to online donations.
<h2>About<aclass="headerlink"href="#about"title="Permalink to this headline">¶</a></h2>
<p>Dear RPA-tors. Let me congratulate you with great change in the RPA world. Since 2019 the first enterprise level open source RPA platform is here!</p>
<p>pyOpenRPA is absolutely open source commercial project. Hosted by LLC PYOPENRPA (RUSSIA)</p>
<p>The pyOpenRPA - free, fast and reliable
Powerful OpenSource RPA tool for business (based on python 3). Best performance and absolutely free!</p>
<p>The pyOpenRPA is based on Python and using well known OpenSource solutions such as Selenium, OpenCV, Win32, UI automation and others. Thanks to it we were able to create consolidated platform with all possible features.
The pyOpenRPA is distributed under the MIT license which allows you to use it in any way you want and any time you need without any restrictions.
The pyOpenRPA is distributed under the PYOPENRPA license.
At the time of this writing the pyOpenRPA is successfully using in several big Russian companies. Companies in which it was decided to develop own RPA division with no dependencies on expensive licenses.</p>
@ -59,9 +64,16 @@ Execute CMD on the Agent daemonic process
* **inSendOutputToOrchestratorLogsBool** – True - catch cmd execution output and send it to the Orchestrator logs; Flase - else case; Default True
!ATTENTION! If you need to start absolutely encapsulated app - set this flag as False. If you set True - the app output will come to Agent
:param inCMDEncodingStr: Set the encoding of the DOS window on the Agent server session. Windows is beautiful :) . Default is “cp1251” early was “cp866” - need test
:return:
* **inCMDEncodingStr** – Set the encoding of the DOS window on the Agent server session. Windows is beautiful :) . Default is “cp1251” early was “cp866” - need test
* **inCaptureBool** – !ATTENTION! If you need to start absolutely encapsulated app - set this flag as False. If you set True - the app output will come to Agent
| Send the file from the Orchestrator to Agent (synchroniously) pyOpenRPA.Agent daemon process (safe for JSON transmition).
@ -213,11 +218,21 @@ Work with activity scheduling.
| Main def to start orchestrator
|
| `OrchestratorInitWait`()
| Wait thread while orc will process initial action.
|
| `OrchestratorIsAdmin`()
| Check if Orchestrator process is running as administrator
|
| `OrchestratorIsInited`()
| Check if Orchestrator initial actions were processed
|
| `OrchestratorLoggerGet`()
| Get the logger from the Orchestrator
@ -245,54 +260,54 @@ Work with activity scheduling.
|
| `OrchestratorSessionRestore`([inGSettings])
| Check _SessionLast_RDPList.json and _SessionLast_StorageDict.pickle in working directory. if exist - load into gsettings # _SessionLast_StorageDict.pickle (binary) _SessionLast_RDPList.json (encoding = “utf-8”) _SessionLast_StorageDict.pickle (binary).
| Check _SessioLast… files in working directory. if exist - load into gsettings (from version 1.2.7) _SessionLast_GSettings.pickle (binary).
|
|
| `OrchestratorSessionSave`([inGSettings])
| Orchestrator session save in file
| Orchestrator session save in file (from version 1.2.7) _SessionLast_GSettings.pickle (binary)
| Create alias for def (can be used in ActivityItem in field Def) !WHEN DEF ALIAS IS REQUIRED! - Def alias is required when you try to call Python def from the Orchestrator WEB side (because you can’t transmit Python def object out of the Python environment) Deprecated.
@ -413,7 +428,7 @@ Work with activity scheduling.
| Return user UAC hierarchy dict of the inRequest object.
|
| `WebAuditMessageCreate`(inRequest[, …])
| `WebAuditMessageCreate`([inRequest, …])
| Create message string with request user details (IP, Login etc…).
@ -428,36 +443,41 @@ Work with activity scheduling.
| Create listen interface for the web server
|
| `WebRequestParseBodyBytes`(inRequest)
| `WebRequestGet`()
| Extract the body in bytes from the request
| Return the web request instance if current thread was created by web request from client.
|
| `WebRequestParseBodyBytes`([inRequest])
| Extract the body in bytes from the request
|
| `WebRequestParseBodyJSON`(inRequest)
| `WebRequestParseBodyJSON`([inRequest])
| Extract the body in dict/list from the request
| Extract the body in dict/list from the request
|
| `WebRequestParseBodyStr`(inRequest)
| `WebRequestParseBodyStr`([inRequest])
| Extract the body in str from the request
| Extract the body in str from the request
|
| `WebRequestParseFile`(inRequest)
| `WebRequestParseFile`([inRequest])
| Parse the request - extract the file (name, body in bytes)
| Parse the request - extract the file (name, body in bytes)
Send CMD to OS thought the pyOpenRPA.Agent daemon. Result return to log + Orchestrator by the A2O connection
@ -803,6 +823,9 @@ Send CMD to OS thought the pyOpenRPA.Agent daemon. Result return to log + Orches
* **inCMDEncodingStr** – Set the encoding of the DOS window on the Agent server session. Windows is beautiful :) . Default is “cp1251” early was “cp866” - need test
* **inCaptureBool** – !ATTENTION! If you need to start absolutely encapsulated app - set this flag as False. If you set True - the app output will come to Agent
* **Returns**
@ -923,6 +946,32 @@ Create binary file by the base64 string by the pyOpenRPA.Agent daemon process (s
Search the py files by the glob and do the safe init (in try except). Also add inited module in sys.modules as imported (module name = file name without extension).
@ -13,7 +13,8 @@ if __name__ == "__main__": # New init way - allow run as module -m PyOpenRPA.Orc
If you need more configurations - so you can see here:
```
import psutil, datetime, logging, os, sys # stdout from logging
import psutil, datetime, logging, os, sys
# Config settings
lPyOpenRPASourceFolderPathStr = r"..\Sources" # Path for test pyOpenRPA package
@ -28,10 +29,10 @@ from pyOpenRPA import Orchestrator # Import orchestrator main
if not Orchestrator.OrchestratorIsAdmin():
Orchestrator.OrchestratorRerunAsAdmin()
print(f"Orchestrator will be run as administrator!")
elif __name__ == "__main__": # New init way - allow run as module -m PyOpenRPA.Orchestrator
else:
gSettings = Orchestrator.GSettingsGet()
#gSettings = SettingsTemplate.Create(inModeStr="BASIC") # Create GSettings with basic configuration - no more config is available from the box - you can create own
| Check if the Process instance is exists in GSettings by the (inAgentHostNameStr: str, inAgentUserNameStr: str, inProcessNameWOExeStr: str)
|
| `ProcessGet`(inAgentHostNameStr, …)
| Return the process instance by the inProcessNameWOExeStr
|
| `ProcessInitSafe`(inAgentHostNameStr, …[, …])
| Exception safe function.
|
| `ProcessManual2Auto`(inAgentHostNameStr, …)
| Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
| Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
|
| `ProcessScheduleStatusCheckEverySeconds`(…)
| Run status check every interval in second you specify.
### class pyOpenRPA.Orchestrator.Managers.Process.Process(inAgentHostNameStr, inAgentUserNameStr, inProcessNameWOExeStr, inStartPathStr=None, inStartCMDStr=None, inStopSafeTimeoutSecFloat=120)
### class pyOpenRPA.Orchestrator.Managers.Process.Process(inAgentHostNameStr, inAgentUserNameStr, inProcessNameWOExeStr, inStartPathStr=None, inStartCMDStr=None, inStopSafeTimeoutSecFloat=300, inStartArgDict=None, inStatusCheckIntervalSecFloat=30)
Manager process, which is need to be started / stopped / restarted
With Process instance you can automate your process activity. Use schedule package to set interval when process should be active and when not.
All defs in class are pickle safe! After orchestrator restart (if not the force stop of the orchestrator process) your instance with properties will be restored. But it not coverage the scheduler which is in __Orchestrator__ .
After orc restart you need to reinit all schedule rules: Orchestrator.OrchestratorScheduleGet
Process instance has the following statuses:
@ -89,14 +117,14 @@ Process instance has the following statuses:
* 5_STARTED_MANUAL
How to use StopSafe on the robot side
.. code-block:: python
> from pyOpenRPA.Tools import StopSafe
> StopSafe.Init(inLogger=None)
> StopSafe.IsSafeStop() # True - WM_CLOSE SIGNAL has come. taskkill /im someprocess.exe
**Methods:**
| `KeyTurpleGet`()
| Get the key turple of the current process
|
| `Manual2Auto`()
| Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
@ -132,14 +160,9 @@ How to use StopSafe on the robot side
| Manual/Auto restart safe.
|
| `ScheduleStatusCheckEverySeconds`([…])
| Run status check every interval in second you specify.
| `Start`([inIsManualBool, inStartArgDict])
|
| `Start`([inIsManualBool])
| Manual/Auto start.
| Manual/Auto start.
|
| `StartCheck`()
@ -157,6 +180,11 @@ How to use StopSafe on the robot side
| Check if process is alive.
|
| `StatusCheckIntervalRestore`()
| Call from orchestrator when init
|
| `StatusCheckStart`()
| Check process status and run it if auto stopped self.mStatusStr is “0_STOPPED”
@ -172,9 +200,19 @@ How to use StopSafe on the robot side
| Check process status and auto stop safe it if self.mStatusStr is 4_STARTED
|
| `StopForce`([inIsManualBool])
| `StatusRestore`()
| Execute the StatusCheck, after that restore status to the saved state (see StatusSave).
|
| `StatusSave`()
| Save current status of the process.
| Manual/Auto stop force.
|
| `StopForce`([inIsManualBool, inMuteIgnoreBool])
| Manual/Auto stop force.
|
| `StopForceCheck`()
@ -182,17 +220,21 @@ How to use StopSafe on the robot side
| Stop force program if auto started (4_STARTED).
|
| `StopSafe`([inIsManualBool])
| `StopSafe`([inIsManualBool, …])
| Manual/Auto stop safe.
| Manual/Auto stop safe.
|
| `StopSafeCheck`()
| `StopSafeCheck`([inStopSafeTimeoutSecFloat])
| Stop safe program if auto started (4_STARTED).
| Stop safe program if auto started (4_STARTED).
|
#### KeyTurpleGet()
Get the key turple of the current process
#### Manual2Auto()
Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
@ -286,23 +328,7 @@ Manual stop safe will block scheduling execution. To return schedule execution u
Manual/Auto start. Manual start will block scheduling execution. To return schedule execution use def Manual2Auto.
Will not start if STOP SAFE is now and don’t start auto is stopped manual now
@ -339,7 +365,7 @@ Lof information about status change
#### StatusCheck()
Check if process is alive. The def will save the manual flag is exists.
Check if process is alive. The def will save the manual flag is exists. Don’t wait mute but set mute if it is not set.
* **Returns**
@ -348,6 +374,10 @@ Check if process is alive. The def will save the manual flag is exists.
#### StatusCheckIntervalRestore()
Call from orchestrator when init
#### StatusCheckStart()
Check process status and run it if auto stopped self.mStatusStr is “0_STOPPED”
@ -377,7 +407,27 @@ Check process status and auto stop safe it if self.mStatusStr is 4_STARTED
#### StopForce(inIsManualBool=True)
#### StatusRestore()
Execute the StatusCheck, after that restore status to the saved state (see StatusSave). Work when orchestrator is restarted.
* **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
#### StatusSave()
Save current status of the process. After that you can restore process activity. Work when orchestrator is restarted. Don’t save “STOP_SAFE” status > “STOPPED”
* **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
Manual/Auto stop safe. Stop safe is the operation which send signal to process to terminate own work (send term signal to process). Managers.Process wait for the mStopSafeTimeoutSecFloat seconds. After that, if process is not terminated - self will StopForce it.
Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto
* **Parameters**
**inIsManualBool**– Default is True - Mark this operation as manual - StatusCheckStart/Stop will be blocked - only StatusCheck will be working. False - Auto operation
* **inIsManualBool** – Default is True - Mark this operation as manual - StatusCheckStart/Stop will be blocked - only StatusCheck will be working. False - Auto operation
* **inStopSafeTimeoutSecFloat** – Default value goes from the instance. You can specify time is second to wait while safe stop. After that program will stop force
@ -421,16 +475,45 @@ Manual stop safe will block scheduling execution. To return schedule execution u
**inStopSafeTimeoutSecFloat**– Default value goes from the instance. You can specify time is second to wait while safe stop. After that program will stop force
* **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
Check if the Process instance is exists in GSettings by the (inAgentHostNameStr: str, inAgentUserNameStr: str, inProcessNameWOExeStr: str)
* **Parameters**
* **inAgentHostNameStr** – Agent hostname in any case. Required to identify Process
* **inAgentUserNameStr** – Agent user name in any case. Required to identify Process
* **inProcessNameWOExeStr** – The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case
Exception safe function. Check if process instance is not exists in GSettings (it can be after restart because Orchestrator restore objects from dump of the previous Orchestrator session)
Return existing instance (if exists) or create new instance and return it.
* **Parameters**
* **inAgentHostNameStr** – Agent hostname in any case. Required to identify Process
* **inAgentUserNameStr** – Agent user name in any case. Required to identify Process
* **inProcessNameWOExeStr** – The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case
* **inStartPathStr** – Path to start process (.cmd/ .exe or something else). Path can be relative (from orc working directory) or absolute
* **inStartCMDStr** – CMD script to start program (if no start file is exists)
* **inStopSafeTimeoutSecFloat** – Time to wait for stop safe. After that do the stop force (if process is not stopped)
Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
@ -537,6 +653,32 @@ Remove Manual flag from process (if exists) - it will allow the schedule operati
Run status check every interval in second you specify.
* **Parameters**
* **inAgentHostNameStr** – Agent hostname in any case. Required to identify Process
* **inAgentUserNameStr** – Agent user name in any case. Required to identify Process
* **inProcessNameWOExeStr** – The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case
* **inIntervalSecondsInt** – Interval in seconds. Default is 120
Save current status of the process. After that you can restore process activity. Work when orchestrator is restarted. Don’t save “STOP_SAFE” status > “STOPPED”
* **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
Manual/Auto stop safe. Stop safe is the operation which send signal to process to terminate own work (send term signal to process). Managers.Process wait for the mStopSafeTimeoutSecFloat seconds. After that, if process is not terminated - self will StopForce it.
Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto
@ -688,6 +850,9 @@ Manual stop safe will block scheduling execution. To return schedule execution u
* **inIsManualBool** – Default is True - Mark this operation as manual - StatusCheckStart/Stop will be blocked - only StatusCheck will be working. False - Auto operation
* **inStopSafeTimeoutSecFloat** – Default value goes from the instance. You can specify time is second to wait while safe stop. After that program will stop force
* **Returns**
@ -713,11 +878,21 @@ Manual stop safe will block scheduling execution. To return schedule execution u
|
**Functions:**
| `ProcessExists`(inAgentHostNameStr, …)
| Check if the Process instance is exists in GSettings by the (inAgentHostNameStr: str, inAgentUserNameStr: str, inProcessNameWOExeStr: str)
|
| `ProcessGet`(inAgentHostNameStr, …)
| Return the process instance by the inProcessNameWOExeStr
|
| `ProcessInitSafe`(inAgentHostNameStr, …[, …])
| Exception safe function.
|
| `ProcessManual2Auto`(inAgentHostNameStr, …)
| Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
@ -733,6 +908,11 @@ Manual stop safe will block scheduling execution. To return schedule execution u
| Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
|
| `ProcessScheduleStatusCheckEverySeconds`(…)
| Run status check every interval in second you specify.
|
| `ProcessStart`(inAgentHostNameStr, …[, …])
| Manual/Auto start.
@ -743,6 +923,16 @@ Manual stop safe will block scheduling execution. To return schedule execution u
| Check if process is alive.
|
| `ProcessStatusRestore`(inAgentHostNameStr, …)
| Execute the StatusCheck, after that restore status to the saved state (see StatusSave).
|
| `ProcessStatusSave`(inAgentHostNameStr, …)
| Save current status of the process.
|
| `ProcessStatusStrGet`(inAgentHostNameStr, …)
| Get the status of the Process instance.
@ -759,11 +949,14 @@ Manual stop safe will block scheduling execution. To return schedule execution u
|
### class pyOpenRPA.Orchestrator.Managers.Process.Process(inAgentHostNameStr, inAgentUserNameStr, inProcessNameWOExeStr, inStartPathStr=None, inStartCMDStr=None, inStopSafeTimeoutSecFloat=120)
### class pyOpenRPA.Orchestrator.Managers.Process.Process(inAgentHostNameStr, inAgentUserNameStr, inProcessNameWOExeStr, inStartPathStr=None, inStartCMDStr=None, inStopSafeTimeoutSecFloat=300, inStartArgDict=None, inStatusCheckIntervalSecFloat=30)
Manager process, which is need to be started / stopped / restarted
With Process instance you can automate your process activity. Use schedule package to set interval when process should be active and when not.
All defs in class are pickle safe! After orchestrator restart (if not the force stop of the orchestrator process) your instance with properties will be restored. But it not coverage the scheduler which is in __Orchestrator__ .
After orc restart you need to reinit all schedule rules: Orchestrator.OrchestratorScheduleGet
Process instance has the following statuses:
@ -785,14 +978,14 @@ Process instance has the following statuses:
* 5_STARTED_MANUAL
How to use StopSafe on the robot side
.. code-block:: python
> from pyOpenRPA.Tools import StopSafe
> StopSafe.Init(inLogger=None)
> StopSafe.IsSafeStop() # True - WM_CLOSE SIGNAL has come. taskkill /im someprocess.exe
**Methods:**
| `KeyTurpleGet`()
| Get the key turple of the current process
|
| `Manual2Auto`()
| Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
@ -828,14 +1021,9 @@ How to use StopSafe on the robot side
| Manual/Auto restart safe.
|
| `ScheduleStatusCheckEverySeconds`([…])
| `Start`([inIsManualBool, inStartArgDict])
| Run status check every interval in second you specify.
|
| `Start`([inIsManualBool])
| Manual/Auto start.
| Manual/Auto start.
|
| `StartCheck`()
@ -853,6 +1041,11 @@ How to use StopSafe on the robot side
| Check if process is alive.
|
| `StatusCheckIntervalRestore`()
| Call from orchestrator when init
|
| `StatusCheckStart`()
| Check process status and run it if auto stopped self.mStatusStr is “0_STOPPED”
@ -868,9 +1061,19 @@ How to use StopSafe on the robot side
| Check process status and auto stop safe it if self.mStatusStr is 4_STARTED
|
| `StopForce`([inIsManualBool])
| `StatusRestore`()
| Execute the StatusCheck, after that restore status to the saved state (see StatusSave).
|
| `StatusSave`()
| Save current status of the process.
|
| `StopForce`([inIsManualBool, inMuteIgnoreBool])
| Manual/Auto stop force.
| Manual/Auto stop force.
|
| `StopForceCheck`()
@ -878,17 +1081,21 @@ How to use StopSafe on the robot side
| Stop force program if auto started (4_STARTED).
|
| `StopSafe`([inIsManualBool])
| `StopSafe`([inIsManualBool, …])
| Manual/Auto stop safe.
| Manual/Auto stop safe.
|
| `StopSafeCheck`()
| `StopSafeCheck`([inStopSafeTimeoutSecFloat])
| Stop safe program if auto started (4_STARTED).
| Stop safe program if auto started (4_STARTED).
|
#### KeyTurpleGet()
Get the key turple of the current process
#### Manual2Auto()
Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
@ -982,23 +1189,7 @@ Manual stop safe will block scheduling execution. To return schedule execution u
Manual/Auto start. Manual start will block scheduling execution. To return schedule execution use def Manual2Auto.
Will not start if STOP SAFE is now and don’t start auto is stopped manual now
@ -1035,7 +1226,7 @@ Lof information about status change
#### StatusCheck()
Check if process is alive. The def will save the manual flag is exists.
Check if process is alive. The def will save the manual flag is exists. Don’t wait mute but set mute if it is not set.
* **Returns**
@ -1044,6 +1235,10 @@ Check if process is alive. The def will save the manual flag is exists.
#### StatusCheckIntervalRestore()
Call from orchestrator when init
#### StatusCheckStart()
Check process status and run it if auto stopped self.mStatusStr is “0_STOPPED”
@ -1073,7 +1268,27 @@ Check process status and auto stop safe it if self.mStatusStr is 4_STARTED
#### StopForce(inIsManualBool=True)
#### StatusRestore()
Execute the StatusCheck, after that restore status to the saved state (see StatusSave). Work when orchestrator is restarted.
* **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
#### StatusSave()
Save current status of the process. After that you can restore process activity. Work when orchestrator is restarted. Don’t save “STOP_SAFE” status > “STOPPED”
* **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
Manual/Auto stop safe. Stop safe is the operation which send signal to process to terminate own work (send term signal to process). Managers.Process wait for the mStopSafeTimeoutSecFloat seconds. After that, if process is not terminated - self will StopForce it.
Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto
* **Parameters**
**inIsManualBool**– Default is True - Mark this operation as manual - StatusCheckStart/Stop will be blocked - only StatusCheck will be working. False - Auto operation
* **inIsManualBool** – Default is True - Mark this operation as manual - StatusCheckStart/Stop will be blocked - only StatusCheck will be working. False - Auto operation
* **inStopSafeTimeoutSecFloat** – Default value goes from the instance. You can specify time is second to wait while safe stop. After that program will stop force
@ -1117,16 +1336,45 @@ Manual stop safe will block scheduling execution. To return schedule execution u
**inStopSafeTimeoutSecFloat**– Default value goes from the instance. You can specify time is second to wait while safe stop. After that program will stop force
* **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
Check if the Process instance is exists in GSettings by the (inAgentHostNameStr: str, inAgentUserNameStr: str, inProcessNameWOExeStr: str)
* **Parameters**
* **inAgentHostNameStr** – Agent hostname in any case. Required to identify Process
* **inAgentUserNameStr** – Agent user name in any case. Required to identify Process
* **inProcessNameWOExeStr** – The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case
Exception safe function. Check if process instance is not exists in GSettings (it can be after restart because Orchestrator restore objects from dump of the previous Orchestrator session)
Return existing instance (if exists) or create new instance and return it.
* **Parameters**
* **inAgentHostNameStr** – Agent hostname in any case. Required to identify Process
* **inAgentUserNameStr** – Agent user name in any case. Required to identify Process
* **inProcessNameWOExeStr** – The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case
* **inStartPathStr** – Path to start process (.cmd/ .exe or something else). Path can be relative (from orc working directory) or absolute
* **inStartCMDStr** – CMD script to start program (if no start file is exists)
* **inStopSafeTimeoutSecFloat** – Time to wait for stop safe. After that do the stop force (if process is not stopped)
Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
@ -1233,6 +1514,32 @@ Remove Manual flag from process (if exists) - it will allow the schedule operati
Run status check every interval in second you specify.
* **Parameters**
* **inAgentHostNameStr** – Agent hostname in any case. Required to identify Process
* **inAgentUserNameStr** – Agent user name in any case. Required to identify Process
* **inProcessNameWOExeStr** – The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case
* **inIntervalSecondsInt** – Interval in seconds. Default is 120
Save current status of the process. After that you can restore process activity. Work when orchestrator is restarted. Don’t save “STOP_SAFE” status > “STOPPED”
* **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
Manual/Auto stop safe. Stop safe is the operation which send signal to process to terminate own work (send term signal to process). Managers.Process wait for the mStopSafeTimeoutSecFloat seconds. After that, if process is not terminated - self will StopForce it.
Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto
@ -1384,6 +1711,9 @@ Manual stop safe will block scheduling execution. To return schedule execution u
* **inIsManualBool** – Default is True - Mark this operation as manual - StatusCheckStart/Stop will be blocked - only StatusCheck will be working. False - Auto operation
* **inStopSafeTimeoutSecFloat** – Default value goes from the instance. You can specify time is second to wait while safe stop. After that program will stop force
Dear RPA-tors. Let me congratulate you with great change in the RPA world. Since 2019 the first enterprise level open source RPA platform is here!
pyOpenRPA is absolutely open source commercial project. Hosted by LLC PYOPENRPA (RUSSIA)
The pyOpenRPA - free, fast and reliable
Powerful OpenSource RPA tool for business (based on python 3). Best performance and absolutely free!
The pyOpenRPA is based on Python and using well known OpenSource solutions such as Selenium, OpenCV, Win32, UI automation and others. Thanks to it we were able to create consolidated platform with all possible features.
The pyOpenRPA is distributed under the MIT license which allows you to use it in any way you want and any time you need without any restrictions.
The pyOpenRPA is distributed under the PYOPENRPA license.
At the time of this writing the pyOpenRPA is successfully using in several big Russian companies. Companies in which it was decided to develop own RPA division with no dependencies on expensive licenses.