Add pyOpenRPA.Tools.StopSafe module - check if VM_Close (from taskkill) was sent to the program. Or from orchestrator

Add Orchestrator and agent Logoff

#TODO schedule.from
dev-linux
Ivan Maslov 3 years ago
parent 2ad58efa4f
commit 9dd4d11e23

@ -0,0 +1,25 @@
####################################
2. Defs StopSafe
####################################
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
.. automodule:: pyOpenRPA.Tools.StopSafe
:members:
:autosummary:
**********
References
**********
`reStructuredText`_
.. target-notes::
.. _`reStructuredText`: http://docutils.sourceforge.net/rst.html

@ -161,4 +161,11 @@ Guide content
:caption: AGENT :caption: AGENT
:glob: :glob:
Agent/* Agent/*
.. toctree::
:maxdepth: 2
:caption: TOOLS
:glob:
Tools/*

@ -16,7 +16,6 @@ class Process():
- 4_STARTED - 4_STARTED
- 5_STARTED_MANUAL - 5_STARTED_MANUAL
.. code-block:: python .. code-block:: python
lProcess = Orchestrator.Managers.Process(inAgentHostNameStr="PCNAME",inAgentUserNameStr="USER", lProcess = Orchestrator.Managers.Process(inAgentHostNameStr="PCNAME",inAgentUserNameStr="USER",
inProcessNameWOExeStr="notepad",inStartCMDStr="notepad",inStopSafeTimeoutSecFloat=3) inProcessNameWOExeStr="notepad",inStartCMDStr="notepad",inStopSafeTimeoutSecFloat=3)
@ -26,6 +25,13 @@ class Process():
lProcess.StartCheck) lProcess.StartCheck)
# OR (sync mode) # OR (sync mode)
Orchestrator.OrchestratorScheduleGet().every(5).seconds.do(lProcess.StartCheck) Orchestrator.OrchestratorScheduleGet().every(5).seconds.do(lProcess.StartCheck)
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
""" """
mAgentHostNameStr = None mAgentHostNameStr = None

@ -148,6 +148,23 @@ def AgentOSCMD(inHostNameStr, inUserStr, inCMDStr, inRunAsyncBool=True, inSendOu
#Send item in AgentDict for the futher data transmition #Send item in AgentDict for the futher data transmition
return AgentActivityItemAdd(inGSettings=inGSettings, inHostNameStr=inHostNameStr, inUserStr=inUserStr, inActivityItemDict=lActivityItemDict) return AgentActivityItemAdd(inGSettings=inGSettings, inHostNameStr=inHostNameStr, inUserStr=inUserStr, inActivityItemDict=lActivityItemDict)
def AgentOSLogoff(inHostNameStr, inUserStr):
"""
Logoff the agent user session
:return: GUID String of the ActivityItem - you can wait (sync or async) result by this guid!
"""
inGSettings = GSettingsGet() # Set the global settings
lCMDStr = "shutdown /l"
lActivityItemDict = {
"Def":"OSCMD", # def alias (look pyOpeRPA.Agent gSettings["ProcessorDict"]["AliasDefDict"])
"ArgList":[], # Args list
"ArgDict":{"inCMDStr":lCMDStr,"inRunAsyncBool":False, "inSendOutputToOrchestratorLogsBool": True, "inCMDEncodingStr": "cp1251"}, # Args dictionary
"ArgGSettings": "inGSettings", # Name of GSettings attribute: str (ArgDict) or index (for ArgList)
"ArgLogger": None # Name of GSettings attribute: str (ArgDict) or index (for ArgList)
}
#Send item in AgentDict for the futher data transmition
return AgentActivityItemAdd(inGSettings=inGSettings, inHostNameStr=inHostNameStr, inUserStr=inUserStr, inActivityItemDict=lActivityItemDict)
def AgentOSFileSend(inHostNameStr, inUserStr, inOrchestratorFilePathStr, inAgentFilePathStr, inGSettings = None): def AgentOSFileSend(inHostNameStr, inUserStr, inOrchestratorFilePathStr, inAgentFilePathStr, inGSettings = None):
""" """
@ -373,6 +390,14 @@ def AgentProcessWOExeUpperUserListGet(inHostNameStr, inUserStr, inGSettings = No
return AgentActivityItemAdd(inGSettings=inGSettings, inHostNameStr=inHostNameStr, inUserStr=inUserStr, inActivityItemDict=lActivityItemDict) return AgentActivityItemAdd(inGSettings=inGSettings, inHostNameStr=inHostNameStr, inUserStr=inUserStr, inActivityItemDict=lActivityItemDict)
# OS DEFS # OS DEFS
def OSLogoff():
"""
Logoff the current orchestrator session
:return:
"""
os.system("shutdown /l")
def OSCredentialsVerify(inUserStr, inPasswordStr, inDomainStr=""): ## def OSCredentialsVerify(inUserStr, inPasswordStr, inDomainStr=""): ##
""" """
Verify user credentials in windows. Return bool Verify user credentials in windows. Return bool

@ -1,8 +1,10 @@
"""
# How to use # How to use
# from pyOpenRPA.Tools import Terminator # from pyOpenRPA.Tools import StopSafe
# Terminator.Init(inLogger=None) # StopSafe.Init(inLogger=None)
# Terminator.IsSignalClose() # True - WM_CLOSE SIGNAL has come # StopSafe.IsSafeStop() # True - WM_CLOSE SIGNAL has come. taskkill /im someprocess.exe
# Terminator.SessionLogoff() # Logoff the session """
import win32con import win32con
import win32gui import win32gui
@ -12,33 +14,35 @@ gLogger = None
gWindowTitleStr = "PythonTerminator" # Title of the phantom window 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 gWindowDescriptionStr = "pyOpenRPA library for safe turn off the program (by send the WM_CLOSE signal from task kill)" # Description of the phantom window
# Init the terminator
def Init(inLogger=None): def Init(inLogger=None):
"""
Init the StopSafe module. After that you can use def IsStopSafe() to check if close signal has come.
:param inLogger: Logger to log messages about StopSafe
:return:
"""
global gLogger global gLogger
global gIsSignalCloseBool global gIsSignalCloseBool
gIsSignalCloseBool = False # Init default gIsSignalCloseBool = False # Init default
gLogger = inLogger gLogger = inLogger
#import sys
#import time
#import atexit
import threading import threading
#atexit.register(print, 'PYTHON SPAM APP: SHUTDOWN') if gLogger: gLogger.info(f"StopSafe: Init termination catch thread")
shutdown_thread = threading.Thread(target=shutdown_monitor) shutdown_thread = threading.Thread(target=_shutdown_monitor)
shutdown_thread.start() shutdown_thread.start()
#shutdown_thread.join() #shutdown_thread.join()
#shutdown_monitor() #shutdown_monitor()
# Terminator.IsSignalClose() # True - WM_CLOSE SIGNAL has come
def IsSignalClose(): def IsStopSafe():
"""
Check if stop signal has come.
:return:
"""
global gIsSignalCloseBool # Init the global variable global gIsSignalCloseBool # Init the global variable
return gIsSignalCloseBool # Return the result return gIsSignalCloseBool # Return the result
# Terminator.SessionLogoff() # Logoff the session def _shutdown_monitor():
def SessionLogoff():
os.system("shutdown /l")
# Technical function
def shutdown_monitor():
global gIsSignalCloseBool # Init the global variable global gIsSignalCloseBool # Init the global variable
global gLogger global gLogger
def wndproc(hwnd, msg, wparam, lparam): def wndproc(hwnd, msg, wparam, lparam):
@ -58,5 +62,5 @@ def shutdown_monitor():
win32gui.PumpMessages() win32gui.PumpMessages()
gIsSignalCloseBool = True # WM_CLOSE message has come gIsSignalCloseBool = True # WM_CLOSE message has come
if gLogger: if gLogger:
gLogger.info(f"Terminator: Program has recieve the close signal - safe exit") gLogger.info(f"StopSafe: Program has catch VM_CLOSE signal - do safe exit")

@ -121,6 +121,10 @@
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="Agent/02_Defs.html">2. Defs</a></li> <li class="toctree-l1"><a class="reference internal" href="Agent/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">TOOLS</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>

@ -117,6 +117,10 @@
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="Agent/02_Defs.html">2. Defs</a></li> <li class="toctree-l1"><a class="reference internal" href="Agent/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">TOOLS</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>

@ -121,6 +121,10 @@
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="Agent/02_Defs.html">2. Defs</a></li> <li class="toctree-l1"><a class="reference internal" href="Agent/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">TOOLS</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>

@ -40,6 +40,7 @@
<link rel="index" title="Index" href="../genindex.html" /> <link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" /> <link rel="search" title="Search" href="../search.html" />
<link rel="next" title="2. Defs StopSafe" href="../Tools/02_Defs.html" />
<link rel="prev" title="6. Defs Managers" href="../Orchestrator/06_Defs%20Managers.html" /> <link rel="prev" title="6. Defs Managers" href="../Orchestrator/06_Defs%20Managers.html" />
</head> </head>
@ -120,6 +121,10 @@
</ul> </ul>
</li> </li>
</ul> </ul>
<p class="caption"><span class="caption-text">TOOLS</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>
@ -337,6 +342,7 @@
</div> </div>
<footer> <footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="../Tools/02_Defs.html" class="btn btn-neutral float-right" title="2. Defs StopSafe" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="../Orchestrator/06_Defs%20Managers.html" class="btn btn-neutral float-left" title="6. Defs Managers" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a> <a href="../Orchestrator/06_Defs%20Managers.html" class="btn btn-neutral float-left" title="6. Defs Managers" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
</div> </div>

@ -124,6 +124,10 @@
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li> <li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">TOOLS</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>

@ -135,6 +135,10 @@
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li> <li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">TOOLS</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>
@ -318,33 +322,39 @@
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSFileTextDataStrReceive" title="pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSFileTextDataStrReceive"><code class="xref py py-obj docutils literal notranslate"><span class="pre">AgentOSFileTextDataStrReceive</span></code></a>(inHostNameStr, …)</p></td> <tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSFileTextDataStrReceive" title="pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSFileTextDataStrReceive"><code class="xref py py-obj docutils literal notranslate"><span class="pre">AgentOSFileTextDataStrReceive</span></code></a>(inHostNameStr, …)</p></td>
<td><p>Read text file in the agent GUI session</p></td> <td><p>Read text file in the agent GUI session</p></td>
</tr> </tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.AgentProcessWOExeUpperUserListGet" title="pyOpenRPA.Orchestrator.__Orchestrator__.AgentProcessWOExeUpperUserListGet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">AgentProcessWOExeUpperUserListGet</span></code></a>(…[, …])</p></td> <tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSLogoff" title="pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSLogoff"><code class="xref py py-obj docutils literal notranslate"><span class="pre">AgentOSLogoff</span></code></a>(inHostNameStr, inUserStr)</p></td>
<td><p>Logoff the agent user session</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.AgentProcessWOExeUpperUserListGet" title="pyOpenRPA.Orchestrator.__Orchestrator__.AgentProcessWOExeUpperUserListGet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">AgentProcessWOExeUpperUserListGet</span></code></a>(…[, …])</p></td>
<td><p>Return the process list only for the current user (where Agent is running) without .EXE in upper case.</p></td> <td><p>Return the process list only for the current user (where Agent is running) without .EXE in upper case.</p></td>
</tr> </tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsAutocleaner" title="pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsAutocleaner"><code class="xref py py-obj docutils literal notranslate"><span class="pre">GSettingsAutocleaner</span></code></a>([inGSettings])</p></td> <tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsAutocleaner" title="pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsAutocleaner"><code class="xref py py-obj docutils literal notranslate"><span class="pre">GSettingsAutocleaner</span></code></a>([inGSettings])</p></td>
<td><p>HIDDEN Interval gSettings auto cleaner def to clear some garbage.</p></td> <td><p>HIDDEN Interval gSettings auto cleaner def to clear some garbage.</p></td>
</tr> </tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsGet" title="pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsGet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">GSettingsGet</span></code></a>([inGSettings])</p></td> <tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsGet" title="pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsGet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">GSettingsGet</span></code></a>([inGSettings])</p></td>
<td><p>Get the GSettings from the singleton module.</p></td> <td><p>Get the GSettings from the singleton module.</p></td>
</tr> </tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsKeyListValueAppend" title="pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsKeyListValueAppend"><code class="xref py py-obj docutils literal notranslate"><span class="pre">GSettingsKeyListValueAppend</span></code></a>(inValue[, …])</p></td> <tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsKeyListValueAppend" title="pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsKeyListValueAppend"><code class="xref py py-obj docutils literal notranslate"><span class="pre">GSettingsKeyListValueAppend</span></code></a>(inValue[, …])</p></td>
<td><p>Append value in GSettings by the key list</p></td> <td><p>Append value in GSettings by the key list</p></td>
</tr> </tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsKeyListValueGet" title="pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsKeyListValueGet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">GSettingsKeyListValueGet</span></code></a>([inKeyList, …])</p></td> <tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsKeyListValueGet" title="pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsKeyListValueGet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">GSettingsKeyListValueGet</span></code></a>([inKeyList, …])</p></td>
<td><p>Get the value from the GSettings by the key list</p></td> <td><p>Get the value from the GSettings by the key list</p></td>
</tr> </tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsKeyListValueOperatorPlus" title="pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsKeyListValueOperatorPlus"><code class="xref py py-obj docutils literal notranslate"><span class="pre">GSettingsKeyListValueOperatorPlus</span></code></a>(inValue[, …])</p></td> <tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsKeyListValueOperatorPlus" title="pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsKeyListValueOperatorPlus"><code class="xref py py-obj docutils literal notranslate"><span class="pre">GSettingsKeyListValueOperatorPlus</span></code></a>(inValue[, …])</p></td>
<td><p>Execute plus operation between 2 lists (1:inValue and 2:gSettings by the inKeyList)</p></td> <td><p>Execute plus operation between 2 lists (1:inValue and 2:gSettings by the inKeyList)</p></td>
</tr> </tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsKeyListValueSet" title="pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsKeyListValueSet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">GSettingsKeyListValueSet</span></code></a>(inValue[, …])</p></td> <tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsKeyListValueSet" title="pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsKeyListValueSet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">GSettingsKeyListValueSet</span></code></a>(inValue[, …])</p></td>
<td><p>Set value in GSettings by the key list</p></td> <td><p>Set value in GSettings by the key list</p></td>
</tr> </tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.OSCMD" title="pyOpenRPA.Orchestrator.__Orchestrator__.OSCMD"><code class="xref py py-obj docutils literal notranslate"><span class="pre">OSCMD</span></code></a>(inCMDStr[, inRunAsyncBool, inLogger])</p></td> <tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.OSCMD" title="pyOpenRPA.Orchestrator.__Orchestrator__.OSCMD"><code class="xref py py-obj docutils literal notranslate"><span class="pre">OSCMD</span></code></a>(inCMDStr[, inRunAsyncBool, inLogger])</p></td>
<td><p>OS send command in shell locally</p></td> <td><p>OS send command in shell locally</p></td>
</tr> </tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.OSCredentialsVerify" title="pyOpenRPA.Orchestrator.__Orchestrator__.OSCredentialsVerify"><code class="xref py py-obj docutils literal notranslate"><span class="pre">OSCredentialsVerify</span></code></a>(inUserStr, inPasswordStr)</p></td> <tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.OSCredentialsVerify" title="pyOpenRPA.Orchestrator.__Orchestrator__.OSCredentialsVerify"><code class="xref py py-obj docutils literal notranslate"><span class="pre">OSCredentialsVerify</span></code></a>(inUserStr, inPasswordStr)</p></td>
<td><p>Verify user credentials in windows.</p></td> <td><p>Verify user credentials in windows.</p></td>
</tr> </tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.OSLogoff" title="pyOpenRPA.Orchestrator.__Orchestrator__.OSLogoff"><code class="xref py py-obj docutils literal notranslate"><span class="pre">OSLogoff</span></code></a>()</p></td>
<td><p>Logoff the current orchestrator session :return:</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.OSRemotePCRestart" title="pyOpenRPA.Orchestrator.__Orchestrator__.OSRemotePCRestart"><code class="xref py py-obj docutils literal notranslate"><span class="pre">OSRemotePCRestart</span></code></a>(inHostStr[, inForceBool, …])</p></td> <tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.OSRemotePCRestart" title="pyOpenRPA.Orchestrator.__Orchestrator__.OSRemotePCRestart"><code class="xref py py-obj docutils literal notranslate"><span class="pre">OSRemotePCRestart</span></code></a>(inHostStr[, inForceBool, …])</p></td>
<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>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>
</tr> </tr>
@ -366,12 +376,18 @@
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorRestart" title="pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorRestart"><code class="xref py py-obj docutils literal notranslate"><span class="pre">OrchestratorRestart</span></code></a>([inGSettings])</p></td> <tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorRestart" title="pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorRestart"><code class="xref py py-obj docutils literal notranslate"><span class="pre">OrchestratorRestart</span></code></a>([inGSettings])</p></td>
<td><p>Orchestrator restart</p></td> <td><p>Orchestrator restart</p></td>
</tr> </tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionRestore" title="pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionRestore"><code class="xref py py-obj docutils literal notranslate"><span class="pre">OrchestratorSessionRestore</span></code></a>([inGSettings])</p></td> <tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorScheduleGet" title="pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorScheduleGet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">OrchestratorScheduleGet</span></code></a>()</p></td>
<td><p>Get the schedule (schedule.readthedocs.io) from the Orchestrator</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionRestore" title="pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionRestore"><code class="xref py py-obj docutils literal notranslate"><span class="pre">OrchestratorSessionRestore</span></code></a>([inGSettings])</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 _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>
</tr> </tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionSave" title="pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionSave"><code class="xref py py-obj docutils literal notranslate"><span class="pre">OrchestratorSessionSave</span></code></a>([inGSettings])</p></td> <tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionSave" title="pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionSave"><code class="xref py py-obj docutils literal notranslate"><span class="pre">OrchestratorSessionSave</span></code></a>([inGSettings])</p></td>
<td><p>Orchestrator session save in file</p></td> <td><p>Orchestrator session save in file</p></td>
</tr> </tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorThreadStart" title="pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorThreadStart"><code class="xref py py-obj docutils literal notranslate"><span class="pre">OrchestratorThreadStart</span></code></a>(inDef, *inArgList, …)</p></td>
<td><p>Execute def in new thread and pass some args with list and dict types</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessDefIntervalCall" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessDefIntervalCall"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessDefIntervalCall</span></code></a>(inDef, inIntervalSecFloat)</p></td> <tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessDefIntervalCall" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessDefIntervalCall"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessDefIntervalCall</span></code></a>(inDef, inIntervalSecFloat)</p></td>
<td><p>Use this procedure if you need to run periodically some def.</p></td> <td><p>Use this procedure if you need to run periodically some def.</p></td>
</tr> </tr>
@ -921,6 +937,17 @@ Thread safe - you can call def even if you dont init the orchestrator - def will
</dl> </dl>
</dd></dl> </dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSLogoff">
<code class="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><code class="sig-name descname">AgentOSLogoff</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inHostNameStr</span></em>, <em class="sig-param"><span class="n">inUserStr</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#AgentOSLogoff"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSLogoff" title="Permalink to this definition"></a></dt>
<dd><p>Logoff the agent user session</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>GUID String of the ActivityItem - you can wait (sync or async) result by this guid!</p>
</dd>
</dl>
</dd></dl>
<dl class="py function"> <dl class="py function">
<dt id="pyOpenRPA.Orchestrator.__Orchestrator__.AgentProcessWOExeUpperUserListGet"> <dt id="pyOpenRPA.Orchestrator.__Orchestrator__.AgentProcessWOExeUpperUserListGet">
<code class="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><code class="sig-name descname">AgentProcessWOExeUpperUserListGet</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inHostNameStr</span></em>, <em class="sig-param"><span class="n">inUserStr</span></em>, <em class="sig-param"><span class="n">inGSettings</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#AgentProcessWOExeUpperUserListGet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Orchestrator.__Orchestrator__.AgentProcessWOExeUpperUserListGet" title="Permalink to this definition"></a></dt> <code class="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><code class="sig-name descname">AgentProcessWOExeUpperUserListGet</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inHostNameStr</span></em>, <em class="sig-param"><span class="n">inUserStr</span></em>, <em class="sig-param"><span class="n">inGSettings</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#AgentProcessWOExeUpperUserListGet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Orchestrator.__Orchestrator__.AgentProcessWOExeUpperUserListGet" title="Permalink to this definition"></a></dt>
@ -1111,6 +1138,13 @@ Thread safe - you can call def even if you dont init the orchestrator - def will
</dl> </dl>
</dd></dl> </dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Orchestrator.__Orchestrator__.OSLogoff">
<code class="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><code class="sig-name descname">OSLogoff</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#OSLogoff"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Orchestrator.__Orchestrator__.OSLogoff" title="Permalink to this definition"></a></dt>
<dd><p>Logoff the current orchestrator session
:return:</p>
</dd></dl>
<dl class="py function"> <dl class="py function">
<dt id="pyOpenRPA.Orchestrator.__Orchestrator__.OSRemotePCRestart"> <dt id="pyOpenRPA.Orchestrator.__Orchestrator__.OSRemotePCRestart">
<code class="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><code class="sig-name descname">OSRemotePCRestart</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inHostStr</span></em>, <em class="sig-param"><span class="n">inForceBool</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="n">inLogger</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#OSRemotePCRestart"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Orchestrator.__Orchestrator__.OSRemotePCRestart" title="Permalink to this definition"></a></dt> <code class="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><code class="sig-name descname">OSRemotePCRestart</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inHostStr</span></em>, <em class="sig-param"><span class="n">inForceBool</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="n">inLogger</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#OSRemotePCRestart"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Orchestrator.__Orchestrator__.OSRemotePCRestart" title="Permalink to this definition"></a></dt>
@ -1228,6 +1262,18 @@ ATTENTION: Orchestrator user need to have restart right on the Remote machine to
</dl> </dl>
</dd></dl> </dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorScheduleGet">
<code class="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><code class="sig-name descname">OrchestratorScheduleGet</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; &lt;module schedule from c:\abs\archive\scopesrcul\pyopenrpa\resources\wpy64-3720\python-3.7.2.amd64\lib\site-packages\schedule\__init__.py&gt;<a class="reference internal" href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#OrchestratorScheduleGet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorScheduleGet" title="Permalink to this definition"></a></dt>
<dd><p>Get the schedule (schedule.readthedocs.io) from the Orchestrator</p>
<p>Fro example you can use:</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>schedule module. Example see here <a class="reference external" href="https://schedule.readthedocs.io/en/stable/examples.html">https://schedule.readthedocs.io/en/stable/examples.html</a></p>
</dd>
</dl>
</dd></dl>
<dl class="py function"> <dl class="py function">
<dt id="pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionRestore"> <dt id="pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionRestore">
<code class="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><code class="sig-name descname">OrchestratorSessionRestore</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inGSettings</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#OrchestratorSessionRestore"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionRestore" title="Permalink to this definition"></a></dt> <code class="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><code class="sig-name descname">OrchestratorSessionRestore</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inGSettings</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#OrchestratorSessionRestore"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionRestore" title="Permalink to this definition"></a></dt>
@ -1265,6 +1311,24 @@ _SessionLast_StorageDict.pickle (binary)</p>
</dl> </dl>
</dd></dl> </dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorThreadStart">
<code class="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><code class="sig-name descname">OrchestratorThreadStart</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inDef</span></em>, <em class="sig-param"><span class="o">*</span><span class="n">inArgList</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">inArgDict</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#OrchestratorThreadStart"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorThreadStart" title="Permalink to this definition"></a></dt>
<dd><p>Execute def in new thread and pass some args with list and dict types</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>inDef</strong> Python Def</p></li>
<li><p><strong>inArgList</strong> args as list</p></li>
<li><p><strong>inArgDict</strong> args as dict</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>threading.Thread object</p>
</dd>
</dl>
</dd></dl>
<dl class="py function"> <dl class="py function">
<dt id="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessDefIntervalCall"> <dt id="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessDefIntervalCall">
<code class="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><code class="sig-name descname">ProcessDefIntervalCall</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inDef</span></em>, <em class="sig-param"><span class="n">inIntervalSecFloat</span></em>, <em class="sig-param"><span class="n">inIntervalAsyncBool</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">inDefArgList</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inDefArgDict</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inDefArgGSettingsNameStr</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inDefArgLoggerNameStr</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inExecuteInNewThreadBool</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="n">inLogger</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inGSettings</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#ProcessDefIntervalCall"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessDefIntervalCall" title="Permalink to this definition"></a></dt> <code class="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><code class="sig-name descname">ProcessDefIntervalCall</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inDef</span></em>, <em class="sig-param"><span class="n">inIntervalSecFloat</span></em>, <em class="sig-param"><span class="n">inIntervalAsyncBool</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">inDefArgList</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inDefArgDict</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inDefArgGSettingsNameStr</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inDefArgLoggerNameStr</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inExecuteInNewThreadBool</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="n">inLogger</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inGSettings</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#ProcessDefIntervalCall"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessDefIntervalCall" title="Permalink to this definition"></a></dt>

@ -117,6 +117,10 @@
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li> <li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">TOOLS</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>
@ -187,6 +191,7 @@
<h1>3. gSettings Template<a class="headerlink" href="#gsettings-template" title="Permalink to this headline"></a></h1> <h1>3. gSettings Template<a class="headerlink" href="#gsettings-template" title="Permalink to this headline"></a></h1>
<p>gSettings structure</p> <p>gSettings structure</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">os</span><span class="o">,</span> <span class="nn">logging</span><span class="o">,</span> <span class="nn">datetime</span><span class="o">,</span> <span class="nn">sys</span> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">os</span><span class="o">,</span> <span class="nn">logging</span><span class="o">,</span> <span class="nn">datetime</span><span class="o">,</span> <span class="nn">sys</span>
<span class="kn">import</span> <span class="nn">schedule</span> <span class="c1"># https://schedule.readthedocs.io/en/stable/examples.html</span>
<span class="c1"># Technical def - return GSettings structure with examples</span> <span class="c1"># Technical def - return GSettings structure with examples</span>
<span class="k">def</span> <span class="nf">__Create__</span><span class="p">():</span> <span class="k">def</span> <span class="nf">__Create__</span><span class="p">():</span>
@ -317,6 +322,7 @@
<span class="s2">&quot;ActivityList&quot;</span><span class="p">:</span> <span class="p">[]</span> <span class="s2">&quot;ActivityList&quot;</span><span class="p">:</span> <span class="p">[]</span>
<span class="p">},</span> <span class="p">},</span>
<span class="s2">&quot;SchedulerDict&quot;</span><span class="p">:</span> <span class="p">{</span> <span class="s2">&quot;SchedulerDict&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="s2">&quot;Schedule&quot;</span><span class="p">:</span> <span class="n">schedule</span><span class="p">,</span> <span class="c1"># https://schedule.readthedocs.io/en/stable/examples.html</span>
<span class="s2">&quot;CheckIntervalSecFloat&quot;</span><span class="p">:</span> <span class="mf">5.0</span><span class="p">,</span> <span class="c1"># Check interval in seconds</span> <span class="s2">&quot;CheckIntervalSecFloat&quot;</span><span class="p">:</span> <span class="mf">5.0</span><span class="p">,</span> <span class="c1"># Check interval in seconds</span>
<span class="s2">&quot;ActivityTimeList&quot;</span><span class="p">:</span> <span class="p">[</span> <span class="s2">&quot;ActivityTimeList&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="c1"># {</span> <span class="c1"># {</span>

@ -117,6 +117,10 @@
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li> <li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">TOOLS</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>
@ -228,6 +232,30 @@
<span class="n">lPyModules</span> <span class="o">=</span> <span class="n">Orchestrator</span><span class="o">.</span><span class="n">OrchestratorPySearchInit</span><span class="p">(</span><span class="n">inGlobPatternStr</span><span class="o">=</span><span class="s2">&quot;ControlPanel</span><span class="se">\\</span><span class="s2">CP_*.py&quot;</span><span class="p">,</span> <span class="n">inDefStr</span><span class="o">=</span><span class="s2">&quot;SettingsUpdate&quot;</span><span class="p">,</span> <span class="n">inDefArgNameGSettingsStr</span><span class="o">=</span><span class="s2">&quot;inGSettings&quot;</span><span class="p">)</span> <span class="n">lPyModules</span> <span class="o">=</span> <span class="n">Orchestrator</span><span class="o">.</span><span class="n">OrchestratorPySearchInit</span><span class="p">(</span><span class="n">inGlobPatternStr</span><span class="o">=</span><span class="s2">&quot;ControlPanel</span><span class="se">\\</span><span class="s2">CP_*.py&quot;</span><span class="p">,</span> <span class="n">inDefStr</span><span class="o">=</span><span class="s2">&quot;SettingsUpdate&quot;</span><span class="p">,</span> <span class="n">inDefArgNameGSettingsStr</span><span class="o">=</span><span class="s2">&quot;inGSettings&quot;</span><span class="p">)</span>
<span class="c1"># Call the orchestrator def</span> <span class="c1"># Call the orchestrator def</span>
<span class="n">Orchestrator</span><span class="o">.</span><span class="n">Orchestrator</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">gSettings</span><span class="p">,</span> <span class="n">inDumpRestoreBool</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span> <span class="n">Orchestrator</span><span class="o">.</span><span class="n">Orchestrator</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">gSettings</span><span class="p">,</span> <span class="n">inDumpRestoreBool</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="c1">#import atexit</span>
<span class="c1">#def test():</span>
<span class="c1"># Orchestrator.OrchestratorLoggerGet().info(123)</span>
<span class="c1">#atexit.register(test)</span>
<span class="kn">import</span> <span class="nn">signal</span>
<span class="kn">import</span> <span class="nn">sys</span>
<span class="kn">from</span> <span class="nn">pyOpenRPA.Tools</span> <span class="kn">import</span> <span class="n">Terminator</span>
<span class="n">Terminator</span><span class="o">.</span><span class="n">Init</span><span class="p">(</span><span class="n">inLogger</span><span class="o">=</span><span class="n">Orchestrator</span><span class="o">.</span><span class="n">OrchestratorLoggerGet</span><span class="p">())</span>
<span class="c1">#def signal_term_handler(signal, frame):</span>
<span class="c1"># Orchestrator.OrchestratorLoggerGet().info(&#39;got SIGTERM&#39;)</span>
<span class="c1"># sys.exit(0)</span>
<span class="c1">#signal.signal(signal.SIGTERM, signal_term_handler)</span>
<span class="kn">import</span> <span class="nn">time</span>
<span class="k">while</span> <span class="ow">not</span> <span class="n">Terminator</span><span class="o">.</span><span class="n">IsSignalClose</span><span class="p">():</span>
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="mi">999</span><span class="p">)</span>
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span> <span class="k">else</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;!WARNING! Current orchestrator settings do not support old type of the Orchestrator start. Use new Orchestrator type start (see v1.2.0)&quot;</span><span class="p">)</span> <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;!WARNING! Current orchestrator settings do not support old type of the Orchestrator start. Use new Orchestrator type start (see v1.2.0)&quot;</span><span class="p">)</span>

@ -121,6 +121,10 @@
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li> <li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">TOOLS</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>

File diff suppressed because it is too large Load Diff

@ -117,6 +117,10 @@
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li> <li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">TOOLS</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>

@ -120,6 +120,10 @@
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li> <li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">TOOLS</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>

@ -146,6 +146,10 @@
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li> <li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">TOOLS</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>

@ -117,6 +117,10 @@
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li> <li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">TOOLS</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>

@ -117,6 +117,10 @@
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li> <li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">TOOLS</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>

@ -140,6 +140,10 @@
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li> <li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">TOOLS</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>

@ -0,0 +1,297 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>2. Defs StopSafe &mdash; pyOpenRPA v1.2.0 documentation</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="prev" title="2. Defs" href="../Agent/02_Defs.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home"> pyOpenRPA
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">GENERAL</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../01_HowToInstall.html">1. How to install</a></li>
<li class="toctree-l1"><a class="reference internal" href="../02_RoadMap.html">2. Roadmap</a></li>
<li class="toctree-l1"><a class="reference internal" href="../03_Copyrights_Contacts.html">3. Copyrights &amp; Contacts</a></li>
</ul>
<p class="caption"><span class="caption-text">ROBOT</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Robot/01_Robot.html">1. Description</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Robot/02_Defs.html">2. Defs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Robot/03_HowToUse.html">3. How to use</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Robot/04_Dependencies.html">4. Dependencies</a></li>
</ul>
<p class="caption"><span class="caption-text">STUDIO</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Studio/01_Studio.html">1. Description</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Studio/02_HowToUse.html">2. How to use</a></li>
</ul>
<p class="caption"><span class="caption-text">ORCHESTRATOR</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/01_Orchestrator.html">1. Description</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/02_Defs.html">2. Defs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/03_gSettingsTemplate.html">3. gSettings Template</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/04_HowToUse.html">4. How to use</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/05_UAC.html">5. UAC - User Access Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a></li>
</ul>
<p class="caption"><span class="caption-text">AGENT</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
</ul>
<p class="caption"><span class="caption-text">TOOLS</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">2. Defs StopSafe</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#references">References</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">pyOpenRPA</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>2. Defs StopSafe</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/Tools/02_Defs.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="defs-stopsafe">
<h1>2. Defs StopSafe<a class="headerlink" href="#defs-stopsafe" title="Permalink to this headline"></a></h1>
<p>How to use StopSafe on the robot side</p>
<span class="target" id="module-pyOpenRPA.Tools.StopSafe"></span><p># How to use
# from pyOpenRPA.Tools import StopSafe
# StopSafe.Init(inLogger=None)
# StopSafe.IsSafeStop() # True - WM_CLOSE SIGNAL has come. taskkill /im someprocess.exe</p>
<p><strong>Functions:</strong></p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Tools.StopSafe.Init" title="pyOpenRPA.Tools.StopSafe.Init"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Init</span></code></a>([inLogger])</p></td>
<td><p>Init the StopSafe module.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Tools.StopSafe.IsStopSafe" title="pyOpenRPA.Tools.StopSafe.IsStopSafe"><code class="xref py py-obj docutils literal notranslate"><span class="pre">IsStopSafe</span></code></a>()</p></td>
<td><p>Check if stop signal has come.</p></td>
</tr>
</tbody>
</table>
<dl class="py function">
<dt id="pyOpenRPA.Tools.StopSafe.Init">
<code class="sig-prename descclassname">pyOpenRPA.Tools.StopSafe.</code><code class="sig-name descname">Init</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inLogger</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Tools/StopSafe.html#Init"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Tools.StopSafe.Init" title="Permalink to this definition"></a></dt>
<dd><p>Init the StopSafe module. After that you can use def IsStopSafe() to check if close signal has come.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>inLogger</strong> Logger to log messages about StopSafe</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Tools.StopSafe.IsStopSafe">
<code class="sig-prename descclassname">pyOpenRPA.Tools.StopSafe.</code><code class="sig-name descname">IsStopSafe</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Tools/StopSafe.html#IsStopSafe"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Tools.StopSafe.IsStopSafe" title="Permalink to this definition"></a></dt>
<dd><p>Check if stop signal has come.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p></p>
</dd>
</dl>
</dd></dl>
<div class="section" id="references">
<h2>References<a class="headerlink" href="#references" title="Permalink to this headline"></a></h2>
<p><a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> <a class="footnote-reference brackets" href="#id1" id="id2">1</a></p>
<dl class="footnote brackets">
<dt class="label" id="id1"><span class="brackets"><a class="fn-backref" href="#id2">1</a></span></dt>
<dd><p><a class="reference external" href="http://docutils.sourceforge.net/rst.html">http://docutils.sourceforge.net/rst.html</a></p>
</dd>
</dl>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="../Agent/02_Defs.html" class="btn btn-neutral float-left" title="2. Defs" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2021, Ivan Maslov.
</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

@ -115,6 +115,10 @@
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li> <li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">TOOLS</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>
@ -184,6 +188,7 @@
<li><a href="pyOpenRPA/Orchestrator/Web/Basic.html">pyOpenRPA.Orchestrator.Web.Basic</a></li> <li><a href="pyOpenRPA/Orchestrator/Web/Basic.html">pyOpenRPA.Orchestrator.Web.Basic</a></li>
<li><a href="pyOpenRPA/Orchestrator/__Orchestrator__.html">pyOpenRPA.Orchestrator.__Orchestrator__</a></li> <li><a href="pyOpenRPA/Orchestrator/__Orchestrator__.html">pyOpenRPA.Orchestrator.__Orchestrator__</a></li>
<li><a href="pyOpenRPA/Robot/UIDesktop.html">pyOpenRPA.Robot.UIDesktop</a></li> <li><a href="pyOpenRPA/Robot/UIDesktop.html">pyOpenRPA.Robot.UIDesktop</a></li>
<li><a href="pyOpenRPA/Tools/StopSafe.html">pyOpenRPA.Tools.StopSafe</a></li>
</ul> </ul>
</div> </div>

@ -115,6 +115,10 @@
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="../../../Agent/02_Defs.html">2. Defs</a></li> <li class="toctree-l1"><a class="reference internal" href="../../../Agent/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">TOOLS</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>

@ -115,6 +115,10 @@
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../Agent/02_Defs.html">2. Defs</a></li> <li class="toctree-l1"><a class="reference internal" href="../../../../Agent/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">TOOLS</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>

@ -115,6 +115,10 @@
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../Agent/02_Defs.html">2. Defs</a></li> <li class="toctree-l1"><a class="reference internal" href="../../../../Agent/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">TOOLS</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>
@ -183,7 +187,7 @@
<span></span><span class="c1">#from pyOpenRPA.Orchestrator import Managers</span> <span></span><span class="c1">#from pyOpenRPA.Orchestrator import Managers</span>
<span class="kn">from</span> <span class="nn">..</span> <span class="kn">import</span> <span class="n">__Orchestrator__</span> <span class="kn">from</span> <span class="nn">..</span> <span class="kn">import</span> <span class="n">__Orchestrator__</span>
<span class="kn">import</span> <span class="nn">os</span> <span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">time</span>
<div class="viewcode-block" id="Process"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process">[docs]</a><span class="k">class</span> <span class="nc">Process</span><span class="p">():</span> <div class="viewcode-block" id="Process"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process">[docs]</a><span class="k">class</span> <span class="nc">Process</span><span class="p">():</span>
<span class="sd">&quot;&quot;&quot;</span> <span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Manager process, which is need to be started / stopped / restarted</span> <span class="sd"> Manager process, which is need to be started / stopped / restarted</span>
@ -197,6 +201,23 @@
<span class="sd"> - 3_STOP_SAFE_MANUAL</span> <span class="sd"> - 3_STOP_SAFE_MANUAL</span>
<span class="sd"> - 4_STARTED</span> <span class="sd"> - 4_STARTED</span>
<span class="sd"> - 5_STARTED_MANUAL</span> <span class="sd"> - 5_STARTED_MANUAL</span>
<span class="sd"> .. code-block:: python</span>
<span class="sd"> lProcess = Orchestrator.Managers.Process(inAgentHostNameStr=&quot;PCNAME&quot;,inAgentUserNameStr=&quot;USER&quot;,</span>
<span class="sd"> inProcessNameWOExeStr=&quot;notepad&quot;,inStartCMDStr=&quot;notepad&quot;,inStopSafeTimeoutSecFloat=3)</span>
<span class="sd"> # Async way to run job</span>
<span class="sd"> lProcess.ScheduleStatusCheckEverySeconds(inIntervalSecondsInt=5)</span>
<span class="sd"> Orchestrator.OrchestratorScheduleGet().every(5).seconds.do(Orchestrator.OrchestratorThreadStart,</span>
<span class="sd"> lProcess.StartCheck)</span>
<span class="sd"> # OR (sync mode)</span>
<span class="sd"> Orchestrator.OrchestratorScheduleGet().every(5).seconds.do(lProcess.StartCheck)</span>
<span class="sd"> How to use StopSafe on the robot side</span>
<span class="sd"> .. code-block:: python</span>
<span class="sd"> from pyOpenRPA.Tools import StopSafe</span>
<span class="sd"> StopSafe.Init(inLogger=None)</span>
<span class="sd"> StopSafe.IsSafeStop() # True - WM_CLOSE SIGNAL has come. taskkill /im someprocess.exe</span>
<span class="sd"> &quot;&quot;&quot;</span> <span class="sd"> &quot;&quot;&quot;</span>
<span class="n">mAgentHostNameStr</span> <span class="o">=</span> <span class="kc">None</span> <span class="n">mAgentHostNameStr</span> <span class="o">=</span> <span class="kc">None</span>
@ -207,6 +228,24 @@
<span class="n">mStopSafeTimeoutSecFloat</span> <span class="o">=</span> <span class="kc">None</span> <span class="n">mStopSafeTimeoutSecFloat</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mStatusStr</span> <span class="o">=</span> <span class="kc">None</span> <span class="c1"># 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span> <span class="n">mStatusStr</span> <span class="o">=</span> <span class="kc">None</span> <span class="c1"># 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<span class="c1"># MST - Manual Stop Trigger</span>
<span class="n">mMSTdTSecFloat</span><span class="p">:</span> <span class="nb">float</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mMSTdNInt</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mMSTStartTimeList</span> <span class="o">=</span> <span class="p">[]</span>
<span class="n">mAgentMuteBool</span> <span class="o">=</span> <span class="kc">False</span> <span class="c1"># Mute any sends to agent while some action is perfomed</span>
<div class="viewcode-block" id="Process.MuteWait"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.MuteWait">[docs]</a> <span class="k">def</span> <span class="nf">MuteWait</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Internal def. Wait when class is apply to send new activities to the agent</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lIntervalSecFloat</span> <span class="o">=</span> <span class="mf">0.3</span>
<span class="k">while</span> <span class="bp">self</span><span class="o">.</span><span class="n">mAgentMuteBool</span> <span class="o">==</span> <span class="kc">True</span><span class="p">:</span>
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="n">lIntervalSecFloat</span><span class="p">)</span>
<span class="k">return</span> <span class="kc">None</span></div>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inAgentHostNameStr</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="p">,</span> <span class="n">inProcessNameWOExeStr</span><span class="p">,</span> <span class="n">inStartPathStr</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inStartCMDStr</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="n">inStopSafeTimeoutSecFloat</span><span class="o">=</span><span class="mi">120</span><span class="p">):</span> <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inAgentHostNameStr</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="p">,</span> <span class="n">inProcessNameWOExeStr</span><span class="p">,</span> <span class="n">inStartPathStr</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inStartCMDStr</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="n">inStopSafeTimeoutSecFloat</span><span class="o">=</span><span class="mi">120</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mAgentHostNameStr</span> <span class="o">=</span> <span class="n">inAgentHostNameStr</span> <span class="bp">self</span><span class="o">.</span><span class="n">mAgentHostNameStr</span> <span class="o">=</span> <span class="n">inAgentHostNameStr</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mAgentUserNameStr</span> <span class="o">=</span> <span class="n">inAgentUserNameStr</span> <span class="bp">self</span><span class="o">.</span><span class="n">mAgentUserNameStr</span> <span class="o">=</span> <span class="n">inAgentUserNameStr</span>
@ -218,6 +257,52 @@
<span class="n">lActivityDict</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">ProcessorActivityItemCreate</span><span class="p">(</span><span class="n">inDef</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">StatusCheck</span><span class="p">,</span><span class="n">inArgList</span><span class="o">=</span><span class="p">[])</span> <span class="n">lActivityDict</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">ProcessorActivityItemCreate</span><span class="p">(</span><span class="n">inDef</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">StatusCheck</span><span class="p">,</span><span class="n">inArgList</span><span class="o">=</span><span class="p">[])</span>
<span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">ProcessorActivityItemAppend</span><span class="p">(</span><span class="n">inActivityItemDict</span><span class="o">=</span><span class="n">lActivityDict</span><span class="p">)</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">ProcessorActivityItemAppend</span><span class="p">(</span><span class="n">inActivityItemDict</span><span class="o">=</span><span class="n">lActivityDict</span><span class="p">)</span>
<div class="viewcode-block" id="Process.ManualStopTriggerSet"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.ManualStopTriggerSet">[docs]</a> <span class="k">def</span> <span class="nf">ManualStopTriggerSet</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inMSTdTSecFloat</span><span class="p">:</span> <span class="nb">float</span><span class="p">,</span> <span class="n">inMSTdNInt</span><span class="p">:</span> <span class="nb">int</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Set ManualStopTrigger (MST) to switch to STOPPED MANUAL if specified count of start fails will be catched in specified time period</span>
<span class="sd"> :param inMSTdTSecFloat: Time perios in seconds</span>
<span class="sd"> :param inMSTdNInt: Counts of the start tries</span>
<span class="sd"> :return: None</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="c1"># MST - Manual Stop Trigger</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mMSTdTSecFloat</span> <span class="o">=</span> <span class="n">inMSTdTSecFloat</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mMSTdNInt</span> <span class="o">=</span> <span class="n">inMSTdNInt</span></div>
<div class="viewcode-block" id="Process.ManualStopTriggerNewStart"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.ManualStopTriggerNewStart">[docs]</a> <span class="k">def</span> <span class="nf">ManualStopTriggerNewStart</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Log new start event. Check if it is applicable. Change status if ManualStop trigger criteria is applied</span>
<span class="sd"> :return: # 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mMSTdTSecFloat</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">mMSTdNInt</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">lTimeNowSecFloat</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mMSTStartTimeList</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">lTimeNowSecFloat</span><span class="p">)</span> <span class="c1"># Append current time to MST list</span>
<span class="c1"># Remove old items from list</span>
<span class="n">lMSTStartTimeList</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">for</span> <span class="n">lTimeItemSecFloat</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">mMSTStartTimeList</span><span class="p">:</span>
<span class="n">ldTSecFloat</span> <span class="o">=</span> <span class="n">lTimeNowSecFloat</span> <span class="o">-</span> <span class="n">lTimeItemSecFloat</span>
<span class="c1"># Move to the new list if dT less</span>
<span class="k">if</span> <span class="n">ldTSecFloat</span> <span class="o">&lt;</span> <span class="bp">self</span><span class="o">.</span><span class="n">mMSTdTSecFloat</span><span class="p">:</span> <span class="n">lMSTStartTimeList</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">lTimeItemSecFloat</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mMSTStartTimeList</span> <span class="o">=</span> <span class="n">lMSTStartTimeList</span> <span class="c1"># Set new list</span>
<span class="c1"># Check count in list</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">lMSTStartTimeList</span><span class="p">)</span> <span class="o">&gt;</span> <span class="bp">self</span><span class="o">.</span><span class="n">mMSTdNInt</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;1_STOPPED_MANUAL&quot;</span>
<span class="c1"># Log info about process</span>
<span class="n">lL</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">OrchestratorLoggerGet</span><span class="p">()</span>
<span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Managers.Process (</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentHostNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentUserNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mProcessNameWOExeStr</span><span class="si">}</span><span class="s2">): ManualStopTrigger is activated. </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mMSTdNInt</span><span class="si">}</span><span class="s2"> start tries in </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mMSTdTSecFloat</span><span class="si">}</span><span class="s2"> sec.&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
<div class="viewcode-block" id="Process.ManualStopListClear"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.ManualStopListClear">[docs]</a> <span class="k">def</span> <span class="nf">ManualStopListClear</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Clear the last start tries list.</span>
<span class="sd"> :return: None</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mMSTStartTimeList</span><span class="o">=</span><span class="p">[]</span></div>
<div class="viewcode-block" id="Process.Manual2Auto"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.Manual2Auto">[docs]</a> <span class="k">def</span> <span class="nf">Manual2Auto</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span> <div class="viewcode-block" id="Process.Manual2Auto"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.Manual2Auto">[docs]</a> <span class="k">def</span> <span class="nf">Manual2Auto</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span> <span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):</span> <span class="sd"> Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):</span>
@ -234,16 +319,24 @@
<div class="viewcode-block" id="Process.Start"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.Start">[docs]</a> <span class="k">def</span> <span class="nf">Start</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inIsManualBool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span> <div class="viewcode-block" id="Process.Start"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.Start">[docs]</a> <span class="k">def</span> <span class="nf">Start</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inIsManualBool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span> <span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Manual/Auto start. Manual start will block scheduling execution. To return schedule execution use def Manual2Auto</span> <span class="sd"> Manual/Auto start. Manual start will block scheduling execution. To return schedule execution use def Manual2Auto.</span>
<span class="sd"> Will not start if STOP SAFE is now and don&#39;t start auto is stopped manual now</span>
<span class="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> <span class="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>
<span class="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> <span class="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>
<span class="sd"> &quot;&quot;&quot;</span> <span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="n">inIsManualBool</span> <span class="o">==</span> <span class="kc">False</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">ManualStopTriggerNewStart</span><span class="p">()</span> <span class="c1"># Set the time</span>
<span class="k">if</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">==</span> <span class="s2">&quot;1_STOPPED_MANUAL&quot;</span> <span class="ow">or</span> <span class="s2">&quot;STOP_SAFE&quot;</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span><span class="p">)</span> <span class="ow">and</span> <span class="n">inIsManualBool</span> <span class="o">==</span> <span class="kc">False</span><span class="p">:</span>
<span class="n">lStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;Managers.Process (</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentHostNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentUserNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mProcessNameWOExeStr</span><span class="si">}</span><span class="s2">): Process will not start because of stopped manual or stop safe is now.&quot;</span>
<span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">OrchestratorLoggerGet</span><span class="p">()</span><span class="o">.</span><span class="n">warning</span><span class="p">(</span><span class="n">lStr</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span>
<span class="c1"># Send activity item to agent - wait result</span> <span class="c1"># Send activity item to agent - wait result</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStartPathStr</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="n">lCMDStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;start </span><span class="si">{</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">abspath</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mStartPathStr</span><span class="p">)</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStartPathStr</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="n">lCMDStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;start </span><span class="si">{</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">abspath</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mStartPathStr</span><span class="p">)</span><span class="si">}</span><span class="s2">&quot;</span>
<span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStartCMDStr</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="n">lCMDStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;start </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mStartCMDStr</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStartCMDStr</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="n">lCMDStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;start </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mStartCMDStr</span><span class="si">}</span><span class="s2">&quot;</span>
<span class="c1">#import pdb</span> <span class="c1">#import pdb</span>
<span class="c1">#pdb.set_trace()</span> <span class="c1">#pdb.set_trace()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">MuteWait</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mAgentMuteBool</span><span class="o">=</span><span class="kc">True</span>
<span class="n">lActivityItemStart</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">ProcessorActivityItemCreate</span><span class="p">(</span><span class="n">inDef</span><span class="o">=</span><span class="s2">&quot;OSCMD&quot;</span><span class="p">,</span> <span class="n">lActivityItemStart</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">ProcessorActivityItemCreate</span><span class="p">(</span><span class="n">inDef</span><span class="o">=</span><span class="s2">&quot;OSCMD&quot;</span><span class="p">,</span>
<span class="n">inArgDict</span><span class="o">=</span><span class="p">{</span><span class="s2">&quot;inCMDStr&quot;</span><span class="p">:</span><span class="n">lCMDStr</span><span class="p">,</span><span class="s2">&quot;inSendOutputToOrchestratorLogsBool&quot;</span><span class="p">:</span><span class="kc">False</span><span class="p">},</span> <span class="n">inArgDict</span><span class="o">=</span><span class="p">{</span><span class="s2">&quot;inCMDStr&quot;</span><span class="p">:</span><span class="n">lCMDStr</span><span class="p">,</span><span class="s2">&quot;inSendOutputToOrchestratorLogsBool&quot;</span><span class="p">:</span><span class="kc">False</span><span class="p">},</span>
<span class="n">inArgGSettingsStr</span><span class="o">=</span><span class="s2">&quot;inGSettings&quot;</span><span class="p">)</span> <span class="n">inArgGSettingsStr</span><span class="o">=</span><span class="s2">&quot;inGSettings&quot;</span><span class="p">)</span>
@ -257,6 +350,18 @@
<span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;4_STARTED&quot;</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;4_STARTED&quot;</span>
<span class="c1"># Log info about process</span> <span class="c1"># Log info about process</span>
<span class="bp">self</span><span class="o">.</span><span class="n">StatusChangeLog</span><span class="p">()</span> <span class="bp">self</span><span class="o">.</span><span class="n">StatusChangeLog</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mAgentMuteBool</span> <span class="o">=</span> <span class="kc">False</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
<div class="viewcode-block" id="Process.StartCheck"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StartCheck">[docs]</a> <span class="k">def</span> <span class="nf">StartCheck</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Start program if auto stopped (0_STOPPED).</span>
<span class="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>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">MuteWait</span><span class="p">()</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">==</span> <span class="s2">&quot;0_STOPPED&quot;</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">Start</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
<div class="viewcode-block" id="Process.StopSafe"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StopSafe">[docs]</a> <span class="k">def</span> <span class="nf">StopSafe</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inIsManualBool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span> <div class="viewcode-block" id="Process.StopSafe"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StopSafe">[docs]</a> <span class="k">def</span> <span class="nf">StopSafe</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inIsManualBool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
@ -265,20 +370,63 @@
<span class="sd"> Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto</span> <span class="sd"> Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto</span>
<span class="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> <span class="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>
<span class="sd"> :return:</span> <span class="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>
<span class="sd"> &quot;&quot;&quot;</span> <span class="sd"> &quot;&quot;&quot;</span>
<span class="k">pass</span></div> <span class="bp">self</span><span class="o">.</span><span class="n">MuteWait</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mAgentMuteBool</span><span class="o">=</span><span class="kc">True</span>
<span class="c1"># Send activity item to agent - wait result</span>
<span class="n">lCMDStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s1">&#39;taskkill /im &quot;</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mProcessNameWOExeStr</span><span class="si">}</span><span class="s1">.exe&quot; /fi &quot;username eq %USERNAME%&quot;&#39;</span>
<span class="n">lActivityItemStart</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">ProcessorActivityItemCreate</span><span class="p">(</span>
<span class="n">inDef</span><span class="o">=</span><span class="s2">&quot;OSCMD&quot;</span><span class="p">,</span><span class="n">inArgDict</span><span class="o">=</span><span class="p">{</span><span class="s2">&quot;inCMDStr&quot;</span><span class="p">:</span> <span class="n">lCMDStr</span><span class="p">,</span><span class="s2">&quot;inSendOutputToOrchestratorLogsBool&quot;</span><span class="p">:</span><span class="kc">False</span><span class="p">},</span><span class="n">inArgGSettingsStr</span><span class="o">=</span><span class="s2">&quot;inGSettings&quot;</span><span class="p">)</span>
<span class="n">lGUIDStr</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">AgentActivityItemAdd</span><span class="p">(</span><span class="n">inHostNameStr</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentHostNameStr</span><span class="p">,</span>
<span class="n">inUserStr</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentUserNameStr</span><span class="p">,</span>
<span class="n">inActivityItemDict</span><span class="o">=</span><span class="n">lActivityItemStart</span><span class="p">)</span>
<span class="n">lStartResult</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">AgentActivityItemReturnGet</span><span class="p">(</span><span class="n">inGUIDStr</span><span class="o">=</span><span class="n">lGUIDStr</span><span class="p">)</span>
<span class="k">if</span> <span class="n">inIsManualBool</span><span class="o">==</span><span class="kc">True</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;3_STOP_SAFE_MANUAL&quot;</span>
<span class="k">else</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;2_STOP_SAFE&quot;</span>
<span class="c1"># Log info about process</span>
<span class="bp">self</span><span class="o">.</span><span class="n">StatusChangeLog</span><span class="p">()</span>
<span class="c1"># Interval check is stopped</span>
<span class="n">lTimeStartFloat</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span>
<span class="n">lIntervalCheckSafeStatusFLoat</span> <span class="o">=</span> <span class="mf">15.0</span>
<span class="k">while</span> <span class="s2">&quot;SAFE&quot;</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="ow">and</span> <span class="p">(</span><span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span> <span class="o">-</span> <span class="n">lTimeStartFloat</span><span class="p">)</span> <span class="o">&lt;</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStopSafeTimeoutSecFloat</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">StatusCheck</span><span class="p">()</span>
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="n">lIntervalCheckSafeStatusFLoat</span><span class="p">)</span>
<span class="k">if</span> <span class="s2">&quot;SAFE&quot;</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span><span class="p">:</span>
<span class="c1"># Log info about process</span>
<span class="n">lL</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">OrchestratorLoggerGet</span><span class="p">()</span>
<span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Managers.Process (</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentHostNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentUserNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mProcessNameWOExeStr</span><span class="si">}</span><span class="s2">): Safe stop has been wait for </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mStopSafeTimeoutSecFloat</span><span class="si">}</span><span class="s2"> sec. Now do the force stop.&quot;</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">StopForce</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="n">inIsManualBool</span><span class="p">)</span>
<span class="c1"># Log info about process</span>
<span class="bp">self</span><span class="o">.</span><span class="n">StatusChangeLog</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mAgentMuteBool</span><span class="o">=</span><span class="kc">False</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
<div class="viewcode-block" id="Process.StopSafeCheck"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StopSafeCheck">[docs]</a> <span class="k">def</span> <span class="nf">StopSafeCheck</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Stop safe program if auto started (4_STARTED).</span>
<span class="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>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">MuteWait</span><span class="p">()</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">==</span> <span class="s2">&quot;4_STARTED&quot;</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">StopSafe</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
<div class="viewcode-block" id="Process.StopForce"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StopForce">[docs]</a> <span class="k">def</span> <span class="nf">StopForce</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inIsManualBool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span> <div class="viewcode-block" id="Process.StopForce"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StopForce">[docs]</a> <span class="k">def</span> <span class="nf">StopForce</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inIsManualBool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span> <span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Manual/Auto stop force. Force stop dont wait process termination - it just terminate process now.</span> <span class="sd"> Manual/Auto stop force. Force stop don&#39;t wait process termination - it just terminate process now.</span>
<span class="sd"> Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto</span> <span class="sd"> Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto</span>
<span class="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> <span class="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>
<span class="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> <span class="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>
<span class="sd"> &quot;&quot;&quot;</span> <span class="sd"> &quot;&quot;&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">MuteWait</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mAgentMuteBool</span><span class="o">=</span><span class="kc">True</span>
<span class="c1"># Send activity item to agent - wait result</span> <span class="c1"># Send activity item to agent - wait result</span>
<span class="n">lCMDStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s1">&#39;taskkill /im &quot;</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mProcessNameWOExeStr</span><span class="si">}</span><span class="s1">.exe&quot; /fi &quot;username eq %USERNAME%&quot;&#39;</span> <span class="n">lCMDStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s1">&#39;taskkill /F /im &quot;</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mProcessNameWOExeStr</span><span class="si">}</span><span class="s1">.exe&quot; /fi &quot;username eq %USERNAME%&quot;&#39;</span>
<span class="n">lActivityItemStart</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">ProcessorActivityItemCreate</span><span class="p">(</span> <span class="n">lActivityItemStart</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">ProcessorActivityItemCreate</span><span class="p">(</span>
<span class="n">inDef</span><span class="o">=</span><span class="s2">&quot;OSCMD&quot;</span><span class="p">,</span><span class="n">inArgDict</span><span class="o">=</span><span class="p">{</span><span class="s2">&quot;inCMDStr&quot;</span><span class="p">:</span> <span class="n">lCMDStr</span><span class="p">,</span><span class="s2">&quot;inSendOutputToOrchestratorLogsBool&quot;</span><span class="p">:</span><span class="kc">False</span><span class="p">},</span><span class="n">inArgGSettingsStr</span><span class="o">=</span><span class="s2">&quot;inGSettings&quot;</span><span class="p">)</span> <span class="n">inDef</span><span class="o">=</span><span class="s2">&quot;OSCMD&quot;</span><span class="p">,</span><span class="n">inArgDict</span><span class="o">=</span><span class="p">{</span><span class="s2">&quot;inCMDStr&quot;</span><span class="p">:</span> <span class="n">lCMDStr</span><span class="p">,</span><span class="s2">&quot;inSendOutputToOrchestratorLogsBool&quot;</span><span class="p">:</span><span class="kc">False</span><span class="p">},</span><span class="n">inArgGSettingsStr</span><span class="o">=</span><span class="s2">&quot;inGSettings&quot;</span><span class="p">)</span>
<span class="n">lGUIDStr</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">AgentActivityItemAdd</span><span class="p">(</span><span class="n">inHostNameStr</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentHostNameStr</span><span class="p">,</span> <span class="n">lGUIDStr</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">AgentActivityItemAdd</span><span class="p">(</span><span class="n">inHostNameStr</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentHostNameStr</span><span class="p">,</span>
@ -291,6 +439,18 @@
<span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;0_STOPPED&quot;</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;0_STOPPED&quot;</span>
<span class="c1"># Log info about process</span> <span class="c1"># Log info about process</span>
<span class="bp">self</span><span class="o">.</span><span class="n">StatusChangeLog</span><span class="p">()</span> <span class="bp">self</span><span class="o">.</span><span class="n">StatusChangeLog</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mAgentMuteBool</span><span class="o">=</span><span class="kc">False</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
<div class="viewcode-block" id="Process.StopForceCheck"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StopForceCheck">[docs]</a> <span class="k">def</span> <span class="nf">StopForceCheck</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Stop force program if auto started (4_STARTED).</span>
<span class="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>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">MuteWait</span><span class="p">()</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">==</span> <span class="s2">&quot;4_STARTED&quot;</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">StopForce</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
<div class="viewcode-block" id="Process.RestartSafe"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.RestartSafe">[docs]</a> <span class="k">def</span> <span class="nf">RestartSafe</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inIsManualBool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">):</span> <div class="viewcode-block" id="Process.RestartSafe"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.RestartSafe">[docs]</a> <span class="k">def</span> <span class="nf">RestartSafe</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inIsManualBool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">):</span>
@ -299,9 +459,10 @@
<span class="sd"> Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto</span> <span class="sd"> Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto</span>
<span class="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> <span class="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>
<span class="sd"> :return:</span> <span class="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>
<span class="sd"> &quot;&quot;&quot;</span> <span class="sd"> &quot;&quot;&quot;</span>
<span class="k">pass</span></div> <span class="bp">self</span><span class="o">.</span><span class="n">StopSafe</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="n">inIsManualBool</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">Start</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="n">inIsManualBool</span><span class="p">)</span></div>
<div class="viewcode-block" id="Process.RestartForce"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.RestartForce">[docs]</a> <span class="k">def</span> <span class="nf">RestartForce</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inIsManualBool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">):</span> <div class="viewcode-block" id="Process.RestartForce"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.RestartForce">[docs]</a> <span class="k">def</span> <span class="nf">RestartForce</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inIsManualBool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span> <span class="sd">&quot;&quot;&quot;</span>
@ -309,9 +470,10 @@
<span class="sd"> Manual restart will block scheduling execution. To return schedule execution use def Manual2Auto</span> <span class="sd"> Manual restart will block scheduling execution. To return schedule execution use def Manual2Auto</span>
<span class="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> <span class="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>
<span class="sd"> :return:</span> <span class="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>
<span class="sd"> &quot;&quot;&quot;</span> <span class="sd"> &quot;&quot;&quot;</span>
<span class="k">pass</span></div> <span class="bp">self</span><span class="o">.</span><span class="n">StopForce</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="n">inIsManualBool</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">Start</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="n">inIsManualBool</span><span class="p">)</span></div>
<div class="viewcode-block" id="Process.StatusChangeLog"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusChangeLog">[docs]</a> <span class="k">def</span> <span class="nf">StatusChangeLog</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span> <div class="viewcode-block" id="Process.StatusChangeLog"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusChangeLog">[docs]</a> <span class="k">def</span> <span class="nf">StatusChangeLog</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span> <span class="sd">&quot;&quot;&quot;</span>
@ -333,6 +495,8 @@
<span class="c1"># Send activity item to agent - wait result</span> <span class="c1"># Send activity item to agent - wait result</span>
<span class="n">lLogBool</span> <span class="o">=</span> <span class="kc">False</span> <span class="n">lLogBool</span> <span class="o">=</span> <span class="kc">False</span>
<span class="n">lActivityItemUserProcessList</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">ProcessorActivityItemCreate</span><span class="p">(</span><span class="n">inDef</span><span class="o">=</span><span class="s2">&quot;ProcessWOExeUpperUserListGet&quot;</span><span class="p">)</span> <span class="n">lActivityItemUserProcessList</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">ProcessorActivityItemCreate</span><span class="p">(</span><span class="n">inDef</span><span class="o">=</span><span class="s2">&quot;ProcessWOExeUpperUserListGet&quot;</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">MuteWait</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mAgentMuteBool</span><span class="o">=</span><span class="kc">True</span>
<span class="n">lGUIDStr</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">AgentActivityItemAdd</span><span class="p">(</span><span class="n">inHostNameStr</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentHostNameStr</span><span class="p">,</span><span class="n">inUserStr</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentUserNameStr</span><span class="p">,</span><span class="n">inActivityItemDict</span><span class="o">=</span><span class="n">lActivityItemUserProcessList</span><span class="p">)</span> <span class="n">lGUIDStr</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">AgentActivityItemAdd</span><span class="p">(</span><span class="n">inHostNameStr</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentHostNameStr</span><span class="p">,</span><span class="n">inUserStr</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentUserNameStr</span><span class="p">,</span><span class="n">inActivityItemDict</span><span class="o">=</span><span class="n">lActivityItemUserProcessList</span><span class="p">)</span>
<span class="n">lUserProcessList</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">AgentActivityItemReturnGet</span><span class="p">(</span><span class="n">inGUIDStr</span><span class="o">=</span><span class="n">lGUIDStr</span><span class="p">)</span> <span class="n">lUserProcessList</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">AgentActivityItemReturnGet</span><span class="p">(</span><span class="n">inGUIDStr</span><span class="o">=</span><span class="n">lGUIDStr</span><span class="p">)</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mProcessNameWOExeStr</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> <span class="ow">in</span> <span class="n">lUserProcessList</span><span class="p">:</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mProcessNameWOExeStr</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> <span class="ow">in</span> <span class="n">lUserProcessList</span><span class="p">:</span>
@ -340,27 +504,35 @@
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">==</span> <span class="s2">&quot;0_STOPPED&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;4_STARTED&quot;</span><span class="p">;</span> <span class="n">lLogBool</span><span class="o">=</span><span class="kc">True</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">==</span> <span class="s2">&quot;0_STOPPED&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;4_STARTED&quot;</span><span class="p">;</span> <span class="n">lLogBool</span><span class="o">=</span><span class="kc">True</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;4_STARTED&quot;</span><span class="p">;</span> <span class="n">lLogBool</span><span class="o">=</span><span class="kc">True</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;4_STARTED&quot;</span><span class="p">;</span> <span class="n">lLogBool</span><span class="o">=</span><span class="kc">True</span>
<span class="k">else</span><span class="p">:</span> <span class="k">else</span><span class="p">:</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">==</span> <span class="s2">&quot;2_STOP_SAFE&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;0_STOPPED&quot;</span><span class="p">;</span> <span class="n">lLogBool</span> <span class="o">=</span> <span class="kc">True</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">==</span> <span class="s2">&quot;3_STOP_SAFE_MANUAL&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;1_STOPPED_MANUAL&quot;</span><span class="p">;</span> <span class="n">lLogBool</span> <span class="o">=</span> <span class="kc">True</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">==</span> <span class="s2">&quot;5_STARTED_MANUAL&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;1_STOPPED_MANUAL&quot;</span><span class="p">;</span> <span class="n">lLogBool</span><span class="o">=</span><span class="kc">True</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">==</span> <span class="s2">&quot;5_STARTED_MANUAL&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;1_STOPPED_MANUAL&quot;</span><span class="p">;</span> <span class="n">lLogBool</span><span class="o">=</span><span class="kc">True</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">==</span> <span class="s2">&quot;4_STARTED&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;0_STOPPED&quot;</span><span class="p">;</span> <span class="n">lLogBool</span><span class="o">=</span><span class="kc">True</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">==</span> <span class="s2">&quot;4_STARTED&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;0_STOPPED&quot;</span><span class="p">;</span> <span class="n">lLogBool</span><span class="o">=</span><span class="kc">True</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;0_STOPPED&quot;</span><span class="p">;</span> <span class="n">lLogBool</span><span class="o">=</span><span class="kc">True</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">&quot;0_STOPPED&quot;</span><span class="p">;</span> <span class="n">lLogBool</span><span class="o">=</span><span class="kc">True</span>
<span class="c1"># Log info about process</span> <span class="c1"># Log info about process</span>
<span class="k">if</span> <span class="n">lLogBool</span> <span class="o">==</span> <span class="kc">True</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">StatusChangeLog</span><span class="p">()</span> <span class="k">if</span> <span class="n">lLogBool</span> <span class="o">==</span> <span class="kc">True</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">StatusChangeLog</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mAgentMuteBool</span> <span class="o">=</span> <span class="kc">False</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
<div class="viewcode-block" id="Process.StatusCheckStart"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusCheckStart">[docs]</a> <span class="k">def</span> <span class="nf">StatusCheckStart</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span> <div class="viewcode-block" id="Process.StatusCheckStart"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusCheckStart">[docs]</a> <span class="k">def</span> <span class="nf">StatusCheckStart</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span> <span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Check process status and run it if auto stopped self.mStatusStr is &quot;0_STOPPED&quot;</span> <span class="sd"> Check process status and run it if auto stopped self.mStatusStr is &quot;0_STOPPED&quot;</span>
<span class="sd"> :return:</span> <span class="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>
<span class="sd"> &quot;&quot;&quot;</span> <span class="sd"> &quot;&quot;&quot;</span>
<span class="k">pass</span></div> <span class="n">lStatusStr</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">StatusCheck</span><span class="p">()</span>
<span class="k">if</span> <span class="n">lStatusStr</span> <span class="o">==</span> <span class="s2">&quot;0_STOPPED&quot;</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">Start</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
<div class="viewcode-block" id="Process.StatusCheckStopForce"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusCheckStopForce">[docs]</a> <span class="k">def</span> <span class="nf">StatusCheckStopForce</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span> <div class="viewcode-block" id="Process.StatusCheckStopForce"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusCheckStopForce">[docs]</a> <span class="k">def</span> <span class="nf">StatusCheckStopForce</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span> <span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Check process status and auto stop force it if self.mStatusStr is 4_STARTED</span> <span class="sd"> Check process status and auto stop force it if self.mStatusStr is 4_STARTED</span>
<span class="sd"> :return:</span> <span class="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>
<span class="sd"> &quot;&quot;&quot;</span> <span class="sd"> &quot;&quot;&quot;</span>
<span class="k">pass</span></div> <span class="n">lStatusStr</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">StatusCheck</span><span class="p">()</span>
<span class="k">if</span> <span class="n">lStatusStr</span> <span class="o">==</span> <span class="s2">&quot;4_STARTED&quot;</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">StopForce</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
<div class="viewcode-block" id="Process.StatusCheckStopSafe"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusCheckStopSafe">[docs]</a> <span class="k">def</span> <span class="nf">StatusCheckStopSafe</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span> <div class="viewcode-block" id="Process.StatusCheckStopSafe"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusCheckStopSafe">[docs]</a> <span class="k">def</span> <span class="nf">StatusCheckStopSafe</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span> <span class="sd">&quot;&quot;&quot;</span>
@ -368,16 +540,20 @@
<span class="sd"> :return:</span> <span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span> <span class="sd"> &quot;&quot;&quot;</span>
<span class="k">pass</span></div> <span class="n">lStatusStr</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">StatusCheck</span><span class="p">()</span>
<span class="k">if</span> <span class="n">lStatusStr</span> <span class="o">==</span> <span class="s2">&quot;4_STARTED&quot;</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">StopSafe</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
<div class="viewcode-block" id="Process.ScheduleWeekDay"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.ScheduleWeekDay">[docs]</a> <span class="k">def</span> <span class="nf">ScheduleWeekDay</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span> <div class="viewcode-block" id="Process.ScheduleStatusCheckEverySeconds"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.ScheduleStatusCheckEverySeconds">[docs]</a> <span class="k">def</span> <span class="nf">ScheduleStatusCheckEverySeconds</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">inIntervalSecondsInt</span><span class="o">=</span><span class="mi">120</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span> <span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Some template def to work with schedule package. Configure schedule to start. Stop process in auto mode in all sele.</span> <span class="sd"> Run status check every interval in second you specify.</span>
<span class="sd"> :return:</span> <span class="sd"> :param inIntervalSecondsInt: Interval in seconds. Default is 120</span>
<span class="sd"> :return: None</span>
<span class="sd"> &quot;&quot;&quot;</span> <span class="sd"> &quot;&quot;&quot;</span>
<span class="k">pass</span></div></div> <span class="c1"># Check job in threaded way</span>
<span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">OrchestratorScheduleGet</span><span class="p">()</span><span class="o">.</span><span class="n">every</span><span class="p">(</span><span class="n">inIntervalSecondsInt</span><span class="p">)</span><span class="o">.</span><span class="n">seconds</span><span class="o">.</span><span class="n">do</span><span class="p">(</span><span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">OrchestratorThreadStart</span><span class="p">,</span><span class="bp">self</span><span class="o">.</span><span class="n">StatusCheck</span><span class="p">)</span></div></div>
<div class="viewcode-block" id="ProcessGet"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessGet">[docs]</a><span class="k">def</span> <span class="nf">ProcessGet</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inProcessNameWOExeStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Process</span><span class="p">:</span> <div class="viewcode-block" id="ProcessGet"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessGet">[docs]</a><span class="k">def</span> <span class="nf">ProcessGet</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inProcessNameWOExeStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Process</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span> <span class="sd">&quot;&quot;&quot;</span>
@ -519,6 +695,35 @@
<span class="n">lProcess</span> <span class="o">=</span> <span class="n">ProcessGet</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="o">=</span><span class="n">inAgentHostNameStr</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="o">=</span><span class="n">inAgentUserNameStr</span><span class="p">,</span> <span class="n">lProcess</span> <span class="o">=</span> <span class="n">ProcessGet</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="o">=</span><span class="n">inAgentHostNameStr</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="o">=</span><span class="n">inAgentUserNameStr</span><span class="p">,</span>
<span class="n">inProcessNameWOExeStr</span><span class="o">=</span><span class="n">inProcessNameWOExeStr</span><span class="p">)</span> <span class="n">inProcessNameWOExeStr</span><span class="o">=</span><span class="n">inProcessNameWOExeStr</span><span class="p">)</span>
<span class="k">if</span> <span class="n">lProcess</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="k">return</span> <span class="n">lProcess</span><span class="o">.</span><span class="n">Manual2Auto</span><span class="p">()</span></div> <span class="k">if</span> <span class="n">lProcess</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="k">return</span> <span class="n">lProcess</span><span class="o">.</span><span class="n">Manual2Auto</span><span class="p">()</span></div>
<div class="viewcode-block" id="ProcessManualStopTriggerSet"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessManualStopTriggerSet">[docs]</a><span class="k">def</span> <span class="nf">ProcessManualStopTriggerSet</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inProcessNameWOExeStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inMSTdTSecFloat</span><span class="p">:</span> <span class="nb">float</span><span class="p">,</span> <span class="n">inMSTdNInt</span><span class="p">:</span> <span class="nb">int</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):</span>
<span class="sd"> :param inAgentHostNameStr: Agent hostname in any case. Required to identify Process</span>
<span class="sd"> :param inAgentUserNameStr: Agent user name in any case. Required to identify Process</span>
<span class="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>
<span class="sd"> :param inMSTdTSecFloat: Time periods in seconds</span>
<span class="sd"> :param inMSTdNInt: Counts of the start tries</span>
<span class="sd"> :return: None</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lProcess</span> <span class="o">=</span> <span class="n">ProcessGet</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="o">=</span><span class="n">inAgentHostNameStr</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="o">=</span><span class="n">inAgentUserNameStr</span><span class="p">,</span>
<span class="n">inProcessNameWOExeStr</span><span class="o">=</span><span class="n">inProcessNameWOExeStr</span><span class="p">)</span>
<span class="k">if</span> <span class="n">lProcess</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="n">lProcess</span><span class="o">.</span><span class="n">ManualStopTriggerSet</span><span class="p">(</span><span class="n">inMSTdTSecFloat</span> <span class="o">=</span> <span class="n">inMSTdTSecFloat</span><span class="p">,</span> <span class="n">inMSTdNInt</span> <span class="o">=</span> <span class="n">inMSTdNInt</span><span class="p">)</span></div>
<div class="viewcode-block" id="ProcessManualStopListClear"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessManualStopListClear">[docs]</a><span class="k">def</span> <span class="nf">ProcessManualStopListClear</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inProcessNameWOExeStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Clear the last start tries list.</span>
<span class="sd"> :param inAgentHostNameStr: Agent hostname in any case. Required to identify Process</span>
<span class="sd"> :param inAgentUserNameStr: Agent user name in any case. Required to identify Process</span>
<span class="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>
<span class="sd"> :return: None</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lProcess</span> <span class="o">=</span> <span class="n">ProcessGet</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="o">=</span><span class="n">inAgentHostNameStr</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="o">=</span><span class="n">inAgentUserNameStr</span><span class="p">,</span>
<span class="n">inProcessNameWOExeStr</span><span class="o">=</span><span class="n">inProcessNameWOExeStr</span><span class="p">)</span>
<span class="k">if</span> <span class="n">lProcess</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="n">lProcess</span><span class="o">.</span><span class="n">ManualStopListClear</span><span class="p">()</span></div>
</pre></div> </pre></div>
</div> </div>

@ -115,6 +115,10 @@
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../Agent/02_Defs.html">2. Defs</a></li> <li class="toctree-l1"><a class="reference internal" href="../../../../Agent/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">TOOLS</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>

@ -115,6 +115,10 @@
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="../../../Agent/02_Defs.html">2. Defs</a></li> <li class="toctree-l1"><a class="reference internal" href="../../../Agent/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">TOOLS</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>
@ -183,6 +187,7 @@
<span></span><span class="kn">import</span> <span class="nn">subprocess</span><span class="o">,</span> <span class="nn">json</span><span class="o">,</span> <span class="nn">psutil</span><span class="o">,</span> <span class="nn">time</span><span class="o">,</span> <span class="nn">os</span><span class="o">,</span> <span class="nn">win32security</span><span class="o">,</span> <span class="nn">sys</span><span class="o">,</span> <span class="nn">base64</span><span class="o">,</span> <span class="nn">logging</span><span class="o">,</span> <span class="nn">ctypes</span><span class="o">,</span> <span class="nn">copy</span> <span class="c1">#Get input argument</span> <span></span><span class="kn">import</span> <span class="nn">subprocess</span><span class="o">,</span> <span class="nn">json</span><span class="o">,</span> <span class="nn">psutil</span><span class="o">,</span> <span class="nn">time</span><span class="o">,</span> <span class="nn">os</span><span class="o">,</span> <span class="nn">win32security</span><span class="o">,</span> <span class="nn">sys</span><span class="o">,</span> <span class="nn">base64</span><span class="o">,</span> <span class="nn">logging</span><span class="o">,</span> <span class="nn">ctypes</span><span class="o">,</span> <span class="nn">copy</span> <span class="c1">#Get input argument</span>
<span class="kn">import</span> <span class="nn">pickle</span> <span class="kn">import</span> <span class="nn">pickle</span>
<span class="kn">import</span> <span class="nn">inspect</span> <span class="kn">import</span> <span class="nn">inspect</span>
<span class="kn">import</span> <span class="nn">schedule</span>
<span class="kn">from</span> <span class="nn">partd</span> <span class="kn">import</span> <span class="n">Server</span> <span class="kn">from</span> <span class="nn">partd</span> <span class="kn">import</span> <span class="n">Server</span>
<span class="kn">from</span> <span class="nn">.</span> <span class="kn">import</span> <span class="n">Server</span> <span class="kn">from</span> <span class="nn">.</span> <span class="kn">import</span> <span class="n">Server</span>
@ -329,6 +334,23 @@
<span class="c1">#Send item in AgentDict for the futher data transmition</span> <span class="c1">#Send item in AgentDict for the futher data transmition</span>
<span class="k">return</span> <span class="n">AgentActivityItemAdd</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inHostNameStr</span><span class="o">=</span><span class="n">inHostNameStr</span><span class="p">,</span> <span class="n">inUserStr</span><span class="o">=</span><span class="n">inUserStr</span><span class="p">,</span> <span class="n">inActivityItemDict</span><span class="o">=</span><span class="n">lActivityItemDict</span><span class="p">)</span></div> <span class="k">return</span> <span class="n">AgentActivityItemAdd</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inHostNameStr</span><span class="o">=</span><span class="n">inHostNameStr</span><span class="p">,</span> <span class="n">inUserStr</span><span class="o">=</span><span class="n">inUserStr</span><span class="p">,</span> <span class="n">inActivityItemDict</span><span class="o">=</span><span class="n">lActivityItemDict</span><span class="p">)</span></div>
<div class="viewcode-block" id="AgentOSLogoff"><a class="viewcode-back" href="../../../Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSLogoff">[docs]</a><span class="k">def</span> <span class="nf">AgentOSLogoff</span><span class="p">(</span><span class="n">inHostNameStr</span><span class="p">,</span> <span class="n">inUserStr</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Logoff the agent user session</span>
<span class="sd"> :return: GUID String of the ActivityItem - you can wait (sync or async) result by this guid!</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">inGSettings</span> <span class="o">=</span> <span class="n">GSettingsGet</span><span class="p">()</span> <span class="c1"># Set the global settings</span>
<span class="n">lCMDStr</span> <span class="o">=</span> <span class="s2">&quot;shutdown /l&quot;</span>
<span class="n">lActivityItemDict</span> <span class="o">=</span> <span class="p">{</span>
<span class="s2">&quot;Def&quot;</span><span class="p">:</span><span class="s2">&quot;OSCMD&quot;</span><span class="p">,</span> <span class="c1"># def alias (look pyOpeRPA.Agent gSettings[&quot;ProcessorDict&quot;][&quot;AliasDefDict&quot;])</span>
<span class="s2">&quot;ArgList&quot;</span><span class="p">:[],</span> <span class="c1"># Args list</span>
<span class="s2">&quot;ArgDict&quot;</span><span class="p">:{</span><span class="s2">&quot;inCMDStr&quot;</span><span class="p">:</span><span class="n">lCMDStr</span><span class="p">,</span><span class="s2">&quot;inRunAsyncBool&quot;</span><span class="p">:</span><span class="kc">False</span><span class="p">,</span> <span class="s2">&quot;inSendOutputToOrchestratorLogsBool&quot;</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span> <span class="s2">&quot;inCMDEncodingStr&quot;</span><span class="p">:</span> <span class="s2">&quot;cp1251&quot;</span><span class="p">},</span> <span class="c1"># Args dictionary</span>
<span class="s2">&quot;ArgGSettings&quot;</span><span class="p">:</span> <span class="s2">&quot;inGSettings&quot;</span><span class="p">,</span> <span class="c1"># Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<span class="s2">&quot;ArgLogger&quot;</span><span class="p">:</span> <span class="kc">None</span> <span class="c1"># Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<span class="p">}</span>
<span class="c1">#Send item in AgentDict for the futher data transmition</span>
<span class="k">return</span> <span class="n">AgentActivityItemAdd</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inHostNameStr</span><span class="o">=</span><span class="n">inHostNameStr</span><span class="p">,</span> <span class="n">inUserStr</span><span class="o">=</span><span class="n">inUserStr</span><span class="p">,</span> <span class="n">inActivityItemDict</span><span class="o">=</span><span class="n">lActivityItemDict</span><span class="p">)</span></div>
<div class="viewcode-block" id="AgentOSFileSend"><a class="viewcode-back" href="../../../Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSFileSend">[docs]</a><span class="k">def</span> <span class="nf">AgentOSFileSend</span><span class="p">(</span><span class="n">inHostNameStr</span><span class="p">,</span> <span class="n">inUserStr</span><span class="p">,</span> <span class="n">inOrchestratorFilePathStr</span><span class="p">,</span> <span class="n">inAgentFilePathStr</span><span class="p">,</span> <span class="n">inGSettings</span> <span class="o">=</span> <span class="kc">None</span><span class="p">):</span> <div class="viewcode-block" id="AgentOSFileSend"><a class="viewcode-back" href="../../../Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSFileSend">[docs]</a><span class="k">def</span> <span class="nf">AgentOSFileSend</span><span class="p">(</span><span class="n">inHostNameStr</span><span class="p">,</span> <span class="n">inUserStr</span><span class="p">,</span> <span class="n">inOrchestratorFilePathStr</span><span class="p">,</span> <span class="n">inAgentFilePathStr</span><span class="p">,</span> <span class="n">inGSettings</span> <span class="o">=</span> <span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span> <span class="sd">&quot;&quot;&quot;</span>
@ -554,6 +576,14 @@
<span class="k">return</span> <span class="n">AgentActivityItemAdd</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inHostNameStr</span><span class="o">=</span><span class="n">inHostNameStr</span><span class="p">,</span> <span class="n">inUserStr</span><span class="o">=</span><span class="n">inUserStr</span><span class="p">,</span> <span class="n">inActivityItemDict</span><span class="o">=</span><span class="n">lActivityItemDict</span><span class="p">)</span></div> <span class="k">return</span> <span class="n">AgentActivityItemAdd</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inHostNameStr</span><span class="o">=</span><span class="n">inHostNameStr</span><span class="p">,</span> <span class="n">inUserStr</span><span class="o">=</span><span class="n">inUserStr</span><span class="p">,</span> <span class="n">inActivityItemDict</span><span class="o">=</span><span class="n">lActivityItemDict</span><span class="p">)</span></div>
<span class="c1"># OS DEFS</span> <span class="c1"># OS DEFS</span>
<div class="viewcode-block" id="OSLogoff"><a class="viewcode-back" href="../../../Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OSLogoff">[docs]</a><span class="k">def</span> <span class="nf">OSLogoff</span><span class="p">():</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Logoff the current orchestrator session</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">os</span><span class="o">.</span><span class="n">system</span><span class="p">(</span><span class="s2">&quot;shutdown /l&quot;</span><span class="p">)</span></div>
<div class="viewcode-block" id="OSCredentialsVerify"><a class="viewcode-back" href="../../../Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OSCredentialsVerify">[docs]</a><span class="k">def</span> <span class="nf">OSCredentialsVerify</span><span class="p">(</span><span class="n">inUserStr</span><span class="p">,</span> <span class="n">inPasswordStr</span><span class="p">,</span> <span class="n">inDomainStr</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">):</span> <span class="c1">##</span> <div class="viewcode-block" id="OSCredentialsVerify"><a class="viewcode-back" href="../../../Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OSCredentialsVerify">[docs]</a><span class="k">def</span> <span class="nf">OSCredentialsVerify</span><span class="p">(</span><span class="n">inUserStr</span><span class="p">,</span> <span class="n">inPasswordStr</span><span class="p">,</span> <span class="n">inDomainStr</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">):</span> <span class="c1">##</span>
<span class="sd">&quot;&quot;&quot;</span> <span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Verify user credentials in windows. Return bool</span> <span class="sd"> Verify user credentials in windows. Return bool</span>
@ -653,6 +683,38 @@
<span class="sd"> &quot;&quot;&quot;</span> <span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="n">GSettingsGet</span><span class="p">()</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;Logger&quot;</span><span class="p">,</span><span class="kc">None</span><span class="p">)</span></div> <span class="k">return</span> <span class="n">GSettingsGet</span><span class="p">()</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;Logger&quot;</span><span class="p">,</span><span class="kc">None</span><span class="p">)</span></div>
<div class="viewcode-block" id="OrchestratorScheduleGet"><a class="viewcode-back" href="../../../Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorScheduleGet">[docs]</a><span class="k">def</span> <span class="nf">OrchestratorScheduleGet</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="n">schedule</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Get the schedule (schedule.readthedocs.io) from the Orchestrator</span>
<span class="sd"> Fro example you can use:</span>
<span class="sd"> .. code-block:: python</span>
<span class="sd"> # One schedule threaded</span>
<span class="sd"> Orchestrator.OrchestratorScheduleGet().every(5).seconds.do(lProcess.StatusCheckStart)</span>
<span class="sd"> #New schedule thread # See def description Orchestrator.OrchestratorThreadStart</span>
<span class="sd"> Orchestrator.OrchestratorScheduleGet().every(5).seconds.do(Orchestrator.OrchestratorThreadStart,lProcess.StatusCheckStart)</span>
<span class="sd"> :return: schedule module. Example see here https://schedule.readthedocs.io/en/stable/examples.html</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="n">GSettingsGet</span><span class="p">()</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;SchedulerDict&quot;</span><span class="p">,{})</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;Schedule&quot;</span><span class="p">,</span><span class="kc">None</span><span class="p">)</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">GSettingsGet</span><span class="p">()[</span><span class="s2">&quot;SchedulerDict&quot;</span><span class="p">][</span><span class="s2">&quot;Schedule&quot;</span><span class="p">]</span><span class="o">=</span><span class="n">schedule</span>
<span class="k">return</span> <span class="n">GSettingsGet</span><span class="p">()</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;SchedulerDict&quot;</span><span class="p">,{})</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;Schedule&quot;</span><span class="p">,</span><span class="kc">None</span><span class="p">)</span></div>
<div class="viewcode-block" id="OrchestratorThreadStart"><a class="viewcode-back" href="../../../Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorThreadStart">[docs]</a><span class="k">def</span> <span class="nf">OrchestratorThreadStart</span><span class="p">(</span><span class="n">inDef</span><span class="p">,</span> <span class="o">*</span><span class="n">inArgList</span><span class="p">,</span> <span class="o">**</span><span class="n">inArgDict</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Execute def in new thread and pass some args with list and dict types</span>
<span class="sd"> :param inDef: Python Def</span>
<span class="sd"> :param inArgList: args as list</span>
<span class="sd"> :param inArgDict: args as dict</span>
<span class="sd"> :return: threading.Thread object</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lDefThread</span> <span class="o">=</span> <span class="n">threading</span><span class="o">.</span><span class="n">Thread</span><span class="p">(</span><span class="n">target</span><span class="o">=</span><span class="n">inDef</span><span class="p">,</span><span class="n">args</span><span class="o">=</span><span class="n">inArgList</span><span class="p">,</span><span class="n">kwargs</span><span class="o">=</span><span class="n">inArgDict</span><span class="p">)</span>
<span class="n">lDefThread</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
<span class="k">return</span> <span class="n">lDefThread</span></div>
<div class="viewcode-block" id="OrchestratorIsAdmin"><a class="viewcode-back" href="../../../Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorIsAdmin">[docs]</a><span class="k">def</span> <span class="nf">OrchestratorIsAdmin</span><span class="p">():</span> <div class="viewcode-block" id="OrchestratorIsAdmin"><a class="viewcode-back" href="../../../Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorIsAdmin">[docs]</a><span class="k">def</span> <span class="nf">OrchestratorIsAdmin</span><span class="p">():</span>
<span class="sd">&quot;&quot;&quot;</span> <span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Check if Orchestrator process is running as administrator</span> <span class="sd"> Check if Orchestrator process is running as administrator</span>
@ -2744,9 +2806,6 @@
<span class="n">ActivityItemDefAliasModulesLoad</span><span class="p">()</span> <span class="n">ActivityItemDefAliasModulesLoad</span><span class="p">()</span>
<span class="c1">#Инициализация настроечных параметров</span> <span class="c1">#Инициализация настроечных параметров</span>
<span class="n">lDaemonLoopSeconds</span><span class="o">=</span><span class="n">gSettingsDict</span><span class="p">[</span><span class="s2">&quot;SchedulerDict&quot;</span><span class="p">][</span><span class="s2">&quot;CheckIntervalSecFloat&quot;</span><span class="p">]</span>
<span class="n">lDaemonActivityLogDict</span><span class="o">=</span><span class="p">{}</span> <span class="c1">#Словарь отработанных активностей, ключ - кортеж (&lt;activityType&gt;, &lt;datetime&gt;, &lt;processPath || processName&gt;, &lt;processArgs&gt;)</span>
<span class="n">lDaemonLastDateTime</span><span class="o">=</span><span class="n">datetime</span><span class="o">.</span><span class="n">datetime</span><span class="o">.</span><span class="n">now</span><span class="p">()</span>
<span class="n">gSettingsDict</span><span class="p">[</span><span class="s2">&quot;ServerDict&quot;</span><span class="p">][</span><span class="s2">&quot;WorkingDirectoryPathStr&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">getcwd</span><span class="p">()</span> <span class="c1"># Set working directory in g settings</span> <span class="n">gSettingsDict</span><span class="p">[</span><span class="s2">&quot;ServerDict&quot;</span><span class="p">][</span><span class="s2">&quot;WorkingDirectoryPathStr&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">getcwd</span><span class="p">()</span> <span class="c1"># Set working directory in g settings</span>
<span class="c1">#Инициализация сервера (инициализация всех интерфейсов)</span> <span class="c1">#Инициализация сервера (инициализация всех интерфейсов)</span>
@ -2797,69 +2856,97 @@
<span class="n">lProcessorMonitorThread</span><span class="o">.</span><span class="n">start</span><span class="p">()</span> <span class="c1"># Start the thread execution.</span> <span class="n">lProcessorMonitorThread</span><span class="o">.</span><span class="n">start</span><span class="p">()</span> <span class="c1"># Start the thread execution.</span>
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;Processor monitor has been started&quot;</span><span class="p">)</span> <span class="c1">#Logging</span> <span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;Processor monitor has been started&quot;</span><span class="p">)</span> <span class="c1">#Logging</span>
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;Scheduler loop start&quot;</span><span class="p">)</span> <span class="c1">#Logging</span> <span class="c1"># Scheduler loop</span>
<span class="n">gDaemonActivityLogDictRefreshSecInt</span> <span class="o">=</span> <span class="mi">10</span> <span class="c1"># The second period for clear lDaemonActivityLogDict from old items</span> <span class="n">lSchedulerThread</span> <span class="o">=</span> <span class="n">threading</span><span class="o">.</span><span class="n">Thread</span><span class="p">(</span><span class="n">target</span><span class="o">=</span> <span class="n">__deprecated_orchestrator_loop__</span><span class="p">)</span>
<span class="n">gDaemonActivityLogDictLastTime</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span> <span class="c1"># The second perioad for clean lDaemonActivityLogDict from old items</span> <span class="n">lSchedulerThread</span><span class="o">.</span><span class="n">daemon</span> <span class="o">=</span> <span class="kc">True</span> <span class="c1"># Run the thread in daemon mode.</span>
<span class="n">lSchedulerThread</span><span class="o">.</span><span class="n">start</span><span class="p">()</span> <span class="c1"># Start the thread execution.</span>
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;Scheduler (old) loop start&quot;</span><span class="p">)</span> <span class="c1">#Logging</span>
<span class="k">while</span> <span class="kc">True</span><span class="p">:</span>
<span class="k">try</span><span class="p">:</span> <span class="c1"># Schedule (new) loop</span>
<span class="n">lCurrentDateTime</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">datetime</span><span class="o">.</span><span class="n">now</span><span class="p">()</span> <span class="n">lScheduleThread</span> <span class="o">=</span> <span class="n">threading</span><span class="o">.</span><span class="n">Thread</span><span class="p">(</span><span class="n">target</span><span class="o">=</span> <span class="n">__schedule_loop__</span><span class="p">)</span>
<span class="c1">#Циклический обход правил</span> <span class="n">lScheduleThread</span><span class="o">.</span><span class="n">daemon</span> <span class="o">=</span> <span class="kc">True</span> <span class="c1"># Run the thread in daemon mode.</span>
<span class="n">lFlagSearchActivityType</span><span class="o">=</span><span class="kc">True</span> <span class="n">lScheduleThread</span><span class="o">.</span><span class="n">start</span><span class="p">()</span> <span class="c1"># Start the thread execution.</span>
<span class="c1"># Periodically clear the lDaemonActivityLogDict</span> <span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;Schedule module (new) loop start&quot;</span><span class="p">)</span> <span class="c1">#Logging</span></div>
<span class="k">if</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span><span class="o">-</span><span class="n">gDaemonActivityLogDictLastTime</span><span class="o">&gt;=</span><span class="n">gDaemonActivityLogDictRefreshSecInt</span><span class="p">:</span>
<span class="n">gDaemonActivityLogDictLastTime</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span> <span class="c1"># Update the time</span>
<span class="k">for</span> <span class="n">lIndex</span><span class="p">,</span> <span class="n">lItem</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">lDaemonActivityLogDict</span><span class="p">):</span> <span class="k">def</span> <span class="nf">__schedule_loop__</span><span class="p">():</span>
<span class="k">if</span> <span class="n">lItem</span><span class="p">[</span><span class="s2">&quot;ActivityEndDateTime&quot;</span><span class="p">]</span> <span class="ow">and</span> <span class="n">lCurrentDateTime</span><span class="o">&lt;=</span><span class="n">lItem</span><span class="p">[</span><span class="s2">&quot;ActivityEndDateTime&quot;</span><span class="p">]:</span> <span class="k">while</span> <span class="kc">True</span><span class="p">:</span>
<span class="k">pass</span> <span class="n">schedule</span><span class="o">.</span><span class="n">run_pending</span><span class="p">()</span>
<span class="c1"># Activity is actual - do not delete now</span> <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">3</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="c1"># remove the activity - not actual</span> <span class="c1"># Backward compatibility below to 1.2.7</span>
<span class="n">lDaemonActivityLogDict</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="n">lIndex</span><span class="p">,</span><span class="kc">None</span><span class="p">)</span> <span class="k">def</span> <span class="nf">__deprecated_orchestrator_loop__</span><span class="p">():</span>
<span class="n">lIterationLastDateTime</span> <span class="o">=</span> <span class="n">lDaemonLastDateTime</span> <span class="c1"># Get current datetime before iterator (need for iterate all activities in loop)</span> <span class="n">lL</span> <span class="o">=</span> <span class="n">OrchestratorLoggerGet</span><span class="p">()</span>
<span class="c1"># Iterate throught the activity list</span> <span class="n">inGSettings</span> <span class="o">=</span> <span class="n">GSettingsGet</span><span class="p">()</span>
<span class="k">for</span> <span class="n">lIndex</span><span class="p">,</span> <span class="n">lItem</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">gSettingsDict</span><span class="p">[</span><span class="s2">&quot;SchedulerDict&quot;</span><span class="p">][</span><span class="s2">&quot;ActivityTimeList&quot;</span><span class="p">]):</span> <span class="n">lDaemonLoopSeconds</span> <span class="o">=</span> <span class="n">gSettingsDict</span><span class="p">[</span><span class="s2">&quot;SchedulerDict&quot;</span><span class="p">][</span><span class="s2">&quot;CheckIntervalSecFloat&quot;</span><span class="p">]</span>
<span class="k">try</span><span class="p">:</span> <span class="n">lDaemonActivityLogDict</span> <span class="o">=</span> <span class="p">{}</span> <span class="c1"># Словарь отработанных активностей, ключ - кортеж (&lt;activityType&gt;, &lt;datetime&gt;, &lt;processPath || processName&gt;, &lt;processArgs&gt;)</span>
<span class="c1"># Prepare GUID of the activity</span> <span class="n">lDaemonLastDateTime</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">datetime</span><span class="o">.</span><span class="n">now</span><span class="p">()</span>
<span class="n">lGUID</span> <span class="o">=</span> <span class="kc">None</span> <span class="n">gDaemonActivityLogDictRefreshSecInt</span> <span class="o">=</span> <span class="mi">10</span> <span class="c1"># The second period for clear lDaemonActivityLogDict from old items</span>
<span class="k">if</span> <span class="s2">&quot;GUID&quot;</span> <span class="ow">in</span> <span class="n">lItem</span> <span class="ow">and</span> <span class="n">lItem</span><span class="p">[</span><span class="s2">&quot;GUID&quot;</span><span class="p">]:</span> <span class="n">gDaemonActivityLogDictLastTime</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span> <span class="c1"># The second perioad for clean lDaemonActivityLogDict from old items</span>
<span class="n">lGUID</span> <span class="o">=</span> <span class="n">lItem</span><span class="p">[</span><span class="s2">&quot;GUID&quot;</span><span class="p">]</span> <span class="k">while</span> <span class="kc">True</span><span class="p">:</span>
<span class="k">else</span><span class="p">:</span> <span class="k">try</span><span class="p">:</span>
<span class="n">lGUID</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">uuid</span><span class="o">.</span><span class="n">uuid4</span><span class="p">())</span> <span class="n">lCurrentDateTime</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">datetime</span><span class="o">.</span><span class="n">now</span><span class="p">()</span>
<span class="n">lItem</span><span class="p">[</span><span class="s2">&quot;GUID&quot;</span><span class="p">]</span><span class="o">=</span><span class="n">lGUID</span> <span class="c1"># Циклический обход правил</span>
<span class="n">lFlagSearchActivityType</span> <span class="o">=</span> <span class="kc">True</span>
<span class="c1">#Проверка дней недели, в рамках которых можно запускать активность</span> <span class="c1"># Periodically clear the lDaemonActivityLogDict</span>
<span class="n">lItemWeekdayList</span><span class="o">=</span><span class="n">lItem</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;WeekdayList&quot;</span><span class="p">,</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">6</span><span class="p">])</span> <span class="k">if</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span> <span class="o">-</span> <span class="n">gDaemonActivityLogDictLastTime</span> <span class="o">&gt;=</span> <span class="n">gDaemonActivityLogDictRefreshSecInt</span><span class="p">:</span>
<span class="k">if</span> <span class="n">lCurrentDateTime</span><span class="o">.</span><span class="n">weekday</span><span class="p">()</span> <span class="ow">in</span> <span class="n">lItemWeekdayList</span><span class="p">:</span> <span class="n">gDaemonActivityLogDictLastTime</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span> <span class="c1"># Update the time</span>
<span class="k">if</span> <span class="n">lFlagSearchActivityType</span><span class="p">:</span> <span class="k">for</span> <span class="n">lIndex</span><span class="p">,</span> <span class="n">lItem</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">lDaemonActivityLogDict</span><span class="p">):</span>
<span class="c1">#######################################################################</span> <span class="k">if</span> <span class="n">lItem</span><span class="p">[</span><span class="s2">&quot;ActivityEndDateTime&quot;</span><span class="p">]</span> <span class="ow">and</span> <span class="n">lCurrentDateTime</span> <span class="o">&lt;=</span> <span class="n">lItem</span><span class="p">[</span><span class="s2">&quot;ActivityEndDateTime&quot;</span><span class="p">]:</span>
<span class="c1">#Branch 1 - if has TimeHH:MM</span> <span class="k">pass</span>
<span class="c1">#######################################################################</span> <span class="c1"># Activity is actual - do not delete now</span>
<span class="k">if</span> <span class="s2">&quot;TimeHH:MMStr&quot;</span> <span class="ow">in</span> <span class="n">lItem</span><span class="p">:</span> <span class="k">else</span><span class="p">:</span>
<span class="c1">#Вид активности - запуск процесса</span> <span class="c1"># remove the activity - not actual</span>
<span class="c1">#Сформировать временной штамп, относительно которого надо будет проверять время</span> <span class="n">lDaemonActivityLogDict</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="n">lIndex</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
<span class="c1">#часовой пояс пока не учитываем</span> <span class="n">lIterationLastDateTime</span> <span class="o">=</span> <span class="n">lDaemonLastDateTime</span> <span class="c1"># Get current datetime before iterator (need for iterate all activities in loop)</span>
<span class="n">lActivityDateTime</span><span class="o">=</span><span class="n">datetime</span><span class="o">.</span><span class="n">datetime</span><span class="o">.</span><span class="n">strptime</span><span class="p">(</span><span class="n">lItem</span><span class="p">[</span><span class="s2">&quot;TimeHH:MMStr&quot;</span><span class="p">],</span><span class="s2">&quot;%H:%M&quot;</span><span class="p">)</span> <span class="c1"># Iterate throught the activity list</span>
<span class="n">lActivityDateTime</span><span class="o">=</span><span class="n">lActivityDateTime</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="n">year</span><span class="o">=</span><span class="n">lCurrentDateTime</span><span class="o">.</span><span class="n">year</span><span class="p">,</span><span class="n">month</span><span class="o">=</span><span class="n">lCurrentDateTime</span><span class="o">.</span><span class="n">month</span><span class="p">,</span><span class="n">day</span><span class="o">=</span><span class="n">lCurrentDateTime</span><span class="o">.</span><span class="n">day</span><span class="p">)</span> <span class="k">for</span> <span class="n">lIndex</span><span class="p">,</span> <span class="n">lItem</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">gSettingsDict</span><span class="p">[</span><span class="s2">&quot;SchedulerDict&quot;</span><span class="p">][</span><span class="s2">&quot;ActivityTimeList&quot;</span><span class="p">]):</span>
<span class="c1">#Убедиться в том, что время наступило</span> <span class="k">try</span><span class="p">:</span>
<span class="k">if</span> <span class="p">(</span> <span class="c1"># Prepare GUID of the activity</span>
<span class="n">lActivityDateTime</span><span class="o">&gt;=</span><span class="n">lDaemonLastDateTime</span> <span class="ow">and</span> <span class="n">lGUID</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">lCurrentDateTime</span><span class="o">&gt;=</span><span class="n">lActivityDateTime</span><span class="p">):</span> <span class="k">if</span> <span class="s2">&quot;GUID&quot;</span> <span class="ow">in</span> <span class="n">lItem</span> <span class="ow">and</span> <span class="n">lItem</span><span class="p">[</span><span class="s2">&quot;GUID&quot;</span><span class="p">]:</span>
<span class="c1"># Log info about activity</span> <span class="n">lGUID</span> <span class="o">=</span> <span class="n">lItem</span><span class="p">[</span><span class="s2">&quot;GUID&quot;</span><span class="p">]</span>
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Scheduler:: Activity list is started in new thread. Parameters are not available to see.&quot;</span><span class="p">)</span> <span class="c1">#Logging</span> <span class="k">else</span><span class="p">:</span>
<span class="c1"># Do the activity</span> <span class="n">lGUID</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">uuid</span><span class="o">.</span><span class="n">uuid4</span><span class="p">())</span>
<span class="n">lThread</span> <span class="o">=</span> <span class="n">threading</span><span class="o">.</span><span class="n">Thread</span><span class="p">(</span><span class="n">target</span><span class="o">=</span><span class="n">Processor</span><span class="o">.</span><span class="n">ActivityListExecute</span><span class="p">,</span> <span class="n">kwargs</span><span class="o">=</span><span class="p">{</span><span class="s2">&quot;inGSettings&quot;</span><span class="p">:</span> <span class="n">inGSettings</span><span class="p">,</span> <span class="s2">&quot;inActivityList&quot;</span><span class="p">:</span><span class="n">lItem</span><span class="p">[</span><span class="s2">&quot;ActivityList&quot;</span><span class="p">]})</span> <span class="n">lItem</span><span class="p">[</span><span class="s2">&quot;GUID&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">lGUID</span>
<span class="n">lThread</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
<span class="n">lIterationLastDateTime</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">datetime</span><span class="o">.</span><span class="n">now</span><span class="p">()</span> <span class="c1"># Set the new datetime for the new processor activity</span> <span class="c1"># Проверка дней недели, в рамках которых можно запускать активность</span>
<span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span> <span class="n">lItemWeekdayList</span> <span class="o">=</span> <span class="n">lItem</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;WeekdayList&quot;</span><span class="p">,</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">6</span><span class="p">])</span>
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">exception</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Scheduler: Exception has been catched in Scheduler module when activity time item was initialising. ActivityTimeItem is </span><span class="si">{</span><span class="n">lItem</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span> <span class="k">if</span> <span class="n">lCurrentDateTime</span><span class="o">.</span><span class="n">weekday</span><span class="p">()</span> <span class="ow">in</span> <span class="n">lItemWeekdayList</span><span class="p">:</span>
<span class="n">lDaemonLastDateTime</span> <span class="o">=</span> <span class="n">lIterationLastDateTime</span> <span class="c1"># Set the new datetime for the new processor activity</span> <span class="k">if</span> <span class="n">lFlagSearchActivityType</span><span class="p">:</span>
<span class="c1">#Уснуть до следующего прогона</span> <span class="c1">#######################################################################</span>
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="n">lDaemonLoopSeconds</span><span class="p">)</span> <span class="c1"># Branch 1 - if has TimeHH:MM</span>
<span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span> <span class="c1">#######################################################################</span>
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">exception</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Scheduler: Exception has been catched in Scheduler module. Global error&quot;</span><span class="p">)</span></div> <span class="k">if</span> <span class="s2">&quot;TimeHH:MMStr&quot;</span> <span class="ow">in</span> <span class="n">lItem</span><span class="p">:</span>
<span class="c1"># Вид активности - запуск процесса</span>
<span class="c1"># Сформировать временной штамп, относительно которого надо будет проверять время</span>
<span class="c1"># часовой пояс пока не учитываем</span>
<span class="n">lActivityDateTime</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">datetime</span><span class="o">.</span><span class="n">strptime</span><span class="p">(</span><span class="n">lItem</span><span class="p">[</span><span class="s2">&quot;TimeHH:MMStr&quot;</span><span class="p">],</span> <span class="s2">&quot;%H:%M&quot;</span><span class="p">)</span>
<span class="n">lActivityDateTime</span> <span class="o">=</span> <span class="n">lActivityDateTime</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="n">year</span><span class="o">=</span><span class="n">lCurrentDateTime</span><span class="o">.</span><span class="n">year</span><span class="p">,</span>
<span class="n">month</span><span class="o">=</span><span class="n">lCurrentDateTime</span><span class="o">.</span><span class="n">month</span><span class="p">,</span>
<span class="n">day</span><span class="o">=</span><span class="n">lCurrentDateTime</span><span class="o">.</span><span class="n">day</span><span class="p">)</span>
<span class="c1"># Убедиться в том, что время наступило</span>
<span class="k">if</span> <span class="p">(</span>
<span class="n">lActivityDateTime</span> <span class="o">&gt;=</span> <span class="n">lDaemonLastDateTime</span> <span class="ow">and</span>
<span class="n">lCurrentDateTime</span> <span class="o">&gt;=</span> <span class="n">lActivityDateTime</span><span class="p">):</span>
<span class="c1"># Log info about activity</span>
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span>
<span class="sa">f</span><span class="s2">&quot;Scheduler:: Activity list is started in new thread. Parameters are not available to see.&quot;</span><span class="p">)</span> <span class="c1"># Logging</span>
<span class="c1"># Do the activity</span>
<span class="n">lThread</span> <span class="o">=</span> <span class="n">threading</span><span class="o">.</span><span class="n">Thread</span><span class="p">(</span><span class="n">target</span><span class="o">=</span><span class="n">Processor</span><span class="o">.</span><span class="n">ActivityListExecute</span><span class="p">,</span>
<span class="n">kwargs</span><span class="o">=</span><span class="p">{</span><span class="s2">&quot;inGSettings&quot;</span><span class="p">:</span> <span class="n">inGSettings</span><span class="p">,</span>
<span class="s2">&quot;inActivityList&quot;</span><span class="p">:</span> <span class="n">lItem</span><span class="p">[</span><span class="s2">&quot;ActivityList&quot;</span><span class="p">]})</span>
<span class="n">lThread</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
<span class="n">lIterationLastDateTime</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">datetime</span><span class="o">.</span><span class="n">now</span><span class="p">()</span> <span class="c1"># Set the new datetime for the new processor activity</span>
<span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">exception</span><span class="p">(</span>
<span class="sa">f</span><span class="s2">&quot;Scheduler: Exception has been catched in Scheduler module when activity time item was initialising. ActivityTimeItem is </span><span class="si">{</span><span class="n">lItem</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="n">lDaemonLastDateTime</span> <span class="o">=</span> <span class="n">lIterationLastDateTime</span> <span class="c1"># Set the new datetime for the new processor activity</span>
<span class="c1"># Уснуть до следующего прогона</span>
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="n">lDaemonLoopSeconds</span><span class="p">)</span>
<span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">exception</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Scheduler: Exception has been catched in Scheduler module. Global error&quot;</span><span class="p">)</span>
<span class="c1"># Backward compatibility below to 1.2.0</span> <span class="c1"># Backward compatibility below to 1.2.0</span>
<span class="k">def</span> <span class="nf">__deprecated_orchestrator_start__</span><span class="p">():</span> <span class="k">def</span> <span class="nf">__deprecated_orchestrator_start__</span><span class="p">():</span>

@ -115,6 +115,10 @@
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="../../../Agent/02_Defs.html">2. Defs</a></li> <li class="toctree-l1"><a class="reference internal" href="../../../Agent/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">TOOLS</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>

@ -0,0 +1,298 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pyOpenRPA.Tools.StopSafe &mdash; pyOpenRPA v1.2.0 documentation</title>
<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<link rel="shortcut icon" href="../../../_static/favicon.ico"/>
<!--[if lt IE 9]>
<script src="../../../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../../index.html" class="icon icon-home"> pyOpenRPA
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">GENERAL</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../01_HowToInstall.html">1. How to install</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../02_RoadMap.html">2. Roadmap</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../03_Copyrights_Contacts.html">3. Copyrights &amp; Contacts</a></li>
</ul>
<p class="caption"><span class="caption-text">ROBOT</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../Robot/01_Robot.html">1. Description</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Robot/02_Defs.html">2. Defs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Robot/03_HowToUse.html">3. How to use</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Robot/04_Dependencies.html">4. Dependencies</a></li>
</ul>
<p class="caption"><span class="caption-text">STUDIO</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../Studio/01_Studio.html">1. Description</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Studio/02_HowToUse.html">2. How to use</a></li>
</ul>
<p class="caption"><span class="caption-text">ORCHESTRATOR</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/01_Orchestrator.html">1. Description</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/02_Defs.html">2. Defs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/03_gSettingsTemplate.html">3. gSettings Template</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/04_HowToUse.html">4. How to use</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/05_UAC.html">5. UAC - User Access Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a></li>
</ul>
<p class="caption"><span class="caption-text">AGENT</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../Agent/02_Defs.html">2. Defs</a></li>
</ul>
<p class="caption"><span class="caption-text">TOOLS</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../index.html">pyOpenRPA</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../../index.html">Module code</a> &raquo;</li>
<li>pyOpenRPA.Tools.StopSafe</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Source code for pyOpenRPA.Tools.StopSafe</h1><div class="highlight"><pre>
<span></span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"># How to use</span>
<span class="sd"># from pyOpenRPA.Tools import StopSafe</span>
<span class="sd"># StopSafe.Init(inLogger=None)</span>
<span class="sd"># StopSafe.IsSafeStop() # True - WM_CLOSE SIGNAL has come. taskkill /im someprocess.exe</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="kn">import</span> <span class="nn">win32con</span>
<span class="kn">import</span> <span class="nn">win32gui</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="n">gIsSignalCloseBool</span> <span class="o">=</span> <span class="kc">False</span>
<span class="n">gLogger</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">gWindowTitleStr</span> <span class="o">=</span> <span class="s2">&quot;PythonTerminator&quot;</span> <span class="c1"># Title of the phantom window</span>
<span class="n">gWindowDescriptionStr</span> <span class="o">=</span> <span class="s2">&quot;pyOpenRPA library for safe turn off the program (by send the WM_CLOSE signal from task kill)&quot;</span> <span class="c1"># Description of the phantom window</span>
<div class="viewcode-block" id="Init"><a class="viewcode-back" href="../../../Tools/02_Defs.html#pyOpenRPA.Tools.StopSafe.Init">[docs]</a><span class="k">def</span> <span class="nf">Init</span><span class="p">(</span><span class="n">inLogger</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Init the StopSafe module. After that you can use def IsStopSafe() to check if close signal has come.</span>
<span class="sd"> :param inLogger: Logger to log messages about StopSafe</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">global</span> <span class="n">gLogger</span>
<span class="k">global</span> <span class="n">gIsSignalCloseBool</span>
<span class="n">gIsSignalCloseBool</span> <span class="o">=</span> <span class="kc">False</span> <span class="c1"># Init default</span>
<span class="n">gLogger</span> <span class="o">=</span> <span class="n">inLogger</span>
<span class="kn">import</span> <span class="nn">threading</span>
<span class="k">if</span> <span class="n">gLogger</span><span class="p">:</span> <span class="n">gLogger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;StopSafe: Init termination catch thread&quot;</span><span class="p">)</span>
<span class="n">shutdown_thread</span> <span class="o">=</span> <span class="n">threading</span><span class="o">.</span><span class="n">Thread</span><span class="p">(</span><span class="n">target</span><span class="o">=</span><span class="n">_shutdown_monitor</span><span class="p">)</span>
<span class="n">shutdown_thread</span><span class="o">.</span><span class="n">start</span><span class="p">()</span></div>
<span class="c1">#shutdown_thread.join()</span>
<span class="c1">#shutdown_monitor()</span>
<div class="viewcode-block" id="IsStopSafe"><a class="viewcode-back" href="../../../Tools/02_Defs.html#pyOpenRPA.Tools.StopSafe.IsStopSafe">[docs]</a><span class="k">def</span> <span class="nf">IsStopSafe</span><span class="p">():</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Check if stop signal has come.</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">global</span> <span class="n">gIsSignalCloseBool</span> <span class="c1"># Init the global variable</span>
<span class="k">return</span> <span class="n">gIsSignalCloseBool</span> <span class="c1"># Return the result</span></div>
<span class="k">def</span> <span class="nf">_shutdown_monitor</span><span class="p">():</span>
<span class="k">global</span> <span class="n">gIsSignalCloseBool</span> <span class="c1"># Init the global variable</span>
<span class="k">global</span> <span class="n">gLogger</span>
<span class="k">def</span> <span class="nf">wndproc</span><span class="p">(</span><span class="n">hwnd</span><span class="p">,</span> <span class="n">msg</span><span class="p">,</span> <span class="n">wparam</span><span class="p">,</span> <span class="n">lparam</span><span class="p">):</span>
<span class="k">if</span> <span class="n">msg</span> <span class="o">==</span> <span class="n">win32con</span><span class="o">.</span><span class="n">WM_CLOSE</span><span class="p">:</span>
<span class="n">win32gui</span><span class="o">.</span><span class="n">DestroyWindow</span><span class="p">(</span><span class="n">hwnd</span><span class="p">)</span>
<span class="k">return</span> <span class="mi">0</span>
<span class="k">elif</span> <span class="n">msg</span> <span class="o">==</span> <span class="n">win32con</span><span class="o">.</span><span class="n">WM_DESTROY</span><span class="p">:</span>
<span class="n">win32gui</span><span class="o">.</span><span class="n">PostQuitMessage</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
<span class="k">return</span> <span class="mi">0</span>
<span class="k">return</span> <span class="n">win32gui</span><span class="o">.</span><span class="n">DefWindowProc</span><span class="p">(</span><span class="n">hwnd</span><span class="p">,</span> <span class="n">msg</span><span class="p">,</span> <span class="n">wparam</span><span class="p">,</span> <span class="n">lparam</span><span class="p">)</span>
<span class="n">wc</span> <span class="o">=</span> <span class="n">win32gui</span><span class="o">.</span><span class="n">WNDCLASS</span><span class="p">()</span>
<span class="n">wc</span><span class="o">.</span><span class="n">lpszClassName</span> <span class="o">=</span> <span class="n">gWindowTitleStr</span>
<span class="n">wc</span><span class="o">.</span><span class="n">lpfnWndProc</span> <span class="o">=</span> <span class="n">wndproc</span>
<span class="n">win32gui</span><span class="o">.</span><span class="n">RegisterClass</span><span class="p">(</span><span class="n">wc</span><span class="p">)</span>
<span class="n">hwnd</span> <span class="o">=</span> <span class="n">win32gui</span><span class="o">.</span><span class="n">CreateWindow</span><span class="p">(</span><span class="n">gWindowTitleStr</span><span class="p">,</span> <span class="n">gWindowDescriptionStr</span><span class="p">,</span>
<span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
<span class="n">win32gui</span><span class="o">.</span><span class="n">PumpMessages</span><span class="p">()</span>
<span class="n">gIsSignalCloseBool</span> <span class="o">=</span> <span class="kc">True</span> <span class="c1"># WM_CLOSE message has come</span>
<span class="k">if</span> <span class="n">gLogger</span><span class="p">:</span>
<span class="n">gLogger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;StopSafe: Program has catch VM_CLOSE signal - do safe exit&quot;</span><span class="p">)</span>
</pre></div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2021, Ivan Maslov.
</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

@ -9,7 +9,7 @@ Process (General)
.. code-block:: python .. code-block:: python
# EXAMPLE # EXAMPLE
from pyOpenRPA.Orchestrator import Managers from pyOpenRPA.Orchestrator import Orchestrator
lProcess = Orchestrator.Managers.Process(inAgentHostNameStr="PC-DESKTOP",inAgentUserNameStr="ND", inProcessNameWOExeStr="notepad",inStartCMDStr="notepad") lProcess = Orchestrator.Managers.Process(inAgentHostNameStr="PC-DESKTOP",inAgentUserNameStr="ND", inProcessNameWOExeStr="notepad",inStartCMDStr="notepad")
@ -34,8 +34,8 @@ ControlPanel (General)
.. code-block:: python .. code-block:: python
# EXAMPLE # EXAMPLE
from pyOpenRPA.Orchestrator import Managers from pyOpenRPA.Orchestrator import Orchestrator
lCP = Managers.ControlPanel(inControlPanelNameStr="TestTTT",inRefreshHTMLJinja2TemplatePathStr="ControlPanel\\test.html", inJinja2TemplateRefreshBool = True) lCP = Orchestrator.Managers.ControlPanel(inControlPanelNameStr="TestTTT",inRefreshHTMLJinja2TemplatePathStr="ControlPanel\\test.html", inJinja2TemplateRefreshBool = True)
.. automodule:: pyOpenRPA.Orchestrator.Managers.ControlPanel .. automodule:: pyOpenRPA.Orchestrator.Managers.ControlPanel

@ -0,0 +1,25 @@
####################################
2. Defs StopSafe
####################################
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
.. automodule:: pyOpenRPA.Tools.StopSafe
:members:
:autosummary:
**********
References
**********
`reStructuredText`_
.. target-notes::
.. _`reStructuredText`: http://docutils.sourceforge.net/rst.html

@ -161,4 +161,11 @@ Guide content
:caption: AGENT :caption: AGENT
:glob: :glob:
Agent/* Agent/*
.. toctree::
:maxdepth: 2
:caption: TOOLS
:glob:
Tools/*

@ -115,6 +115,10 @@
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="Agent/02_Defs.html">2. Defs</a></li> <li class="toctree-l1"><a class="reference internal" href="Agent/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">TOOLS</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>
@ -219,10 +223,10 @@
</li> </li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentActivityItemReturnExists">AgentActivityItemReturnExists() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a> <li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentActivityItemReturnExists">AgentActivityItemReturnExists() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li> </li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentActivityItemReturnGet">AgentActivityItemReturnGet() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a> <li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentActivityItemReturnGet">AgentActivityItemReturnGet() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li> </li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSCMD">AgentOSCMD() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a> <li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSCMD">AgentOSCMD() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li> </li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSFileBinaryDataBase64StrAppend">AgentOSFileBinaryDataBase64StrAppend() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a> <li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSFileBinaryDataBase64StrAppend">AgentOSFileBinaryDataBase64StrAppend() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
@ -238,6 +242,8 @@
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSFileTextDataStrCreate">AgentOSFileTextDataStrCreate() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a> <li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSFileTextDataStrCreate">AgentOSFileTextDataStrCreate() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li> </li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSFileTextDataStrReceive">AgentOSFileTextDataStrReceive() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a> <li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSFileTextDataStrReceive">AgentOSFileTextDataStrReceive() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSLogoff">AgentOSLogoff() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li> </li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentProcessWOExeUpperUserListGet">AgentProcessWOExeUpperUserListGet() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a> <li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentProcessWOExeUpperUserListGet">AgentProcessWOExeUpperUserListGet() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li> </li>
@ -247,7 +253,7 @@
<h2 id="C">C</h2> <h2 id="C">C</h2>
<table style="width: 100%" class="indextable genindextable"><tr> <table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul> <td style="width: 33%; vertical-align: top;"><ul>
<li><a href="Orchestrator/06_Defs%20Managers.html#id20">ControlPanel (class in pyOpenRPA.Orchestrator.Managers.ControlPanel)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel">[1]</a> <li><a href="Orchestrator/06_Defs%20Managers.html#id29">ControlPanel (class in pyOpenRPA.Orchestrator.Managers.ControlPanel)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel">[1]</a>
</li> </li>
</ul></td> </ul></td>
</tr></table> </tr></table>
@ -255,7 +261,7 @@
<h2 id="D">D</h2> <h2 id="D">D</h2>
<table style="width: 100%" class="indextable genindextable"><tr> <table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul> <td style="width: 33%; vertical-align: top;"><ul>
<li><a href="Orchestrator/06_Defs%20Managers.html#id21">DataDictGenerate() (pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.DataDictGenerate">[1]</a> <li><a href="Orchestrator/06_Defs%20Managers.html#id30">DataDictGenerate() (pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.DataDictGenerate">[1]</a>
</li> </li>
</ul></td> </ul></td>
</tr></table> </tr></table>
@ -285,11 +291,15 @@
<h2 id="I">I</h2> <h2 id="I">I</h2>
<table style="width: 100%" class="indextable genindextable"><tr> <table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul> <td style="width: 33%; vertical-align: top;"><ul>
<li><a href="Orchestrator/06_Defs%20Managers.html#id22">InitJSJinja2StrGenerate() (pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.InitJSJinja2StrGenerate">[1]</a> <li><a href="Tools/02_Defs.html#pyOpenRPA.Tools.StopSafe.Init">Init() (in module pyOpenRPA.Tools.StopSafe)</a>
</li>
<li><a href="Orchestrator/06_Defs%20Managers.html#id31">InitJSJinja2StrGenerate() (pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.InitJSJinja2StrGenerate">[1]</a>
</li> </li>
</ul></td> </ul></td>
<td style="width: 33%; vertical-align: top;"><ul> <td style="width: 33%; vertical-align: top;"><ul>
<li><a href="Orchestrator/06_Defs%20Managers.html#id23">InitJSJinja2TemplatePathSet() (pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.InitJSJinja2TemplatePathSet">[1]</a> <li><a href="Orchestrator/06_Defs%20Managers.html#id32">InitJSJinja2TemplatePathSet() (pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.InitJSJinja2TemplatePathSet">[1]</a>
</li>
<li><a href="Tools/02_Defs.html#pyOpenRPA.Tools.StopSafe.IsStopSafe">IsStopSafe() (in module pyOpenRPA.Tools.StopSafe)</a>
</li> </li>
</ul></td> </ul></td>
</tr></table> </tr></table>
@ -297,7 +307,7 @@
<h2 id="J">J</h2> <h2 id="J">J</h2>
<table style="width: 100%" class="indextable genindextable"><tr> <table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul> <td style="width: 33%; vertical-align: top;"><ul>
<li><a href="Orchestrator/06_Defs%20Managers.html#id24">Jinja2DataUpdateDictSet() (pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.Jinja2DataUpdateDictSet">[1]</a> <li><a href="Orchestrator/06_Defs%20Managers.html#id33">Jinja2DataUpdateDictSet() (pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.Jinja2DataUpdateDictSet">[1]</a>
</li> </li>
</ul></td> </ul></td>
<td style="width: 33%; vertical-align: top;"><ul> <td style="width: 33%; vertical-align: top;"><ul>
@ -312,6 +322,12 @@
<table style="width: 100%" class="indextable genindextable"><tr> <table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul> <td style="width: 33%; vertical-align: top;"><ul>
<li><a href="Orchestrator/06_Defs%20Managers.html#id1">Manual2Auto() (pyOpenRPA.Orchestrator.Managers.Process.Process method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.Manual2Auto">[1]</a> <li><a href="Orchestrator/06_Defs%20Managers.html#id1">Manual2Auto() (pyOpenRPA.Orchestrator.Managers.Process.Process method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.Manual2Auto">[1]</a>
</li>
<li><a href="Orchestrator/06_Defs%20Managers.html#id2">ManualStopListClear() (pyOpenRPA.Orchestrator.Managers.Process.Process method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.ManualStopListClear">[1]</a>
</li>
<li><a href="Orchestrator/06_Defs%20Managers.html#id3">ManualStopTriggerNewStart() (pyOpenRPA.Orchestrator.Managers.Process.Process method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.ManualStopTriggerNewStart">[1]</a>
</li>
<li><a href="Orchestrator/06_Defs%20Managers.html#id4">ManualStopTriggerSet() (pyOpenRPA.Orchestrator.Managers.Process.Process method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.ManualStopTriggerSet">[1]</a>
</li> </li>
<li> <li>
module module
@ -328,25 +344,31 @@
<li><a href="Orchestrator/02_Defs.html#module-pyOpenRPA.Orchestrator.Web.Basic">pyOpenRPA.Orchestrator.Web.Basic</a> <li><a href="Orchestrator/02_Defs.html#module-pyOpenRPA.Orchestrator.Web.Basic">pyOpenRPA.Orchestrator.Web.Basic</a>
</li> </li>
<li><a href="Robot/02_Defs.html#module-pyOpenRPA.Robot.UIDesktop">pyOpenRPA.Robot.UIDesktop</a> <li><a href="Robot/02_Defs.html#module-pyOpenRPA.Robot.UIDesktop">pyOpenRPA.Robot.UIDesktop</a>
</li>
<li><a href="Tools/02_Defs.html#module-pyOpenRPA.Tools.StopSafe">pyOpenRPA.Tools.StopSafe</a>
</li> </li>
</ul></li> </ul></li>
</ul></td> </ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="Orchestrator/06_Defs%20Managers.html#id5">MuteWait() (pyOpenRPA.Orchestrator.Managers.Process.Process method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.MuteWait">[1]</a>
</li>
</ul></td>
</tr></table> </tr></table>
<h2 id="O">O</h2> <h2 id="O">O</h2>
<table style="width: 100%" class="indextable genindextable"><tr> <table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul> <td style="width: 33%; vertical-align: top;"><ul>
<li><a href="Orchestrator/06_Defs%20Managers.html#id25">OnInitJSDataDict() (pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.OnInitJSDataDict">[1]</a> <li><a href="Orchestrator/06_Defs%20Managers.html#id34">OnInitJSDataDict() (pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.OnInitJSDataDict">[1]</a>
</li> </li>
<li><a href="Orchestrator/06_Defs%20Managers.html#id26">OnInitJSStr() (pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.OnInitJSStr">[1]</a> <li><a href="Orchestrator/06_Defs%20Managers.html#id35">OnInitJSStr() (pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.OnInitJSStr">[1]</a>
</li> </li>
<li><a href="Orchestrator/06_Defs%20Managers.html#id27">OnRefreshHTMLDataDict() (pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.OnRefreshHTMLDataDict">[1]</a> <li><a href="Orchestrator/06_Defs%20Managers.html#id36">OnRefreshHTMLDataDict() (pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.OnRefreshHTMLDataDict">[1]</a>
</li> </li>
<li><a href="Orchestrator/06_Defs%20Managers.html#id28">OnRefreshHTMLHashStr() (pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.OnRefreshHTMLHashStr">[1]</a> <li><a href="Orchestrator/06_Defs%20Managers.html#id37">OnRefreshHTMLHashStr() (pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.OnRefreshHTMLHashStr">[1]</a>
</li> </li>
<li><a href="Orchestrator/06_Defs%20Managers.html#id29">OnRefreshHTMLStr() (pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.OnRefreshHTMLStr">[1]</a> <li><a href="Orchestrator/06_Defs%20Managers.html#id38">OnRefreshHTMLStr() (pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.OnRefreshHTMLStr">[1]</a>
</li> </li>
<li><a href="Orchestrator/06_Defs%20Managers.html#id30">OnRefreshJSONDict() (pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.OnRefreshJSONDict">[1]</a> <li><a href="Orchestrator/06_Defs%20Managers.html#id39">OnRefreshJSONDict() (pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.OnRefreshJSONDict">[1]</a>
</li> </li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.Orchestrator">Orchestrator() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a> <li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.Orchestrator">Orchestrator() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li> </li>
@ -358,13 +380,17 @@
</li> </li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorRerunAsAdmin">OrchestratorRerunAsAdmin() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a> <li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorRerunAsAdmin">OrchestratorRerunAsAdmin() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li> </li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorRestart">OrchestratorRestart() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a> <li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorRestart">OrchestratorRestart() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li> </li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorScheduleGet">OrchestratorScheduleGet() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionRestore">OrchestratorSessionRestore() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a> <li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionRestore">OrchestratorSessionRestore() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li> </li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionSave">OrchestratorSessionSave() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a> <li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionSave">OrchestratorSessionSave() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorThreadStart">OrchestratorThreadStart() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li> </li>
<li><a href="Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSCMD">OSCMD() (in module pyOpenRPA.Agent.__Agent__)</a> <li><a href="Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSCMD">OSCMD() (in module pyOpenRPA.Agent.__Agent__)</a>
@ -383,6 +409,8 @@
<li><a href="Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSFileTextDataStrCreate">OSFileTextDataStrCreate() (in module pyOpenRPA.Agent.__Agent__)</a> <li><a href="Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSFileTextDataStrCreate">OSFileTextDataStrCreate() (in module pyOpenRPA.Agent.__Agent__)</a>
</li> </li>
<li><a href="Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSFileTextDataStrReceive">OSFileTextDataStrReceive() (in module pyOpenRPA.Agent.__Agent__)</a> <li><a href="Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSFileTextDataStrReceive">OSFileTextDataStrReceive() (in module pyOpenRPA.Agent.__Agent__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OSLogoff">OSLogoff() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li> </li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OSRemotePCRestart">OSRemotePCRestart() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a> <li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OSRemotePCRestart">OSRemotePCRestart() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li> </li>
@ -396,13 +424,17 @@
</li> </li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessDefIntervalCall">ProcessDefIntervalCall() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a> <li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessDefIntervalCall">ProcessDefIntervalCall() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li> </li>
<li><a href="Orchestrator/06_Defs%20Managers.html#id13">ProcessGet() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessGet">[1]</a> <li><a href="Orchestrator/06_Defs%20Managers.html#id20">ProcessGet() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessGet">[1]</a>
</li> </li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessIsStarted">ProcessIsStarted() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a> <li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessIsStarted">ProcessIsStarted() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li> </li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessListGet">ProcessListGet() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a> <li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessListGet">ProcessListGet() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li> </li>
<li><a href="Orchestrator/06_Defs%20Managers.html#id14">ProcessManual2Auto() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessManual2Auto">[1]</a> <li><a href="Orchestrator/06_Defs%20Managers.html#id21">ProcessManual2Auto() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessManual2Auto">[1]</a>
</li>
<li><a href="Orchestrator/06_Defs%20Managers.html#id22">ProcessManualStopListClear() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessManualStopListClear">[1]</a>
</li>
<li><a href="Orchestrator/06_Defs%20Managers.html#id23">ProcessManualStopTriggerSet() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessManualStopTriggerSet">[1]</a>
</li> </li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemAppend">ProcessorActivityItemAppend() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a> <li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemAppend">ProcessorActivityItemAppend() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li> </li>
@ -415,20 +447,20 @@
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStart">ProcessStart() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a> <li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStart">ProcessStart() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<ul> <ul>
<li><a href="Orchestrator/06_Defs%20Managers.html#id15">(in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStart">[1]</a> <li><a href="Orchestrator/06_Defs%20Managers.html#id24">(in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStart">[1]</a>
</li> </li>
</ul></li> </ul></li>
<li><a href="Orchestrator/06_Defs%20Managers.html#id16">ProcessStatusCheck() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStatusCheck">[1]</a> <li><a href="Orchestrator/06_Defs%20Managers.html#id25">ProcessStatusCheck() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStatusCheck">[1]</a>
</li> </li>
<li><a href="Orchestrator/06_Defs%20Managers.html#id17">ProcessStatusStrGet() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStatusStrGet">[1]</a> <li><a href="Orchestrator/06_Defs%20Managers.html#id26">ProcessStatusStrGet() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStatusStrGet">[1]</a>
</li> </li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStop">ProcessStop() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a> <li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStop">ProcessStop() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li> </li>
<li><a href="Orchestrator/06_Defs%20Managers.html#id18">ProcessStopForce() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStopForce">[1]</a> <li><a href="Orchestrator/06_Defs%20Managers.html#id27">ProcessStopForce() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStopForce">[1]</a>
</li> </li>
</ul></td> </ul></td>
<td style="width: 33%; vertical-align: top;"><ul> <td style="width: 33%; vertical-align: top;"><ul>
<li><a href="Orchestrator/06_Defs%20Managers.html#id19">ProcessStopSafe() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStopSafe">[1]</a> <li><a href="Orchestrator/06_Defs%20Managers.html#id28">ProcessStopSafe() (in module pyOpenRPA.Orchestrator.Managers.Process)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStopSafe">[1]</a>
</li> </li>
<li><a href="Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.ProcessWOExeUpperUserListGet">ProcessWOExeUpperUserListGet() (in module pyOpenRPA.Agent.__Agent__)</a> <li><a href="Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.ProcessWOExeUpperUserListGet">ProcessWOExeUpperUserListGet() (in module pyOpenRPA.Agent.__Agent__)</a>
</li> </li>
@ -476,6 +508,13 @@
<ul> <ul>
<li><a href="Robot/02_Defs.html#module-pyOpenRPA.Robot.UIDesktop">module</a> <li><a href="Robot/02_Defs.html#module-pyOpenRPA.Robot.UIDesktop">module</a>
</li>
</ul></li>
<li>
pyOpenRPA.Tools.StopSafe
<ul>
<li><a href="Tools/02_Defs.html#module-pyOpenRPA.Tools.StopSafe">module</a>
</li> </li>
</ul></li> </ul></li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.PythonStart">PythonStart() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a> <li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.PythonStart">PythonStart() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
@ -514,13 +553,13 @@
</li> </li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.RDPTemplateCreate">RDPTemplateCreate() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a> <li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.RDPTemplateCreate">RDPTemplateCreate() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li> </li>
<li><a href="Orchestrator/06_Defs%20Managers.html#id31">RefreshHTMLJinja2StrGenerate() (pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.RefreshHTMLJinja2StrGenerate">[1]</a> <li><a href="Orchestrator/06_Defs%20Managers.html#id40">RefreshHTMLJinja2StrGenerate() (pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.RefreshHTMLJinja2StrGenerate">[1]</a>
</li> </li>
<li><a href="Orchestrator/06_Defs%20Managers.html#id32">RefreshHTMLJinja2TemplatePathSet() (pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.RefreshHTMLJinja2TemplatePathSet">[1]</a> <li><a href="Orchestrator/06_Defs%20Managers.html#id41">RefreshHTMLJinja2TemplatePathSet() (pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.RefreshHTMLJinja2TemplatePathSet">[1]</a>
</li> </li>
<li><a href="Orchestrator/06_Defs%20Managers.html#id2">RestartForce() (pyOpenRPA.Orchestrator.Managers.Process.Process method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.RestartForce">[1]</a> <li><a href="Orchestrator/06_Defs%20Managers.html#id6">RestartForce() (pyOpenRPA.Orchestrator.Managers.Process.Process method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.RestartForce">[1]</a>
</li> </li>
<li><a href="Orchestrator/06_Defs%20Managers.html#id3">RestartSafe() (pyOpenRPA.Orchestrator.Managers.Process.Process method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.RestartSafe">[1]</a> <li><a href="Orchestrator/06_Defs%20Managers.html#id7">RestartSafe() (pyOpenRPA.Orchestrator.Managers.Process.Process method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.RestartSafe">[1]</a>
</li> </li>
</ul></td> </ul></td>
</tr></table> </tr></table>
@ -530,29 +569,35 @@
<td style="width: 33%; vertical-align: top;"><ul> <td style="width: 33%; vertical-align: top;"><ul>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.SchedulerActivityTimeAddWeekly">SchedulerActivityTimeAddWeekly() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a> <li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.SchedulerActivityTimeAddWeekly">SchedulerActivityTimeAddWeekly() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li> </li>
<li><a href="Orchestrator/06_Defs%20Managers.html#id4">ScheduleWeekDay() (pyOpenRPA.Orchestrator.Managers.Process.Process method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.ScheduleWeekDay">[1]</a> <li><a href="Orchestrator/06_Defs%20Managers.html#id8">ScheduleStatusCheckEverySeconds() (pyOpenRPA.Orchestrator.Managers.Process.Process method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.ScheduleStatusCheckEverySeconds">[1]</a>
</li> </li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.Start">Start() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a> <li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.Start">Start() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<ul> <ul>
<li><a href="Orchestrator/06_Defs%20Managers.html#id5">(pyOpenRPA.Orchestrator.Managers.Process.Process method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.Start">[1]</a> <li><a href="Orchestrator/06_Defs%20Managers.html#id9">(pyOpenRPA.Orchestrator.Managers.Process.Process method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.Start">[1]</a>
</li> </li>
</ul></li> </ul></li>
<li><a href="Orchestrator/06_Defs%20Managers.html#id6">StatusChangeLog() (pyOpenRPA.Orchestrator.Managers.Process.Process method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusChangeLog">[1]</a> <li><a href="Orchestrator/06_Defs%20Managers.html#id10">StartCheck() (pyOpenRPA.Orchestrator.Managers.Process.Process method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StartCheck">[1]</a>
</li>
<li><a href="Orchestrator/06_Defs%20Managers.html#id11">StatusChangeLog() (pyOpenRPA.Orchestrator.Managers.Process.Process method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusChangeLog">[1]</a>
</li> </li>
<li><a href="Orchestrator/06_Defs%20Managers.html#id7">StatusCheck() (pyOpenRPA.Orchestrator.Managers.Process.Process method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusCheck">[1]</a> <li><a href="Orchestrator/06_Defs%20Managers.html#id12">StatusCheck() (pyOpenRPA.Orchestrator.Managers.Process.Process method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusCheck">[1]</a>
</li>
<li><a href="Orchestrator/06_Defs%20Managers.html#id13">StatusCheckStart() (pyOpenRPA.Orchestrator.Managers.Process.Process method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusCheckStart">[1]</a>
</li> </li>
</ul></td> </ul></td>
<td style="width: 33%; vertical-align: top;"><ul> <td style="width: 33%; vertical-align: top;"><ul>
<li><a href="Orchestrator/06_Defs%20Managers.html#id8">StatusCheckStart() (pyOpenRPA.Orchestrator.Managers.Process.Process method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusCheckStart">[1]</a> <li><a href="Orchestrator/06_Defs%20Managers.html#id14">StatusCheckStopForce() (pyOpenRPA.Orchestrator.Managers.Process.Process method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusCheckStopForce">[1]</a>
</li>
<li><a href="Orchestrator/06_Defs%20Managers.html#id15">StatusCheckStopSafe() (pyOpenRPA.Orchestrator.Managers.Process.Process method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusCheckStopSafe">[1]</a>
</li> </li>
<li><a href="Orchestrator/06_Defs%20Managers.html#id9">StatusCheckStopForce() (pyOpenRPA.Orchestrator.Managers.Process.Process method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusCheckStopForce">[1]</a> <li><a href="Orchestrator/06_Defs%20Managers.html#id16">StopForce() (pyOpenRPA.Orchestrator.Managers.Process.Process method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StopForce">[1]</a>
</li> </li>
<li><a href="Orchestrator/06_Defs%20Managers.html#id10">StatusCheckStopSafe() (pyOpenRPA.Orchestrator.Managers.Process.Process method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusCheckStopSafe">[1]</a> <li><a href="Orchestrator/06_Defs%20Managers.html#id17">StopForceCheck() (pyOpenRPA.Orchestrator.Managers.Process.Process method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StopForceCheck">[1]</a>
</li> </li>
<li><a href="Orchestrator/06_Defs%20Managers.html#id11">StopForce() (pyOpenRPA.Orchestrator.Managers.Process.Process method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StopForce">[1]</a> <li><a href="Orchestrator/06_Defs%20Managers.html#id18">StopSafe() (pyOpenRPA.Orchestrator.Managers.Process.Process method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StopSafe">[1]</a>
</li> </li>
<li><a href="Orchestrator/06_Defs%20Managers.html#id12">StopSafe() (pyOpenRPA.Orchestrator.Managers.Process.Process method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StopSafe">[1]</a> <li><a href="Orchestrator/06_Defs%20Managers.html#id19">StopSafeCheck() (pyOpenRPA.Orchestrator.Managers.Process.Process method)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StopSafeCheck">[1]</a>
</li> </li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.StorageRobotExists">StorageRobotExists() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a> <li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.StorageRobotExists">StorageRobotExists() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li> </li>

@ -116,6 +116,10 @@
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="Agent/02_Defs.html">2. Defs</a></li> <li class="toctree-l1"><a class="reference internal" href="Agent/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">TOOLS</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>
@ -395,6 +399,15 @@ At the time of this writing the pyOpenRPA is successfully using in several big R
</li> </li>
</ul> </ul>
</div> </div>
<div class="toctree-wrapper compound">
<p class="caption"><span class="caption-text">TOOLS</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="Tools/02_Defs.html">2. Defs StopSafe</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Tools/02_Defs.html#references">References</a></li>
</ul>
</li>
</ul>
</div>
</div> </div>
</div> </div>

Binary file not shown.

@ -118,6 +118,10 @@
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="Agent/02_Defs.html">2. Defs</a></li> <li class="toctree-l1"><a class="reference internal" href="Agent/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">TOOLS</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>
@ -227,6 +231,11 @@
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
<a href="Robot/02_Defs.html#module-pyOpenRPA.Robot.UIDesktop"><code class="xref">pyOpenRPA.Robot.UIDesktop</code></a></td><td> <a href="Robot/02_Defs.html#module-pyOpenRPA.Robot.UIDesktop"><code class="xref">pyOpenRPA.Robot.UIDesktop</code></a></td><td>
<em></em></td></tr> <em></em></td></tr>
<tr class="cg-1">
<td></td>
<td>&#160;&#160;&#160;
<a href="Tools/02_Defs.html#module-pyOpenRPA.Tools.StopSafe"><code class="xref">pyOpenRPA.Tools.StopSafe</code></a></td><td>
<em></em></td></tr>
</table> </table>

@ -118,6 +118,10 @@
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="Agent/02_Defs.html">2. Defs</a></li> <li class="toctree-l1"><a class="reference internal" href="Agent/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">TOOLS</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="Tools/02_Defs.html">2. Defs StopSafe</a></li>
</ul>

File diff suppressed because one or more lines are too long

@ -148,6 +148,11 @@ Work with activity scheduling.
| Read text file in the agent GUI session | Read text file in the agent GUI session
| |
| `AgentOSLogoff`(inHostNameStr, inUserStr)
| Logoff the agent user session
|
| `AgentProcessWOExeUpperUserListGet`(…[, …]) | `AgentProcessWOExeUpperUserListGet`(…[, …])
| Return the process list only for the current user (where Agent is running) without .EXE in upper case. | Return the process list only for the current user (where Agent is running) without .EXE in upper case.
@ -193,6 +198,11 @@ Work with activity scheduling.
| Verify user credentials in windows. | Verify user credentials in windows.
| |
| `OSLogoff`()
| Logoff the current orchestrator session :return:
|
| `OSRemotePCRestart`(inHostStr[, inForceBool, …]) | `OSRemotePCRestart`(inHostStr[, inForceBool, …])
| Send signal via power shell to restart remote PC ATTENTION: Orchestrator user need to have restart right on the Remote machine to restart PC. | Send signal via power shell to restart remote PC ATTENTION: Orchestrator user need to have restart right on the Remote machine to restart PC.
@ -228,6 +238,11 @@ Work with activity scheduling.
| Orchestrator restart | Orchestrator restart
| |
| `OrchestratorScheduleGet`()
| Get the schedule (schedule.readthedocs.io) from the Orchestrator
|
| `OrchestratorSessionRestore`([inGSettings]) | `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 _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).
@ -238,6 +253,11 @@ Work with activity scheduling.
| Orchestrator session save in file | Orchestrator session save in file
| |
| `OrchestratorThreadStart`(inDef, \*inArgList, …)
| Execute def in new thread and pass some args with list and dict types
|
| `ProcessDefIntervalCall`(inDef, inIntervalSecFloat) | `ProcessDefIntervalCall`(inDef, inIntervalSecFloat)
| Use this procedure if you need to run periodically some def. | Use this procedure if you need to run periodically some def.
@ -998,6 +1018,16 @@ Read text file in the agent GUI session
### pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSLogoff(inHostNameStr, inUserStr)
Logoff the agent user session
* **Returns**
GUID String of the ActivityItem - you can wait (sync or async) result by this guid!
### pyOpenRPA.Orchestrator.__Orchestrator__.AgentProcessWOExeUpperUserListGet(inHostNameStr, inUserStr, inGSettings=None) ### pyOpenRPA.Orchestrator.__Orchestrator__.AgentProcessWOExeUpperUserListGet(inHostNameStr, inUserStr, inGSettings=None)
Return the process list only for the current user (where Agent is running) without .EXE in upper case. Can use in ActivityItem from Orchestrator to Agent Return the process list only for the current user (where Agent is running) without .EXE in upper case. Can use in ActivityItem from Orchestrator to Agent
@ -1227,6 +1257,11 @@ Verify user credentials in windows. Return bool
### pyOpenRPA.Orchestrator.__Orchestrator__.OSLogoff()
Logoff the current orchestrator session
:return:
### pyOpenRPA.Orchestrator.__Orchestrator__.OSRemotePCRestart(inHostStr, inForceBool=True, inLogger=None) ### pyOpenRPA.Orchestrator.__Orchestrator__.OSRemotePCRestart(inHostStr, inForceBool=True, inLogger=None)
Send signal via power shell to restart remote PC Send signal via power shell to restart remote PC
ATTENTION: Orchestrator user need to have restart right on the Remote machine to restart PC. ATTENTION: Orchestrator user need to have restart right on the Remote machine to restart PC.
@ -1353,6 +1388,18 @@ Orchestrator restart
### pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorScheduleGet()
Get the schedule (schedule.readthedocs.io) from the Orchestrator
Fro example you can use:
* **Returns**
schedule module. Example see here [https://schedule.readthedocs.io/en/stable/examples.html](https://schedule.readthedocs.io/en/stable/examples.html)
### pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionRestore(inGSettings=None) ### pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionRestore(inGSettings=None)
Check _SessionLast_RDPList.json and _SessionLast_StorageDict.pickle in working directory. if exist - load into gsettings Check _SessionLast_RDPList.json and _SessionLast_StorageDict.pickle in working directory. if exist - load into gsettings
# _SessionLast_StorageDict.pickle (binary) # _SessionLast_StorageDict.pickle (binary)
@ -1391,6 +1438,29 @@ Orchestrator session save in file
### pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorThreadStart(inDef, \*inArgList, \*\*inArgDict)
Execute def in new thread and pass some args with list and dict types
* **Parameters**
* **inDef** Python Def
* **inArgList** args as list
* **inArgDict** args as dict
* **Returns**
threading.Thread object
### pyOpenRPA.Orchestrator.__Orchestrator__.ProcessDefIntervalCall(inDef, inIntervalSecFloat, inIntervalAsyncBool=False, inDefArgList=None, inDefArgDict=None, inDefArgGSettingsNameStr=None, inDefArgLoggerNameStr=None, inExecuteInNewThreadBool=True, inLogger=None, inGSettings=None) ### pyOpenRPA.Orchestrator.__Orchestrator__.ProcessDefIntervalCall(inDef, inIntervalSecFloat, inIntervalAsyncBool=False, inDefArgList=None, inDefArgDict=None, inDefArgGSettingsNameStr=None, inDefArgLoggerNameStr=None, inExecuteInNewThreadBool=True, inLogger=None, inGSettings=None)
Use this procedure if you need to run periodically some def. Set def, args, interval and enjoy :) Use this procedure if you need to run periodically some def. Set def, args, interval and enjoy :)

@ -4,6 +4,7 @@ gSettings structure
``` ```
import os, logging, datetime, sys import os, logging, datetime, sys
import schedule # https://schedule.readthedocs.io/en/stable/examples.html
# Technical def - return GSettings structure with examples # Technical def - return GSettings structure with examples
def __Create__(): def __Create__():
@ -134,6 +135,7 @@ def __Create__():
"ActivityList": [] "ActivityList": []
}, },
"SchedulerDict": { "SchedulerDict": {
"Schedule": schedule, # https://schedule.readthedocs.io/en/stable/examples.html
"CheckIntervalSecFloat": 5.0, # Check interval in seconds "CheckIntervalSecFloat": 5.0, # Check interval in seconds
"ActivityTimeList": [ "ActivityTimeList": [
# { # {

@ -47,6 +47,30 @@ elif __name__ == "__main__": # New init way - allow run as module -m PyOpenRPA.O
lPyModules = Orchestrator.OrchestratorPySearchInit(inGlobPatternStr="ControlPanel\\CP_*.py", inDefStr="SettingsUpdate", inDefArgNameGSettingsStr="inGSettings") lPyModules = Orchestrator.OrchestratorPySearchInit(inGlobPatternStr="ControlPanel\\CP_*.py", inDefStr="SettingsUpdate", inDefArgNameGSettingsStr="inGSettings")
# Call the orchestrator def # Call the orchestrator def
Orchestrator.Orchestrator(inGSettings=gSettings, inDumpRestoreBool=False) Orchestrator.Orchestrator(inGSettings=gSettings, inDumpRestoreBool=False)
#import atexit
#def test():
# Orchestrator.OrchestratorLoggerGet().info(123)
#atexit.register(test)
import signal
import sys
from pyOpenRPA.Tools import Terminator
Terminator.Init(inLogger=Orchestrator.OrchestratorLoggerGet())
#def signal_term_handler(signal, frame):
# Orchestrator.OrchestratorLoggerGet().info('got SIGTERM')
# sys.exit(0)
#signal.signal(signal.SIGTERM, signal_term_handler)
import time
while not Terminator.IsSignalClose():
time.sleep(2)
print(999)
time.sleep(2)
else: else:
print("!WARNING! Current orchestrator settings do not support old type of the Orchestrator start. Use new Orchestrator type start (see v1.2.0)") print("!WARNING! Current orchestrator settings do not support old type of the Orchestrator start. Use new Orchestrator type start (see v1.2.0)")

@ -4,7 +4,7 @@
``` ```
# EXAMPLE # EXAMPLE
from pyOpenRPA.Orchestrator import Managers from pyOpenRPA.Orchestrator import Orchestrator
lProcess = Orchestrator.Managers.Process(inAgentHostNameStr="PC-DESKTOP",inAgentUserNameStr="ND", inProcessNameWOExeStr="notepad",inStartCMDStr="notepad") lProcess = Orchestrator.Managers.Process(inAgentHostNameStr="PC-DESKTOP",inAgentUserNameStr="ND", inProcessNameWOExeStr="notepad",inStartCMDStr="notepad")
``` ```
@ -26,6 +26,16 @@ lProcess = Orchestrator.Managers.Process(inAgentHostNameStr="PC-DESKTOP",inAgent
| 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):
|
| `ProcessManualStopListClear`(…)
| Clear the last start tries list.
|
| `ProcessManualStopTriggerSet`(…)
| Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
| |
| `ProcessStart`(inAgentHostNameStr, …[, …]) | `ProcessStart`(inAgentHostNameStr, …[, …])
@ -78,6 +88,13 @@ Process instance has the following statuses:
* 5_STARTED_MANUAL * 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:** **Methods:**
| `Manual2Auto`() | `Manual2Auto`()
@ -85,6 +102,26 @@ Process instance has the following statuses:
| 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):
| |
| `ManualStopListClear`()
| Clear the last start tries list.
|
| `ManualStopTriggerNewStart`()
| Log new start event.
|
| `ManualStopTriggerSet`(inMSTdTSecFloat, inMSTdNInt)
| Set ManualStopTrigger (MST) to switch to STOPPED MANUAL if specified count of start fails will be catched in specified time period
|
| `MuteWait`()
| Internal def.
|
| `RestartForce`([inIsManualBool]) | `RestartForce`([inIsManualBool])
| Manual/Auto restart force. | Manual/Auto restart force.
@ -95,16 +132,21 @@ Process instance has the following statuses:
| Manual/Auto restart safe. | Manual/Auto restart safe.
| |
| `ScheduleWeekDay`() | `ScheduleStatusCheckEverySeconds`([…])
| Some template def to work with schedule package. | Run status check every interval in second you specify.
| |
| `Start`([inIsManualBool]) | `Start`([inIsManualBool])
| Manual/Auto start. | Manual/Auto start.
| |
| `StartCheck`()
| Start program if auto stopped (0_STOPPED).
|
| `StatusChangeLog`() | `StatusChangeLog`()
| Lof information about status change | Lof information about status change
@ -135,11 +177,21 @@ Process instance has the following statuses:
| Manual/Auto stop force. | Manual/Auto stop force.
| |
| `StopForceCheck`()
| Stop force program if auto started (4_STARTED).
|
| `StopSafe`([inIsManualBool]) | `StopSafe`([inIsManualBool])
| Manual/Auto stop safe. | Manual/Auto stop safe.
| |
| `StopSafeCheck`()
| Stop safe program if auto started (4_STARTED).
|
#### Manual2Auto() #### Manual2Auto()
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):
@ -151,6 +203,55 @@ Remove Manual flag from process (if exists) - it will allow the schedule operati
#### ManualStopListClear()
Clear the last start tries list.
* **Returns**
None
#### ManualStopTriggerNewStart()
Log new start event. Check if it is applicable. Change status if ManualStop trigger criteria is applied
* **Returns**
# 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
#### ManualStopTriggerSet(inMSTdTSecFloat: float, inMSTdNInt: int)
Set ManualStopTrigger (MST) to switch to STOPPED MANUAL if specified count of start fails will be catched in specified time period
* **Parameters**
* **inMSTdTSecFloat** Time perios in seconds
* **inMSTdNInt** Counts of the start tries
* **Returns**
None
#### MuteWait()
Internal def. Wait when class is apply to send new activities to the agent
* **Returns**
#### RestartForce(inIsManualBool=True) #### RestartForce(inIsManualBool=True)
Manual/Auto restart force. Force restart dont wait process termination - it just terminate process now ant then start it. Manual/Auto restart force. Force restart dont wait process termination - it just terminate process now ant then start it.
Manual restart will block scheduling execution. To return schedule execution use def Manual2Auto Manual restart will block scheduling execution. To return schedule execution use def Manual2Auto
@ -164,7 +265,8 @@ Manual restart will block scheduling execution. To return schedule execution use
* **Returns** * **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
#### RestartSafe(inIsManualBool=True) #### RestartSafe(inIsManualBool=True)
@ -180,20 +282,29 @@ Manual stop safe will block scheduling execution. To return schedule execution u
* **Returns** * **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
#### ScheduleWeekDay()
Some template def to work with schedule package. Configure schedule to start. Stop process in auto mode in all sele. #### ScheduleStatusCheckEverySeconds(inIntervalSecondsInt=120)
Run status check every interval in second you specify.
* **Parameters**
**inIntervalSecondsInt** Interval in seconds. Default is 120
* **Returns** * **Returns**
None
#### Start(inIsManualBool=True) #### Start(inIsManualBool=True)
Manual/Auto start. Manual start will block scheduling execution. To return schedule execution use def Manual2Auto 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 dont start auto is stopped manual now
* **Parameters** * **Parameters**
@ -208,6 +319,16 @@ Manual/Auto start. Manual start will block scheduling execution. To return sched
#### StartCheck()
Start program if auto stopped (0_STOPPED).
* **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
#### StatusChangeLog() #### StatusChangeLog()
Lof information about status change Lof information about status change
@ -233,7 +354,8 @@ Check process status and run it if auto stopped self.mStatusStr is “0_STOPPED
* **Returns** * **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
#### StatusCheckStopForce() #### StatusCheckStopForce()
@ -242,7 +364,8 @@ Check process status and auto stop force it if self.mStatusStr is 4_STARTED
* **Returns** * **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
#### StatusCheckStopSafe() #### StatusCheckStopSafe()
@ -255,7 +378,7 @@ Check process status and auto stop safe it if self.mStatusStr is 4_STARTED
#### StopForce(inIsManualBool=True) #### StopForce(inIsManualBool=True)
Manual/Auto stop force. Force stop dont wait process termination - it just terminate process now. Manual/Auto stop force. Force stop dont wait process termination - it just terminate process now.
Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto
@ -271,6 +394,16 @@ Manual stop safe will block scheduling execution. To return schedule execution u
#### StopForceCheck()
Stop force program if auto started (4_STARTED).
* **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
#### StopSafe(inIsManualBool=True) #### StopSafe(inIsManualBool=True)
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/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 Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto
@ -284,7 +417,18 @@ Manual stop safe will block scheduling execution. To return schedule execution u
* **Returns** * **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
#### StopSafeCheck()
Stop safe program if auto started (4_STARTED).
* **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
### pyOpenRPA.Orchestrator.Managers.Process.ProcessGet(inAgentHostNameStr: str, inAgentUserNameStr: str, inProcessNameWOExeStr: str) ### pyOpenRPA.Orchestrator.Managers.Process.ProcessGet(inAgentHostNameStr: str, inAgentUserNameStr: str, inProcessNameWOExeStr: str)
@ -341,6 +485,58 @@ Remove Manual flag from process (if exists) - it will allow the schedule operati
### pyOpenRPA.Orchestrator.Managers.Process.ProcessManualStopListClear(inAgentHostNameStr: str, inAgentUserNameStr: str, inProcessNameWOExeStr: str)
Clear the last start tries list.
* **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
* **Returns**
None
### pyOpenRPA.Orchestrator.Managers.Process.ProcessManualStopTriggerSet(inAgentHostNameStr: str, inAgentUserNameStr: str, inProcessNameWOExeStr: str, inMSTdTSecFloat: float, inMSTdNInt: int)
Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
* **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
* **inMSTdTSecFloat** Time periods in seconds
* **inMSTdNInt** Counts of the start tries
* **Returns**
None
### pyOpenRPA.Orchestrator.Managers.Process.ProcessStart(inAgentHostNameStr: str, inAgentUserNameStr: str, inProcessNameWOExeStr: str, inIsManualBool: bool = True) ### pyOpenRPA.Orchestrator.Managers.Process.ProcessStart(inAgentHostNameStr: str, inAgentUserNameStr: str, inProcessNameWOExeStr: str, inIsManualBool: bool = True)
Manual/Auto start. Manual start will block scheduling execution. To return schedule execution use def Manual2Auto Manual/Auto start. Manual start will block scheduling execution. To return schedule execution use def Manual2Auto
@ -526,6 +722,16 @@ 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): | Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
|
| `ProcessManualStopListClear`(…)
| Clear the last start tries list.
|
| `ProcessManualStopTriggerSet`(…)
| Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
| |
| `ProcessStart`(inAgentHostNameStr, …[, …]) | `ProcessStart`(inAgentHostNameStr, …[, …])
@ -578,6 +784,13 @@ Process instance has the following statuses:
* 5_STARTED_MANUAL * 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:** **Methods:**
| `Manual2Auto`() | `Manual2Auto`()
@ -585,6 +798,26 @@ Process instance has the following statuses:
| 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):
| |
| `ManualStopListClear`()
| Clear the last start tries list.
|
| `ManualStopTriggerNewStart`()
| Log new start event.
|
| `ManualStopTriggerSet`(inMSTdTSecFloat, inMSTdNInt)
| Set ManualStopTrigger (MST) to switch to STOPPED MANUAL if specified count of start fails will be catched in specified time period
|
| `MuteWait`()
| Internal def.
|
| `RestartForce`([inIsManualBool]) | `RestartForce`([inIsManualBool])
| Manual/Auto restart force. | Manual/Auto restart force.
@ -595,16 +828,21 @@ Process instance has the following statuses:
| Manual/Auto restart safe. | Manual/Auto restart safe.
| |
| `ScheduleWeekDay`() | `ScheduleStatusCheckEverySeconds`([…])
| Some template def to work with schedule package. | Run status check every interval in second you specify.
| |
| `Start`([inIsManualBool]) | `Start`([inIsManualBool])
| Manual/Auto start. | Manual/Auto start.
| |
| `StartCheck`()
| Start program if auto stopped (0_STOPPED).
|
| `StatusChangeLog`() | `StatusChangeLog`()
| Lof information about status change | Lof information about status change
@ -635,11 +873,21 @@ Process instance has the following statuses:
| Manual/Auto stop force. | Manual/Auto stop force.
| |
| `StopForceCheck`()
| Stop force program if auto started (4_STARTED).
|
| `StopSafe`([inIsManualBool]) | `StopSafe`([inIsManualBool])
| Manual/Auto stop safe. | Manual/Auto stop safe.
| |
| `StopSafeCheck`()
| Stop safe program if auto started (4_STARTED).
|
#### Manual2Auto() #### Manual2Auto()
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):
@ -651,6 +899,55 @@ Remove Manual flag from process (if exists) - it will allow the schedule operati
#### ManualStopListClear()
Clear the last start tries list.
* **Returns**
None
#### ManualStopTriggerNewStart()
Log new start event. Check if it is applicable. Change status if ManualStop trigger criteria is applied
* **Returns**
# 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
#### ManualStopTriggerSet(inMSTdTSecFloat: float, inMSTdNInt: int)
Set ManualStopTrigger (MST) to switch to STOPPED MANUAL if specified count of start fails will be catched in specified time period
* **Parameters**
* **inMSTdTSecFloat** Time perios in seconds
* **inMSTdNInt** Counts of the start tries
* **Returns**
None
#### MuteWait()
Internal def. Wait when class is apply to send new activities to the agent
* **Returns**
#### RestartForce(inIsManualBool=True) #### RestartForce(inIsManualBool=True)
Manual/Auto restart force. Force restart dont wait process termination - it just terminate process now ant then start it. Manual/Auto restart force. Force restart dont wait process termination - it just terminate process now ant then start it.
Manual restart will block scheduling execution. To return schedule execution use def Manual2Auto Manual restart will block scheduling execution. To return schedule execution use def Manual2Auto
@ -664,7 +961,8 @@ Manual restart will block scheduling execution. To return schedule execution use
* **Returns** * **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
#### RestartSafe(inIsManualBool=True) #### RestartSafe(inIsManualBool=True)
@ -680,20 +978,29 @@ Manual stop safe will block scheduling execution. To return schedule execution u
* **Returns** * **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
#### ScheduleWeekDay()
Some template def to work with schedule package. Configure schedule to start. Stop process in auto mode in all sele. #### ScheduleStatusCheckEverySeconds(inIntervalSecondsInt=120)
Run status check every interval in second you specify.
* **Parameters**
**inIntervalSecondsInt** Interval in seconds. Default is 120
* **Returns** * **Returns**
None
#### Start(inIsManualBool=True) #### Start(inIsManualBool=True)
Manual/Auto start. Manual start will block scheduling execution. To return schedule execution use def Manual2Auto 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 dont start auto is stopped manual now
* **Parameters** * **Parameters**
@ -708,6 +1015,16 @@ Manual/Auto start. Manual start will block scheduling execution. To return sched
#### StartCheck()
Start program if auto stopped (0_STOPPED).
* **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
#### StatusChangeLog() #### StatusChangeLog()
Lof information about status change Lof information about status change
@ -733,7 +1050,8 @@ Check process status and run it if auto stopped self.mStatusStr is “0_STOPPED
* **Returns** * **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
#### StatusCheckStopForce() #### StatusCheckStopForce()
@ -742,7 +1060,8 @@ Check process status and auto stop force it if self.mStatusStr is 4_STARTED
* **Returns** * **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
#### StatusCheckStopSafe() #### StatusCheckStopSafe()
@ -755,7 +1074,7 @@ Check process status and auto stop safe it if self.mStatusStr is 4_STARTED
#### StopForce(inIsManualBool=True) #### StopForce(inIsManualBool=True)
Manual/Auto stop force. Force stop dont wait process termination - it just terminate process now. Manual/Auto stop force. Force stop dont wait process termination - it just terminate process now.
Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto
@ -771,6 +1090,16 @@ Manual stop safe will block scheduling execution. To return schedule execution u
#### StopForceCheck()
Stop force program if auto started (4_STARTED).
* **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
#### StopSafe(inIsManualBool=True) #### StopSafe(inIsManualBool=True)
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/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 Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto
@ -784,7 +1113,18 @@ Manual stop safe will block scheduling execution. To return schedule execution u
* **Returns** * **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
#### StopSafeCheck()
Stop safe program if auto started (4_STARTED).
* **Returns**
Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL
### pyOpenRPA.Orchestrator.Managers.Process.ProcessGet(inAgentHostNameStr: str, inAgentUserNameStr: str, inProcessNameWOExeStr: str) ### pyOpenRPA.Orchestrator.Managers.Process.ProcessGet(inAgentHostNameStr: str, inAgentUserNameStr: str, inProcessNameWOExeStr: str)
@ -841,6 +1181,58 @@ Remove Manual flag from process (if exists) - it will allow the schedule operati
### pyOpenRPA.Orchestrator.Managers.Process.ProcessManualStopListClear(inAgentHostNameStr: str, inAgentUserNameStr: str, inProcessNameWOExeStr: str)
Clear the last start tries list.
* **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
* **Returns**
None
### pyOpenRPA.Orchestrator.Managers.Process.ProcessManualStopTriggerSet(inAgentHostNameStr: str, inAgentUserNameStr: str, inProcessNameWOExeStr: str, inMSTdTSecFloat: float, inMSTdNInt: int)
Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
* **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
* **inMSTdTSecFloat** Time periods in seconds
* **inMSTdNInt** Counts of the start tries
* **Returns**
None
### pyOpenRPA.Orchestrator.Managers.Process.ProcessStart(inAgentHostNameStr: str, inAgentUserNameStr: str, inProcessNameWOExeStr: str, inIsManualBool: bool = True) ### pyOpenRPA.Orchestrator.Managers.Process.ProcessStart(inAgentHostNameStr: str, inAgentUserNameStr: str, inProcessNameWOExeStr: str, inIsManualBool: bool = True)
Manual/Auto start. Manual start will block scheduling execution. To return schedule execution use def Manual2Auto Manual/Auto start. Manual start will block scheduling execution. To return schedule execution use def Manual2Auto
@ -1010,8 +1402,8 @@ Manual stop safe will block scheduling execution. To return schedule execution u
``` ```
# EXAMPLE # EXAMPLE
from pyOpenRPA.Orchestrator import Managers from pyOpenRPA.Orchestrator import Orchestrator
lCP = Managers.ControlPanel(inControlPanelNameStr="TestTTT",inRefreshHTMLJinja2TemplatePathStr="ControlPanel\\test.html", inJinja2TemplateRefreshBool = True) lCP = Orchestrator.Managers.ControlPanel(inControlPanelNameStr="TestTTT",inRefreshHTMLJinja2TemplatePathStr="ControlPanel\\test.html", inJinja2TemplateRefreshBool = True)
``` ```
**Classes:** **Classes:**

@ -0,0 +1,48 @@
# 2. Defs StopSafe
How to use StopSafe on the robot side
# How to use
# from pyOpenRPA.Tools import StopSafe
# StopSafe.Init(inLogger=None)
# StopSafe.IsSafeStop() # True - WM_CLOSE SIGNAL has come. taskkill /im someprocess.exe
**Functions:**
| `Init`([inLogger])
| Init the StopSafe module.
|
| `IsStopSafe`()
| Check if stop signal has come.
|
### pyOpenRPA.Tools.StopSafe.Init(inLogger=None)
Init the StopSafe module. After that you can use def IsStopSafe() to check if close signal has come.
* **Parameters**
**inLogger** Logger to log messages about StopSafe
* **Returns**
### pyOpenRPA.Tools.StopSafe.IsStopSafe()
Check if stop signal has come.
* **Returns**
## References
[reStructuredText](http://docutils.sourceforge.net/rst.html)

@ -359,3 +359,10 @@ In wiki you can use the following docs:
* References * References
* 2. Defs StopSafe
* References

Loading…
Cancel
Save