Add info about managers in sphinx

dev-linux
Ivan Maslov 3 years ago
parent 52942b3679
commit c989a55b1c

@ -0,0 +1,52 @@
####################################
6. Defs Managers
####################################
**************************************************
Process (General)
**************************************************
.. code-block:: python
# EXAMPLE
from pyOpenRPA.Orchestrator import Orchestrator
lProcess = Orchestrator.Managers.Process(inAgentHostNameStr="PC-DESKTOP",inAgentUserNameStr="ND", inProcessNameWOExeStr="notepad",inStartCMDStr="notepad")
.. automodule:: pyOpenRPA.Orchestrator.Managers.Process
:members:
:autosummary:
**************************************************
Process (Details)
**************************************************
.. automodule:: pyOpenRPA.Orchestrator.Managers.Process
:members:
:autosummary:
**************************************************
ControlPanel (General)
**************************************************
.. code-block:: python
# EXAMPLE
from pyOpenRPA.Orchestrator import Orchestrator
lCP = Orchestrator.Managers.ControlPanel(inControlPanelNameStr="TestTTT",inRefreshHTMLJinja2TemplatePathStr="ControlPanel\\test.html", inJinja2TemplateRefreshBool = True)
.. automodule:: pyOpenRPA.Orchestrator.Managers.ControlPanel
:members:
:autosummary:
**************************************************
ControlPanel (Details)
**************************************************
.. automodule:: pyOpenRPA.Orchestrator.Managers.ControlPanel
:members:
:autosummary:

@ -35,6 +35,7 @@ class Process():
__Orchestrator__.GSettingsGet()["ManagersProcessDict"][(inAgentHostNameStr.upper(), inAgentUserNameStr.upper(), inProcessNameWOExeStr.upper())]=self
lActivityDict = __Orchestrator__.ProcessorActivityItemCreate(inDef=self.StatusCheck,inArgList=[])
__Orchestrator__.ProcessorActivityItemAppend(inActivityItemDict=lActivityDict)
def Manual2Auto(self) -> str:
"""
Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):
@ -46,9 +47,7 @@ class Process():
if self.mStatusStr=="3_STOP_SAFE_MANUAL": self.mStatusStr = "2_STOP_SAFE"; lLogBool=True
if self.mStatusStr=="5_STARTED_MANUAL": self.mStatusStr = "4_STARTED"; lLogBool=True
# Log info about process
if lLogBool == True:
lL = __Orchestrator__.OrchestratorLoggerGet()
lL.info(f"Managers.Process: {self.mProcessNameWOExeStr} change status to {self.mStatusStr})")
if lLogBool == True: self.StatusChangeLog()
return self.mStatusStr
def Start(self, inIsManualBool = True) -> str:
@ -75,8 +74,7 @@ class Process():
else:
self.mStatusStr = "4_STARTED"
# Log info about process
lL = __Orchestrator__.OrchestratorLoggerGet()
lL.info(f"Managers.Process: {self.mProcessNameWOExeStr} change status to {self.mStatusStr})")
self.StatusChangeLog()
return self.mStatusStr
def StopSafe(self, inIsManualBool = True) -> str:
@ -110,8 +108,7 @@ class Process():
else:
self.mStatusStr = "0_STOPPED"
# Log info about process
lL = __Orchestrator__.OrchestratorLoggerGet()
lL.info(f"Managers.Process: {self.mProcessNameWOExeStr} change status to {self.mStatusStr})")
self.StatusChangeLog()
return self.mStatusStr
def RestartSafe(self, inIsManualBool = True):
@ -134,6 +131,17 @@ class Process():
"""
pass
def StatusChangeLog(self):
"""
Lof information about status change
:return:
"""
# Log info about process
lL = __Orchestrator__.OrchestratorLoggerGet()
lL.info(f"Managers.Process ({self.mAgentHostNameStr}, {self.mAgentUserNameStr}, {self.mProcessNameWOExeStr}): Status has been changed to {self.mStatusStr})")
def StatusCheck(self):
"""
Check if process is alive. The def will save the manual flag is exists.
@ -154,9 +162,7 @@ class Process():
if self.mStatusStr == "4_STARTED": self.mStatusStr = "0_STOPPED"; lLogBool=True
if self.mStatusStr is None: self.mStatusStr = "0_STOPPED"; lLogBool=True
# Log info about process
if lLogBool == True:
lL = __Orchestrator__.OrchestratorLoggerGet()
lL.info(f"Managers.Process: {self.mProcessNameWOExeStr} change status to {self.mStatusStr})")
if lLogBool == True: self.StatusChangeLog()
return self.mStatusStr
def StatusCheckStart(self):
"""

@ -115,6 +115,7 @@
<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>

@ -111,6 +111,7 @@
<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>

@ -115,6 +115,7 @@
<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>

@ -40,7 +40,7 @@
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="prev" title="5. UAC - User Access Control" href="../Orchestrator/05_UAC.html" />
<link rel="prev" title="6. Defs Managers" href="../Orchestrator/06_Defs%20Managers.html" />
</head>
<body class="wy-body-for-nav">
@ -110,6 +110,7 @@
<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 class="current">
@ -336,7 +337,7 @@
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="../Orchestrator/05_UAC.html" class="btn btn-neutral float-left" title="5. UAC - User Access Control" 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>
<hr/>

@ -118,6 +118,7 @@
<li class="toctree-l1"><a class="reference internal" href="03_gSettingsTemplate.html">3. gSettings Template</a></li>
<li class="toctree-l1"><a class="reference internal" href="04_HowToUse.html">4. How to use</a></li>
<li class="toctree-l1"><a class="reference internal" href="05_UAC.html">5. UAC - User Access Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="06_Defs%20Managers.html">6. Defs Managers</a></li>
</ul>
<p class="caption"><span class="caption-text">AGENT</span></p>
<ul>

File diff suppressed because it is too large Load Diff

@ -111,6 +111,7 @@
<li class="toctree-l1 current"><a class="current reference internal" href="#">3. gSettings Template</a></li>
<li class="toctree-l1"><a class="reference internal" href="04_HowToUse.html">4. How to use</a></li>
<li class="toctree-l1"><a class="reference internal" href="05_UAC.html">5. UAC - User Access Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="06_Defs%20Managers.html">6. Defs Managers</a></li>
</ul>
<p class="caption"><span class="caption-text">AGENT</span></p>
<ul>
@ -226,6 +227,9 @@
<span class="c1"># # # # # # # # # # # # # # # # # #</span>
<span class="p">},</span>
<span class="s2">&quot;ServerDict&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="s2">&quot;ControlPanelDict&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="c1"># &quot;CPKey&quot;: &lt;Managers.ControlPanel instance&gt;</span>
<span class="p">},</span>
<span class="s2">&quot;AgentLimitLogSizeBytesInt&quot;</span><span class="p">:</span> <span class="mi">300</span><span class="p">,</span> <span class="c1"># Don&#39;t show body if json body of transmition is more than</span>
<span class="s2">&quot;ServerThread&quot;</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span> <span class="c1"># Server thread is there</span>
<span class="s2">&quot;AgentActivityLifetimeSecFloat&quot;</span><span class="p">:</span> <span class="mf">1200.0</span><span class="p">,</span> <span class="c1"># Time in seconds to life for activity for the agent</span>
@ -332,6 +336,7 @@
<span class="c1"># },</span>
<span class="p">],</span>
<span class="p">},</span>
<span class="s2">&quot;ManagersProcessDict&quot;</span><span class="p">:{},</span> <span class="c1"># The key of the Process is (mAgentHostNameStr.upper(), mAgentUserNameStr.upper(), mProcessNameWOExeStr.upper())</span>
<span class="s2">&quot;ProcessorDict&quot;</span><span class="p">:</span> <span class="p">{</span> <span class="c1"># Has been changed. New general processor (one threaded) v.1.2.0</span>
<span class="s2">&quot;ActivityList&quot;</span><span class="p">:</span> <span class="p">[</span> <span class="c1"># List of the activities</span>
<span class="c1"># {</span>
@ -349,6 +354,7 @@
<span class="s2">&quot;ThreadIdInt&quot;</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span> <span class="c1"># Technical field - will be setup when processor init</span>
<span class="s2">&quot;WarningExecutionMoreThanSecFloat&quot;</span><span class="p">:</span> <span class="mf">60.0</span> <span class="c1"># Push warning if execution more than n seconds</span>
<span class="p">},</span>
<span class="c1"># TODO REMOVE DEPRECATED KEYS IN v.2.0.0</span>
<span class="s2">&quot;ControlPanelDict&quot;</span><span class="p">:</span> <span class="p">{</span> <span class="c1"># Old structure &gt; CPDict</span>
<span class="s2">&quot;RefreshSeconds&quot;</span><span class="p">:</span> <span class="mi">5</span><span class="p">,</span> <span class="c1"># deprecated parameter</span>
<span class="s2">&quot;RobotList&quot;</span><span class="p">:</span> <span class="p">[</span>
@ -358,6 +364,7 @@
<span class="c1">#}</span>
<span class="p">]</span>
<span class="p">},</span>
<span class="c1"># TODO REMOVE DEPRECATED KEYS IN v.2.0.0</span>
<span class="s2">&quot;CPDict&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="c1"># &quot;CPKey&quot;: {&quot;HTMLRenderDef&quot;:None, &quot;JSONGeneratorDef&quot;:None, &quot;JSInitGeneratorDef&quot;:None}</span>
<span class="p">},</span>
@ -481,7 +488,8 @@
<span class="s2">&quot;RestartOrchestratorBool&quot;</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span> <span class="c1"># Restart orchestrator activity</span>
<span class="s2">&quot;RestartOrchestratorGITPullBool&quot;</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span> <span class="c1"># Turn off (RDP remember) orc + git pull + Turn on (rdp remember)</span>
<span class="s2">&quot;RestartPCBool&quot;</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span> <span class="c1"># Send CMD to restart pc</span>
<span class="s2">&quot;NothingBool&quot;</span><span class="p">:</span><span class="kc">True</span> <span class="c1"># USe option if you dont want to give some access to the RDP controls</span>
<span class="s2">&quot;NothingBool&quot;</span><span class="p">:</span><span class="kc">True</span><span class="p">,</span> <span class="c1"># USe option if you dont want to give some access to the RDP controls</span>
<span class="s2">&quot;Debugging&quot;</span><span class="p">:</span><span class="kc">True</span> <span class="c1"># Debugging tool</span>
<span class="p">},</span>
<span class="s2">&quot;ActivityDict&quot;</span><span class="p">:</span> <span class="p">{</span> <span class="c1"># Empty dict - all access</span>
<span class="s2">&quot;ActivityListExecuteBool&quot;</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span> <span class="c1"># Execute activity at the current thread</span>
@ -511,7 +519,7 @@
<span class="c1"># inModeStr:</span>
<span class="c1"># &quot;BASIC&quot; - create standart configuration</span>
<span class="kn">from</span> <span class="nn">pyOpenRPA.Orchestrator.Utils</span> <span class="kn">import</span> <span class="n">LoggerHandlerDumpLogList</span>
<span class="k">def</span> <span class="nf">Create</span><span class="p">(</span><span class="n">inModeStr</span><span class="o">=</span><span class="s2">&quot;BASIC&quot;</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">Create</span><span class="p">(</span><span class="n">inModeStr</span><span class="o">=</span><span class="s2">&quot;BASIC&quot;</span><span class="p">,</span> <span class="n">inLoggerLevel</span> <span class="o">=</span> <span class="kc">None</span><span class="p">):</span>
<span class="k">if</span> <span class="n">inModeStr</span><span class="o">==</span><span class="s2">&quot;BASIC&quot;</span><span class="p">:</span>
<span class="n">lResult</span> <span class="o">=</span> <span class="n">__Create__</span><span class="p">()</span> <span class="c1"># Create settings</span>
<span class="c1"># Создать файл логирования</span>
@ -521,28 +529,32 @@
<span class="c1">##########################</span>
<span class="c1"># Подготовка логгера Robot</span>
<span class="c1">#########################</span>
<span class="n">mRobotLogger</span> <span class="o">=</span> <span class="n">lResult</span><span class="p">[</span><span class="s2">&quot;Logger&quot;</span><span class="p">]</span>
<span class="n">mRobotLogger</span><span class="o">.</span><span class="n">setLevel</span><span class="p">(</span><span class="n">logging</span><span class="o">.</span><span class="n">INFO</span><span class="p">)</span>
<span class="c1"># create the logging file handler</span>
<span class="n">mRobotLoggerFH</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">FileHandler</span><span class="p">(</span>
<span class="s2">&quot;Reports</span><span class="se">\\</span><span class="s2">&quot;</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="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s2">&quot;%Y_%m_</span><span class="si">%d</span><span class="s2">&quot;</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;.log&quot;</span><span class="p">)</span>
<span class="n">mRobotLoggerFormatter</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">Formatter</span><span class="p">(</span><span class="s1">&#39;</span><span class="si">%(asctime)s</span><span class="s1"> - </span><span class="si">%(levelname)s</span><span class="s1"> - </span><span class="si">%(message)s</span><span class="s1">&#39;</span><span class="p">)</span>
<span class="n">mRobotLoggerFH</span><span class="o">.</span><span class="n">setFormatter</span><span class="p">(</span><span class="n">mRobotLoggerFormatter</span><span class="p">)</span>
<span class="c1"># add handler to logger object</span>
<span class="n">mRobotLogger</span><span class="o">.</span><span class="n">addHandler</span><span class="p">(</span><span class="n">mRobotLoggerFH</span><span class="p">)</span>
<span class="c1">####################Add console output</span>
<span class="n">handler</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">StreamHandler</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">stdout</span><span class="p">)</span>
<span class="n">handler</span><span class="o">.</span><span class="n">setFormatter</span><span class="p">(</span><span class="n">mRobotLoggerFormatter</span><span class="p">)</span>
<span class="n">mRobotLogger</span><span class="o">.</span><span class="n">addHandler</span><span class="p">(</span><span class="n">handler</span><span class="p">)</span>
<span class="c1">############################################</span>
<span class="n">LoggerDumpLogHandlerAdd</span><span class="p">(</span><span class="n">inLogger</span><span class="o">=</span><span class="n">mRobotLogger</span><span class="p">,</span> <span class="n">inGSettingsClientDict</span><span class="o">=</span><span class="n">lResult</span><span class="p">[</span><span class="s2">&quot;Client&quot;</span><span class="p">])</span>
<span class="c1">#mHandlerDumpLogList = LoggerHandlerDumpLogList.LoggerHandlerDumpLogList(inDict=lResult[&quot;Client&quot;],</span>
<span class="c1"># inKeyStr=&quot;DumpLogList&quot;,</span>
<span class="c1"># inHashKeyStr=&quot;DumpLogListHashStr&quot;,</span>
<span class="c1"># inRowCountInt=lResult[&quot;Client&quot;][</span>
<span class="c1"># &quot;DumpLogListCountInt&quot;])</span>
<span class="c1">#mHandlerDumpLogList.setFormatter(mRobotLoggerFormatter)</span>
<span class="c1">#mRobotLogger.addHandler(mHandlerDumpLogList)</span>
<span class="k">if</span> <span class="n">inLoggerLevel</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="n">inLoggerLevel</span><span class="o">=</span><span class="n">logging</span><span class="o">.</span><span class="n">INFO</span>
<span class="n">lL</span> <span class="o">=</span> <span class="n">lResult</span><span class="p">[</span><span class="s2">&quot;Logger&quot;</span><span class="p">]</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">lL</span><span class="o">.</span><span class="n">handlers</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
<span class="n">lL</span><span class="o">.</span><span class="n">setLevel</span><span class="p">(</span><span class="n">logging</span><span class="o">.</span><span class="n">INFO</span><span class="p">)</span>
<span class="c1"># create the logging file handler</span>
<span class="n">mRobotLoggerFH</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">FileHandler</span><span class="p">(</span>
<span class="s2">&quot;Reports</span><span class="se">\\</span><span class="s2">&quot;</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="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s2">&quot;%Y_%m_</span><span class="si">%d</span><span class="s2">&quot;</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;.log&quot;</span><span class="p">)</span>
<span class="n">mRobotLoggerFormatter</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">Formatter</span><span class="p">(</span><span class="s1">&#39;</span><span class="si">%(asctime)s</span><span class="s1"> - </span><span class="si">%(levelname)s</span><span class="s1"> - </span><span class="si">%(message)s</span><span class="s1">&#39;</span><span class="p">)</span>
<span class="n">mRobotLoggerFH</span><span class="o">.</span><span class="n">setFormatter</span><span class="p">(</span><span class="n">mRobotLoggerFormatter</span><span class="p">)</span>
<span class="c1"># add handler to logger object</span>
<span class="n">lL</span><span class="o">.</span><span class="n">addHandler</span><span class="p">(</span><span class="n">mRobotLoggerFH</span><span class="p">)</span>
<span class="c1">####################Add console output</span>
<span class="n">handler</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">StreamHandler</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">stdout</span><span class="p">)</span>
<span class="n">handler</span><span class="o">.</span><span class="n">setFormatter</span><span class="p">(</span><span class="n">mRobotLoggerFormatter</span><span class="p">)</span>
<span class="n">lL</span><span class="o">.</span><span class="n">addHandler</span><span class="p">(</span><span class="n">handler</span><span class="p">)</span>
<span class="c1">############################################</span>
<span class="n">LoggerDumpLogHandlerAdd</span><span class="p">(</span><span class="n">inLogger</span><span class="o">=</span><span class="n">lL</span><span class="p">,</span> <span class="n">inGSettingsClientDict</span><span class="o">=</span><span class="n">lResult</span><span class="p">[</span><span class="s2">&quot;Client&quot;</span><span class="p">])</span>
<span class="c1">#mHandlerDumpLogList = LoggerHandlerDumpLogList.LoggerHandlerDumpLogList(inDict=lResult[&quot;Client&quot;],</span>
<span class="c1"># inKeyStr=&quot;DumpLogList&quot;,</span>
<span class="c1"># inHashKeyStr=&quot;DumpLogListHashStr&quot;,</span>
<span class="c1"># inRowCountInt=lResult[&quot;Client&quot;][</span>
<span class="c1"># &quot;DumpLogListCountInt&quot;])</span>
<span class="c1">#mHandlerDumpLogList.setFormatter(mRobotLoggerFormatter)</span>
<span class="c1">#mRobotLogger.addHandler(mHandlerDumpLogList)</span>
<span class="k">else</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">warning</span><span class="p">(</span><span class="s2">&quot;Pay attention! Your code has been call SettingsTemplate.Create - since pyOpenRPA v1.2.7 GSettings is creating automatically&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="n">lResult</span> <span class="c1"># return the result dict</span>
</pre></div>
</div>

@ -111,6 +111,7 @@
<li class="toctree-l1"><a class="reference internal" href="03_gSettingsTemplate.html">3. gSettings Template</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">4. How to use</a></li>
<li class="toctree-l1"><a class="reference internal" href="05_UAC.html">5. UAC - User Access Control</a></li>
<li class="toctree-l1"><a class="reference internal" href="06_Defs%20Managers.html">6. Defs Managers</a></li>
</ul>
<p class="caption"><span class="caption-text">AGENT</span></p>
<ul>
@ -209,7 +210,8 @@
<span class="n">Orchestrator</span><span class="o">.</span><span class="n">OrchestratorRerunAsAdmin</span><span class="p">()</span>
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Orchestrator will be run as administrator!&quot;</span><span class="p">)</span>
<span class="k">elif</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s2">&quot;__main__&quot;</span><span class="p">:</span> <span class="c1"># New init way - allow run as module -m PyOpenRPA.Orchestrator</span>
<span class="n">gSettings</span> <span class="o">=</span> <span class="n">SettingsTemplate</span><span class="o">.</span><span class="n">Create</span><span class="p">(</span><span class="n">inModeStr</span><span class="o">=</span><span class="s2">&quot;BASIC&quot;</span><span class="p">)</span> <span class="c1"># Create GSettings with basic configuration - no more config is available from the box - you can create own</span>
<span class="n">gSettings</span> <span class="o">=</span> <span class="n">Orchestrator</span><span class="o">.</span><span class="n">GSettingsGet</span><span class="p">()</span>
<span class="c1">#gSettings = SettingsTemplate.Create(inModeStr=&quot;BASIC&quot;) # Create GSettings with basic configuration - no more config is available from the box - you can create own</span>
<span class="c1"># TEST Add User ND - Add Login ND to superuser of the Orchestrator</span>
<span class="n">lUACClientDict</span> <span class="o">=</span> <span class="n">SettingsTemplate</span><span class="o">.</span><span class="n">__UACClientAdminCreate__</span><span class="p">()</span>
@ -218,47 +220,12 @@
<span class="n">Orchestrator</span><span class="o">.</span><span class="n">UACUpdate</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">inADLoginStr</span><span class="o">=</span><span class="s2">&quot;IMaslov&quot;</span><span class="p">,</span> <span class="n">inADStr</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="n">inADIsDefaultBool</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">inURLList</span><span class="o">=</span><span class="p">[])</span>
<span class="c1"># TEST Add Supertoken for the all access between robots</span>
<span class="n">Orchestrator</span><span class="o">.</span><span class="n">UACSuperTokenUpdate</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">inSuperTokenStr</span><span class="o">=</span><span class="s2">&quot;1992-04-03-0643-ru-b4ff-openrpa52zzz&quot;</span><span class="p">)</span>
<span class="c1"># Add first interface!</span>
<span class="n">Orchestrator</span><span class="o">.</span><span class="n">WebListenCreate</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="c1"># Restore DUMP</span>
<span class="n">Orchestrator</span><span class="o">.</span><span class="n">OrchestratorSessionRestore</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="c1"># INFO Relative/Absolute import see below - after settings init</span>
<span class="c1"># Template for import CP - Control Panels</span>
<span class="c1"># ATTENTION - Pay attention to CP names! Orchestrator is one for the all control panels per one machine</span>
<span class="c1">## !!! For Absolute import control panels !!!</span>
<span class="c1"># try:</span>
<span class="c1"># sys.path.insert(0,os.path.abspath(os.path.join(r&quot;..\ROBOT\Builds&quot;)))</span>
<span class="c1"># import pyRobot_CP</span>
<span class="c1"># pyRobot_CP.SettingsUpdate(inGSettings=gSettings)</span>
<span class="c1"># except Exception as e:</span>
<span class="c1"># gSettings[&quot;Logger&quot;].exception(f&quot;Exception when init CP. See below.&quot;)</span>
<span class="c1">## !!! For Relative import control panels !!!</span>
<span class="c1"># try:</span>
<span class="c1"># sys.path.insert(0,os.path.abspath(os.path.join(r&quot;..\ROBOT\Builds&quot;)))</span>
<span class="c1"># from pyRobot_CP import ControlPanel</span>
<span class="c1"># ControlPanel.SettingsUpdate(inGSettings=gSettings)</span>
<span class="c1"># except Exception as e:</span>
<span class="c1"># gSettings[&quot;Logger&quot;].exception(f&quot;Exception when init CP. See below.&quot;)</span>
<span class="c1">## !!! For Relative import !!! CP Version Check</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">sys</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">insert</span><span class="p">(</span><span class="mi">0</span><span class="p">,</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="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="sa">r</span><span class="s2">&quot;&quot;</span><span class="p">)))</span>
<span class="kn">from</span> <span class="nn">ControlPanel</span> <span class="kn">import</span> <span class="n">CP_VersionCheck</span>
<span class="n">CP_VersionCheck</span><span class="o">.</span><span class="n">SettingsUpdate</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="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">gSettings</span><span class="p">[</span><span class="s2">&quot;Logger&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">exception</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Exception when init CP. See below.&quot;</span><span class="p">)</span>
<span class="k">try</span><span class="p">:</span>
<span class="kn">from</span> <span class="nn">ControlPanel</span> <span class="kn">import</span> <span class="n">CP_Test</span>
<span class="n">CP_Test</span><span class="o">.</span><span class="n">SettingsUpdate</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="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">gSettings</span><span class="p">[</span><span class="s2">&quot;Logger&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">exception</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Exception when init CP. See below.&quot;</span><span class="p">)</span>
<span class="c1"># Autoinit control panels starts with CP_</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="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="k">else</span><span class="p">:</span>

@ -40,7 +40,7 @@
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="2. Defs" href="../Agent/02_Defs.html" />
<link rel="next" title="6. Defs Managers" href="06_Defs%20Managers.html" />
<link rel="prev" title="4. How to use" href="04_HowToUse.html" />
</head>
@ -115,6 +115,7 @@
<li class="toctree-l2"><a class="reference internal" href="#uac-dict-for-orchestrator-web-ui-rights">UAC Dict for Orchestrator WEB UI rights</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="06_Defs%20Managers.html">6. Defs Managers</a></li>
</ul>
<p class="caption"><span class="caption-text">AGENT</span></p>
<ul>
@ -242,7 +243,7 @@
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="../Agent/02_Defs.html" class="btn btn-neutral float-right" title="2. Defs" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="06_Defs%20Managers.html" class="btn btn-neutral float-right" title="6. Defs Managers" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="04_HowToUse.html" class="btn btn-neutral float-left" title="4. How to use" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
</div>

File diff suppressed because it is too large Load Diff

@ -111,6 +111,7 @@
<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>

@ -114,6 +114,7 @@
<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>

@ -140,6 +140,7 @@
<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>

@ -111,6 +111,7 @@
<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>

@ -111,6 +111,7 @@
<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>

@ -134,6 +134,7 @@
<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>

@ -109,6 +109,7 @@
<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>
@ -178,6 +179,8 @@
<h1>All modules for which code is available</h1>
<ul><li><a href="pyOpenRPA/Agent/__Agent__.html">pyOpenRPA.Agent.__Agent__</a></li>
<li><a href="pyOpenRPA/Orchestrator/Managers/ControlPanel.html">pyOpenRPA.Orchestrator.Managers.ControlPanel</a></li>
<li><a href="pyOpenRPA/Orchestrator/Managers/Process.html">pyOpenRPA.Orchestrator.Managers.Process</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/Robot/UIDesktop.html">pyOpenRPA.Robot.UIDesktop</a></li>

@ -109,6 +109,7 @@
<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>

@ -0,0 +1,571 @@
<!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.Orchestrator.Managers.ControlPanel &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>
</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.Orchestrator.Managers.ControlPanel</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.Orchestrator.Managers.ControlPanel</h1><div class="highlight"><pre>
<span></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">jinja2</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">from</span> <span class="nn">inspect</span> <span class="kn">import</span> <span class="n">signature</span> <span class="c1"># For detect count of def args</span>
<span class="kn">from</span> <span class="nn">..Web</span> <span class="kn">import</span> <span class="n">Basic</span>
<span class="kn">import</span> <span class="nn">operator</span>
<span class="kn">import</span> <span class="nn">math</span>
<div class="viewcode-block" id="ControlPanel"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel">[docs]</a><span class="k">class</span> <span class="nc">ControlPanel</span><span class="p">():</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Manage your control panel on the orchestrator</span>
<span class="sd"> Control panel has 3 events types:</span>
<span class="sd"> - onRefreshHTML - run every n (see settings) second to detect changes in HTML control panel.</span>
<span class="sd"> - onRefreshJSON - run every n (see settings) second to detect changes in JSON data container to client side.</span>
<span class="sd"> - onInitJS - run when client reload the Orchestrator web page</span>
<span class="sd"> .. code-block:: python</span>
<span class="sd"> # Usage example:</span>
<span class="sd"> lCPManager = Orchestrator.Managers.ControlPanel(inControlPanelNameStr=&quot;TestControlPanel&quot;,</span>
<span class="sd"> inRefreshHTMLJinja2TemplatePathStr=&quot;ControlPanel\\test.html&quot;, inJinja2TemplateRefreshBool = True)</span>
<span class="sd"> If you use Jinja2 you can use next data context:</span>
<span class="sd"> StorageRobotDict: Orchestrator.StorageRobotGet(inRobotNameStr=self.mRobotNameStr),</span>
<span class="sd"> ControlPanelInstance: self,</span>
<span class="sd"> OrchestratorModule:Orchestrator,</span>
<span class="sd"> RequestInstance: inRequest,</span>
<span class="sd"> UserInfoDict: Orchestrator.WebUserInfoGet(inRequest=inRequest),</span>
<span class="sd"> UserUACDict: Orchestrator.UACUserDictGet(inRequest=inRequest),</span>
<span class="sd"> UserUACCheckDef: inRequest.UACClientCheck,</span>
<span class="sd"> EnumerateDef: enumerate,</span>
<span class="sd"> OperatorModule: operator,</span>
<span class="sd"> MathModule: math</span>
<span class="sd"> .. code-block:: html</span>
<span class="sd"> Hello my control panel!</span>
<span class="sd"> You can use any def from Orchestrator module here in Jinja2 HTML template:</span>
<span class="sd"> Example: OrchestratorModule.OSCMD(inCMDStr=&quot;notepad&quot;)</span>
<span class="sd"> {{MathModule.pi}}</span>
<span class="sd"> {% if UserInfoDict[&#39;UserNameUpperStr&#39;]==&quot;ND&quot; %}</span>
<span class="sd"> YES - IT IS ND</span>
<span class="sd"> {% endif %}</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">mControlPanelNameStr</span> <span class="o">=</span> <span class="kc">None</span>
<span class="c1"># Jinja2 consolidated</span>
<span class="n">mJinja2TemplateRefreshBool</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mJinja2DataUpdateDict</span> <span class="o">=</span> <span class="kc">None</span>
<span class="c1"># RefreshHTML block</span>
<span class="n">mRefreshHTMLJinja2TemplatePathStr</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mRefreshHTMLJinja2TemplateFileNameStr</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mRefreshHTMLJinja2Loader</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mRefreshHTMLJinja2Env</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mRefreshHTMLJinja2Template</span> <span class="o">=</span> <span class="kc">None</span>
<span class="c1"># InitJS block</span>
<span class="n">mInitJSJinja2TemplatePathStr</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mInitJSJinja2TemplateFileNameStr</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mInitJSJinja2Loader</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mInitJSJinja2Env</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mInitJSJinja2Template</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mBackwardCompatibilityHTMLDef</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mBackwardCompatibilityJSDef</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mBackwardCompatibilityJSONDef</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mRobotNameStr</span> <span class="o">=</span> <span class="kc">None</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">inControlPanelNameStr</span><span class="p">,</span> <span class="n">inRefreshHTMLJinja2TemplatePathStr</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="n">inJinja2TemplateRefreshBool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">,</span> <span class="n">inRobotNameStr</span> <span class="o">=</span> <span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Constructor of the control panel manager</span>
<span class="sd"> :param inControlPanelNameStr:</span>
<span class="sd"> :param inJinja2TemplatePathStr:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="c1"># Connect self witch pyOpenRPA via ControlPanelNameStr</span>
<span class="k">if</span> <span class="n">inControlPanelNameStr</span> <span class="ow">in</span> <span class="n">Orchestrator</span><span class="o">.</span><span class="n">GSettingsGet</span><span class="p">()[</span><span class="s2">&quot;ServerDict&quot;</span><span class="p">][</span><span class="s2">&quot;ControlPanelDict&quot;</span><span class="p">]:</span>
<span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Another control panel with name </span><span class="si">{</span><span class="n">inControlPanelNameStr</span><span class="si">}</span><span class="s2"> is already exists. Please resolve the error and restart&quot;</span><span class="p">)</span>
<span class="n">Orchestrator</span><span class="o">.</span><span class="n">GSettingsGet</span><span class="p">()[</span><span class="s2">&quot;ServerDict&quot;</span><span class="p">][</span><span class="s2">&quot;ControlPanelDict&quot;</span><span class="p">][</span><span class="n">inControlPanelNameStr</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span>
<span class="bp">self</span><span class="o">.</span><span class="n">RefreshHTMLJinja2TemplatePathSet</span><span class="p">(</span><span class="n">inJinja2TemplatePathStr</span> <span class="o">=</span> <span class="n">inRefreshHTMLJinja2TemplatePathStr</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mJinja2TemplateRefreshBool</span> <span class="o">=</span> <span class="n">inJinja2TemplateRefreshBool</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mControlPanelNameStr</span> <span class="o">=</span> <span class="n">inControlPanelNameStr</span> <span class="c1"># Set the name of the control panel</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mRobotNameStr</span> <span class="o">=</span> <span class="n">inRobotNameStr</span> <span class="c1"># Set the robot name for robot it execute</span>
<div class="viewcode-block" id="ControlPanel.Jinja2DataUpdateDictSet"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.Jinja2DataUpdateDictSet">[docs]</a> <span class="k">def</span> <span class="nf">Jinja2DataUpdateDictSet</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inJinja2DataUpdateDict</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Set the data dict from the Jinja2 context (you can add some new params)</span>
<span class="sd"> :param inJinja2DataUpdateDict: dict, which will be appended to main data context</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">mJinja2DataUpdateDict</span> <span class="o">=</span> <span class="n">inJinja2DataUpdateDict</span></div>
<div class="viewcode-block" id="ControlPanel.RefreshHTMLJinja2TemplatePathSet"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.RefreshHTMLJinja2TemplatePathSet">[docs]</a> <span class="k">def</span> <span class="nf">RefreshHTMLJinja2TemplatePathSet</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inJinja2TemplatePathStr</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Create Jinja2 env and load the template html</span>
<span class="sd"> :param inJinja2TemplatePathStr:</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">try</span><span class="p">:</span>
<span class="k">if</span> <span class="n">inJinja2TemplatePathStr</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">lSystemLoaderPathStr</span> <span class="o">=</span> <span class="s2">&quot;/&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">inJinja2TemplatePathStr</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">&quot;</span><span class="se">\\</span><span class="s2">&quot;</span><span class="p">)[</span><span class="mi">0</span><span class="p">:</span><span class="o">-</span><span class="mi">1</span><span class="p">])</span>
<span class="n">lTemplateFileNameStr</span> <span class="o">=</span> <span class="n">inJinja2TemplatePathStr</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">&quot;</span><span class="se">\\</span><span class="s2">&quot;</span><span class="p">)[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mRefreshHTMLJinja2TemplateFileNameStr</span> <span class="o">=</span> <span class="n">lTemplateFileNameStr</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mRefreshHTMLJinja2Loader</span> <span class="o">=</span> <span class="n">jinja2</span><span class="o">.</span><span class="n">FileSystemLoader</span><span class="p">(</span><span class="n">lSystemLoaderPathStr</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mRefreshHTMLJinja2Env</span> <span class="o">=</span> <span class="n">jinja2</span><span class="o">.</span><span class="n">Environment</span><span class="p">(</span><span class="n">loader</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">mRefreshHTMLJinja2Loader</span><span class="p">,</span> <span class="n">trim_blocks</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">mRefreshHTMLJinja2Template</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mRefreshHTMLJinja2Env</span><span class="o">.</span><span class="n">get_template</span><span class="p">(</span><span class="n">lTemplateFileNameStr</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="n">Orchestrator</span><span class="o">.</span><span class="n">OrchestratorLoggerGet</span><span class="p">()</span><span class="o">.</span><span class="n">exception</span><span class="p">(</span><span class="s2">&quot;EXCEPTION WHEN INIT Jinja2&quot;</span><span class="p">)</span></div>
<div class="viewcode-block" id="ControlPanel.RefreshHTMLJinja2StrGenerate"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.RefreshHTMLJinja2StrGenerate">[docs]</a> <span class="k">def</span> <span class="nf">RefreshHTMLJinja2StrGenerate</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inDataDict</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Generate the HTML str from the Jinja2. Pass the context inDataDict</span>
<span class="sd"> :param inDataDict:</span>
<span class="sd"> :return:</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">mJinja2TemplateRefreshBool</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">mRefreshHTMLJinja2Template</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mRefreshHTMLJinja2Env</span><span class="o">.</span><span class="n">get_template</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mRefreshHTMLJinja2TemplateFileNameStr</span><span class="p">)</span>
<span class="n">lHTMLStr</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mRefreshHTMLJinja2Template</span><span class="o">.</span><span class="n">render</span><span class="p">(</span><span class="o">**</span><span class="n">inDataDict</span><span class="p">)</span> <span class="c1"># Render the template into str</span>
<span class="k">return</span> <span class="n">lHTMLStr</span></div>
<div class="viewcode-block" id="ControlPanel.InitJSJinja2TemplatePathSet"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.InitJSJinja2TemplatePathSet">[docs]</a> <span class="k">def</span> <span class="nf">InitJSJinja2TemplatePathSet</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inJinja2TemplatePathStr</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Create Jinja2 env and load the template html</span>
<span class="sd"> :param inJinja2TemplatePathStr:</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">try</span><span class="p">:</span>
<span class="k">if</span> <span class="n">inJinja2TemplatePathStr</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">lSystemLoaderPathStr</span> <span class="o">=</span> <span class="s2">&quot;/&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">inJinja2TemplatePathStr</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">&quot;</span><span class="se">\\</span><span class="s2">&quot;</span><span class="p">)[</span><span class="mi">0</span><span class="p">:</span><span class="o">-</span><span class="mi">1</span><span class="p">])</span>
<span class="n">lTemplateFileNameStr</span> <span class="o">=</span> <span class="n">inJinja2TemplatePathStr</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">&quot;</span><span class="se">\\</span><span class="s2">&quot;</span><span class="p">)[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mInitJSJinja2TemplateFileNameStr</span> <span class="o">=</span> <span class="n">lTemplateFileNameStr</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mInitJSJinja2Loader</span> <span class="o">=</span> <span class="n">jinja2</span><span class="o">.</span><span class="n">FileSystemLoader</span><span class="p">(</span><span class="n">lSystemLoaderPathStr</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mInitJSJinja2Env</span> <span class="o">=</span> <span class="n">jinja2</span><span class="o">.</span><span class="n">Environment</span><span class="p">(</span><span class="n">loader</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">mInitJSJinja2Loader</span><span class="p">,</span> <span class="n">trim_blocks</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">mInitJSJinja2Template</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mInitJSJinja2Env</span><span class="o">.</span><span class="n">get_template</span><span class="p">(</span><span class="n">lTemplateFileNameStr</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="n">Orchestrator</span><span class="o">.</span><span class="n">OrchestratorLoggerGet</span><span class="p">()</span><span class="o">.</span><span class="n">exception</span><span class="p">(</span><span class="s2">&quot;EXCEPTION WHEN INIT Jinja2&quot;</span><span class="p">)</span></div>
<div class="viewcode-block" id="ControlPanel.InitJSJinja2StrGenerate"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.InitJSJinja2StrGenerate">[docs]</a> <span class="k">def</span> <span class="nf">InitJSJinja2StrGenerate</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inDataDict</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Generate the HTML str from the Jinja2. Pass the context inDataDict</span>
<span class="sd"> :param inDataDict:</span>
<span class="sd"> :return:</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">mJinja2TemplateRefreshBool</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">mInitJSJinja2Template</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mInitJSJinja2Env</span><span class="o">.</span><span class="n">get_template</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mInitJSJinja2TemplateFileNameStr</span><span class="p">)</span>
<span class="n">lHTMLStr</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mInitJSJinja2Template</span><span class="o">.</span><span class="n">render</span><span class="p">(</span><span class="o">**</span><span class="n">inDataDict</span><span class="p">)</span> <span class="c1"># Render the template into str</span>
<span class="k">return</span> <span class="n">lHTMLStr</span></div>
<div class="viewcode-block" id="ControlPanel.DataDictGenerate"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.DataDictGenerate">[docs]</a> <span class="k">def</span> <span class="nf">DataDictGenerate</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inRequest</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> :param inRequest: request handler (from http.server import BaseHTTPRequestHandler)</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lData</span> <span class="o">=</span> <span class="p">{</span>
<span class="s2">&quot;StorageRobotDict&quot;</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
<span class="s2">&quot;ControlPanelInstance&quot;</span><span class="p">:</span><span class="bp">self</span><span class="p">,</span>
<span class="s2">&quot;OrchestratorModule&quot;</span><span class="p">:</span><span class="n">Orchestrator</span><span class="p">,</span>
<span class="s2">&quot;RequestInstance&quot;</span><span class="p">:</span> <span class="n">inRequest</span><span class="p">,</span>
<span class="s2">&quot;UserInfoDict&quot;</span><span class="p">:</span> <span class="n">Orchestrator</span><span class="o">.</span><span class="n">WebUserInfoGet</span><span class="p">(</span><span class="n">inRequest</span><span class="o">=</span><span class="n">inRequest</span><span class="p">),</span>
<span class="s2">&quot;UserUACDict&quot;</span><span class="p">:</span> <span class="n">Orchestrator</span><span class="o">.</span><span class="n">UACUserDictGet</span><span class="p">(</span><span class="n">inRequest</span><span class="o">=</span><span class="n">inRequest</span><span class="p">),</span>
<span class="s2">&quot;UserUACCheckDef&quot;</span><span class="p">:</span> <span class="n">inRequest</span><span class="o">.</span><span class="n">UACClientCheck</span><span class="p">,</span>
<span class="s2">&quot;EnumerateDef&quot;</span><span class="p">:</span> <span class="nb">enumerate</span><span class="p">,</span>
<span class="s2">&quot;OperatorModule&quot;</span><span class="p">:</span> <span class="n">operator</span><span class="p">,</span>
<span class="s2">&quot;MathModule&quot;</span><span class="p">:</span> <span class="n">math</span>
<span class="p">}</span>
<span class="c1"># Get the robot storage by the robot name (if you set robot name when init)</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mRobotNameStr</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">lData</span><span class="p">[</span><span class="s2">&quot;StorageRobotDict&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">Orchestrator</span><span class="o">.</span><span class="n">StorageRobotGet</span><span class="p">(</span><span class="n">inRobotNameStr</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">mRobotNameStr</span><span class="p">)</span>
<span class="c1"># Checkj Jinja2DataUpdateDict</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mJinja2DataUpdateDict</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">lData</span><span class="o">.</span><span class="n">update</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mJinja2DataUpdateDict</span><span class="p">)</span>
<span class="k">return</span> <span class="n">lData</span></div>
<div class="viewcode-block" id="ControlPanel.OnRefreshHTMLStr"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.OnRefreshHTMLStr">[docs]</a> <span class="k">def</span> <span class="nf">OnRefreshHTMLStr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inRequest</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Event to generate HTML code of the control panel when refresh time is over.</span>
<span class="sd"> Support backward compatibility for previous versions.</span>
<span class="sd"> :param inRequest: request handler (from http.server import BaseHTTPRequestHandler)</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lHTMLStr</span> <span class="o">=</span> <span class="kc">None</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="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mBackwardCompatibilityHTMLDef</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mRefreshHTMLJinja2Template</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="ow">or</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mJinja2TemplateRefreshBool</span> <span class="o">==</span> <span class="kc">True</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">mRefreshHTMLJinja2TemplateFileNameStr</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">):</span>
<span class="n">lDataDict</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">OnRefreshHTMLDataDict</span><span class="p">(</span><span class="n">inRequest</span> <span class="o">=</span> <span class="n">inRequest</span><span class="p">)</span>
<span class="c1"># Jinja code</span>
<span class="n">lHTMLStr</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">RefreshHTMLJinja2StrGenerate</span><span class="p">(</span><span class="n">inDataDict</span><span class="o">=</span><span class="n">lDataDict</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">lHTMLStr</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">BackwardAdapterHTMLDef</span><span class="p">(</span><span class="n">inRequest</span><span class="o">=</span><span class="n">inRequest</span><span class="p">)</span>
<span class="c1"># return the str</span>
<span class="k">return</span> <span class="n">lHTMLStr</span></div>
<div class="viewcode-block" id="ControlPanel.OnRefreshHTMLDataDict"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.OnRefreshHTMLDataDict">[docs]</a> <span class="k">def</span> <span class="nf">OnRefreshHTMLDataDict</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inRequest</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Event to prepare data context for the futher Jinja2 HTML generation. You can override this def if you want some thing more data</span>
<span class="sd"> :param inRequest: request handler (from http.server import BaseHTTPRequestHandler)</span>
<span class="sd"> :return: dict</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">DataDictGenerate</span><span class="p">(</span><span class="n">inRequest</span><span class="o">=</span><span class="n">inRequest</span><span class="p">)</span></div>
<div class="viewcode-block" id="ControlPanel.OnRefreshHTMLHashStr"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.OnRefreshHTMLHashStr">[docs]</a> <span class="k">def</span> <span class="nf">OnRefreshHTMLHashStr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inRequest</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Generate the hash the result output HTML. You can override this function if you know how to optimize HTML rendering.</span>
<span class="sd"> TODO NEED TO MODIFY ServerSettings to work with Hash because of all defs are need do use Hash</span>
<span class="sd"> :param inRequest: request handler (from http.server import BaseHTTPRequestHandler)</span>
<span class="sd"> :return: None - default, hash function is not determined. Str - hash function is working on!</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="kc">None</span></div>
<div class="viewcode-block" id="ControlPanel.OnRefreshJSONDict"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.OnRefreshJSONDict">[docs]</a> <span class="k">def</span> <span class="nf">OnRefreshJSONDict</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inRequest</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Event to transmit some data from server side to the client side in JSON format. Call when page refresh is initialized</span>
<span class="sd"> :param inRequest: request handler (from http.server import BaseHTTPRequestHandler)</span>
<span class="sd"> :return: Dict type</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lResultDict</span> <span class="o">=</span> <span class="kc">None</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mBackwardCompatibilityJSONDef</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">pass</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">lResultDict</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">BackwardAdapterJSONDef</span><span class="p">(</span><span class="n">inRequest</span><span class="o">=</span><span class="n">inRequest</span><span class="p">)</span>
<span class="k">return</span> <span class="n">lResultDict</span></div>
<div class="viewcode-block" id="ControlPanel.OnInitJSStr"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.OnInitJSStr">[docs]</a> <span class="k">def</span> <span class="nf">OnInitJSStr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inRequest</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Event when orchestrator web page is init on the client side - you can transmit some java script code is str type to execute it once.</span>
<span class="sd"> :param inRequest: request handler (from http.server import BaseHTTPRequestHandler)</span>
<span class="sd"> :return: &quot;&quot;</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lJSStr</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mBackwardCompatibilityJSDef</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mInitJSJinja2Template</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="ow">or</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mJinja2TemplateRefreshBool</span> <span class="o">==</span> <span class="kc">True</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">mInitJSJinja2TemplateFileNameStr</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">):</span>
<span class="n">lDataDict</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">OnInitJSDataDict</span><span class="p">(</span><span class="n">inRequest</span> <span class="o">=</span> <span class="n">inRequest</span><span class="p">)</span>
<span class="c1"># Jinja code</span>
<span class="n">lJSStr</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">InitJSJinja2StrGenerate</span><span class="p">(</span><span class="n">inDataDict</span><span class="o">=</span><span class="n">lDataDict</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">lJSStr</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">BackwardAdapterJSDef</span><span class="p">(</span><span class="n">inRequest</span><span class="o">=</span><span class="n">inRequest</span><span class="p">)</span>
<span class="k">return</span> <span class="n">lJSStr</span></div>
<div class="viewcode-block" id="ControlPanel.OnInitJSDataDict"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.ControlPanel.ControlPanel.OnInitJSDataDict">[docs]</a> <span class="k">def</span> <span class="nf">OnInitJSDataDict</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inRequest</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Event to prepare data context for the futher Jinja2 JS init generation. You can override this def if you want some thing more data</span>
<span class="sd"> :param inRequest: request handler (from http.server import BaseHTTPRequestHandler)</span>
<span class="sd"> :return: dict</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">DataDictGenerate</span><span class="p">(</span><span class="n">inRequest</span><span class="o">=</span><span class="n">inRequest</span><span class="p">)</span></div>
<span class="k">def</span> <span class="nf">BackwardAdapterHTMLDef</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">inRequest</span><span class="p">):</span>
<span class="n">lGS</span> <span class="o">=</span> <span class="n">Orchestrator</span><span class="o">.</span><span class="n">GSettingsGet</span><span class="p">()</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="c1"># HTMLRenderDef</span>
<span class="n">lItemHTMLRenderDef</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mBackwardCompatibilityHTMLDef</span>
<span class="n">lResultStr</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>
<span class="k">if</span> <span class="n">lItemHTMLRenderDef</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="c1"># Call def (inRequest, inGSettings) or def (inGSettings)</span>
<span class="n">lHTMLResult</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">lDEFSignature</span> <span class="o">=</span> <span class="n">signature</span><span class="p">(</span><span class="n">lItemHTMLRenderDef</span><span class="p">)</span> <span class="c1"># Get signature of the def</span>
<span class="n">lDEFARGLen</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">lDEFSignature</span><span class="o">.</span><span class="n">parameters</span><span class="o">.</span><span class="n">keys</span><span class="p">())</span> <span class="c1"># get count of the def args</span>
<span class="k">try</span><span class="p">:</span>
<span class="k">if</span> <span class="n">lDEFARGLen</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span> <span class="c1"># def (inGSettings)</span>
<span class="n">lHTMLResult</span> <span class="o">=</span> <span class="n">lItemHTMLRenderDef</span><span class="p">(</span><span class="n">lGS</span><span class="p">)</span>
<span class="k">elif</span> <span class="n">lDEFARGLen</span> <span class="o">==</span> <span class="mi">2</span><span class="p">:</span> <span class="c1"># def (inRequest, inGSettings)</span>
<span class="n">lHTMLResult</span> <span class="o">=</span> <span class="n">lItemHTMLRenderDef</span><span class="p">(</span><span class="n">inRequest</span><span class="p">,</span> <span class="n">lGS</span><span class="p">)</span>
<span class="k">elif</span> <span class="n">lDEFARGLen</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span> <span class="c1"># def ()</span>
<span class="n">lHTMLResult</span> <span class="o">=</span> <span class="n">lItemHTMLRenderDef</span><span class="p">()</span>
<span class="c1"># RunFunction</span>
<span class="c1"># Backward compatibility up to 1.2.0 - call HTML generator if result has no &quot;HTMLStr&quot;</span>
<span class="k">if</span> <span class="nb">type</span><span class="p">(</span><span class="n">lHTMLResult</span><span class="p">)</span> <span class="ow">is</span> <span class="nb">str</span><span class="p">:</span>
<span class="n">lResultStr</span> <span class="o">=</span> <span class="n">lHTMLResult</span>
<span class="k">elif</span> <span class="s2">&quot;HTMLStr&quot;</span> <span class="ow">in</span> <span class="n">lHTMLResult</span> <span class="ow">or</span> <span class="s2">&quot;JSONDict&quot;</span> <span class="ow">in</span> <span class="n">lHTMLResult</span><span class="p">:</span>
<span class="n">lResultStr</span> <span class="o">=</span> <span class="n">lHTMLResult</span><span class="p">[</span><span class="s2">&quot;HTMLStr&quot;</span><span class="p">]</span>
<span class="k">else</span><span class="p">:</span>
<span class="c1"># Call backward compatibility HTML generator</span>
<span class="n">lResultStr</span> <span class="o">=</span> <span class="n">Basic</span><span class="o">.</span><span class="n">HTMLControlPanelBC</span><span class="p">(</span><span class="n">inCPDict</span><span class="o">=</span><span class="n">lHTMLResult</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;Error in control panel HTMLRenderDef. CP Key </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mControlPanelNameStr</span><span class="si">}</span><span class="s2">. Exception are below&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="n">lResultStr</span>
<span class="k">def</span> <span class="nf">BackwardAdapterJSONDef</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">inRequest</span><span class="p">):</span>
<span class="n">lGS</span> <span class="o">=</span> <span class="n">Orchestrator</span><span class="o">.</span><span class="n">GSettingsGet</span><span class="p">()</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="c1"># HTMLRenderDef</span>
<span class="n">lItemJSONGeneratorDef</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mBackwardCompatibilityJSONDef</span>
<span class="n">lResultDict</span> <span class="o">=</span> <span class="p">{}</span>
<span class="k">if</span> <span class="n">lItemJSONGeneratorDef</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="c1"># Call def (inRequest, inGSettings) or def (inGSettings)</span>
<span class="n">lJSONResult</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">lDEFSignature</span> <span class="o">=</span> <span class="n">signature</span><span class="p">(</span><span class="n">lItemJSONGeneratorDef</span><span class="p">)</span> <span class="c1"># Get signature of the def</span>
<span class="n">lDEFARGLen</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">lDEFSignature</span><span class="o">.</span><span class="n">parameters</span><span class="o">.</span><span class="n">keys</span><span class="p">())</span> <span class="c1"># get count of the def args</span>
<span class="k">try</span><span class="p">:</span>
<span class="k">if</span> <span class="n">lDEFARGLen</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span> <span class="c1"># def (inGSettings)</span>
<span class="n">lJSONResult</span> <span class="o">=</span> <span class="n">lItemJSONGeneratorDef</span><span class="p">(</span><span class="n">lGS</span><span class="p">)</span>
<span class="k">elif</span> <span class="n">lDEFARGLen</span> <span class="o">==</span> <span class="mi">2</span><span class="p">:</span> <span class="c1"># def (inRequest, inGSettings)</span>
<span class="n">lJSONResult</span> <span class="o">=</span> <span class="n">lItemJSONGeneratorDef</span><span class="p">(</span><span class="n">inRequest</span><span class="p">,</span> <span class="n">lGS</span><span class="p">)</span>
<span class="k">elif</span> <span class="n">lDEFARGLen</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span> <span class="c1"># def ()</span>
<span class="n">lJSONResult</span> <span class="o">=</span> <span class="n">lItemJSONGeneratorDef</span><span class="p">()</span>
<span class="c1"># RunFunction</span>
<span class="c1"># Backward compatibility up to 1.2.0 - call HTML generator if result has no &quot;HTMLStr&quot;</span>
<span class="n">lType</span> <span class="o">=</span> <span class="nb">type</span><span class="p">(</span><span class="n">lJSONResult</span><span class="p">)</span>
<span class="k">if</span> <span class="n">lType</span> <span class="ow">is</span> <span class="nb">str</span> <span class="ow">or</span> <span class="n">lJSONResult</span> <span class="ow">is</span> <span class="kc">None</span> <span class="ow">or</span> <span class="n">lType</span> <span class="ow">is</span> <span class="nb">int</span> <span class="ow">or</span> <span class="n">lType</span> <span class="ow">is</span> <span class="nb">list</span> <span class="ow">or</span> <span class="n">lType</span> <span class="ow">is</span> <span class="nb">dict</span> <span class="ow">or</span> <span class="n">lType</span> <span class="ow">is</span> <span class="nb">bool</span> <span class="ow">or</span> <span class="n">lType</span> <span class="ow">is</span> <span class="nb">float</span><span class="p">:</span>
<span class="n">lResultDict</span> <span class="o">=</span> <span class="n">lJSONResult</span>
<span class="k">else</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">warning</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;JSONGenerator return bad type: </span><span class="si">{</span><span class="nb">str</span><span class="p">(</span><span class="nb">type</span><span class="p">(</span><span class="n">lJSONResult</span><span class="p">))</span><span class="si">}</span><span class="s2">, CP Key </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mControlPanelNameStr</span><span class="si">}</span><span class="s2">&quot;</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;Error in control panel JSONGeneratorDef. CP Key </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mControlPanelNameStr</span><span class="si">}</span><span class="s2">. Exception are below&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="n">lResultDict</span>
<span class="k">def</span> <span class="nf">BackwardAdapterJSDef</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">inRequest</span><span class="p">):</span>
<span class="n">lGS</span> <span class="o">=</span> <span class="n">Orchestrator</span><span class="o">.</span><span class="n">GSettingsGet</span><span class="p">()</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="c1"># HTMLRenderDef</span>
<span class="n">lJSInitGeneratorDef</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mBackwardCompatibilityJSDef</span>
<span class="n">lResultStr</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>
<span class="k">if</span> <span class="n">lJSInitGeneratorDef</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="c1"># Call def (inRequest, inGSettings) or def (inGSettings)</span>
<span class="n">lJSResult</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>
<span class="n">lDEFSignature</span> <span class="o">=</span> <span class="n">signature</span><span class="p">(</span><span class="n">lJSInitGeneratorDef</span><span class="p">)</span> <span class="c1"># Get signature of the def</span>
<span class="n">lDEFARGLen</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">lDEFSignature</span><span class="o">.</span><span class="n">parameters</span><span class="o">.</span><span class="n">keys</span><span class="p">())</span> <span class="c1"># get count of the def args</span>
<span class="k">try</span><span class="p">:</span>
<span class="k">if</span> <span class="n">lDEFARGLen</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span> <span class="c1"># def (inGSettings)</span>
<span class="n">lJSResult</span> <span class="o">=</span> <span class="n">lJSInitGeneratorDef</span><span class="p">(</span><span class="n">lGS</span><span class="p">)</span>
<span class="k">elif</span> <span class="n">lDEFARGLen</span> <span class="o">==</span> <span class="mi">2</span><span class="p">:</span> <span class="c1"># def (inRequest, inGSettings)</span>
<span class="n">lJSResult</span> <span class="o">=</span> <span class="n">lJSInitGeneratorDef</span><span class="p">(</span><span class="n">inRequest</span><span class="p">,</span> <span class="n">lGS</span><span class="p">)</span>
<span class="k">elif</span> <span class="n">lDEFARGLen</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span> <span class="c1"># def ()</span>
<span class="n">lJSResult</span> <span class="o">=</span> <span class="n">lJSInitGeneratorDef</span><span class="p">()</span>
<span class="k">if</span> <span class="nb">type</span><span class="p">(</span><span class="n">lJSResult</span><span class="p">)</span> <span class="ow">is</span> <span class="nb">str</span><span class="p">:</span>
<span class="n">lResultStr</span> <span class="o">=</span> <span class="n">lJSResult</span> <span class="c1"># Add delimiter to some cases</span>
<span class="k">else</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">warning</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;JSInitGenerator return bad type: </span><span class="si">{</span><span class="nb">str</span><span class="p">(</span><span class="nb">type</span><span class="p">(</span><span class="n">lJSResult</span><span class="p">))</span><span class="si">}</span><span class="s2">, CP Key </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mControlPanelNameStr</span><span class="si">}</span><span class="s2">&quot;</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;Error in control panel JSInitGeneratorDef. CP Key </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mControlPanelNameStr</span><span class="si">}</span><span class="s2">. Exception are below&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="n">lResultStr</span></div>
</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>

@ -0,0 +1,567 @@
<!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.Orchestrator.Managers.Process &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>
</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.Orchestrator.Managers.Process</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.Orchestrator.Managers.Process</h1><div class="highlight"><pre>
<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">import</span> <span class="nn">os</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"> Manager process, which is need to be started / stopped / restarted</span>
<span class="sd"> With Process instance you can automate your process activity. Use schedule package to set interval when process should be active and when not.</span>
<span class="sd"> Process instance has the following statuses:</span>
<span class="sd"> - 0_STOPPED</span>
<span class="sd"> - 1_STOPPED_MANUAL</span>
<span class="sd"> - 2_STOP_SAFE</span>
<span class="sd"> - 3_STOP_SAFE_MANUAL</span>
<span class="sd"> - 4_STARTED</span>
<span class="sd"> - 5_STARTED_MANUAL</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">mAgentUserNameStr</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mStartPathStr</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mStartCMDStr</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">mProcessNameWOExeStr</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="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">mAgentUserNameStr</span> <span class="o">=</span> <span class="n">inAgentUserNameStr</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mStartPathStr</span> <span class="o">=</span> <span class="n">inStartPathStr</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mStartCMDStr</span> <span class="o">=</span> <span class="n">inStartCMDStr</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mProcessNameWOExeStr</span> <span class="o">=</span> <span class="n">inProcessNameWOExeStr</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mStopSafeTimeoutSecFloat</span> <span class="o">=</span> <span class="n">inStopSafeTimeoutSecFloat</span>
<span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">GSettingsGet</span><span class="p">()[</span><span class="s2">&quot;ManagersProcessDict&quot;</span><span class="p">][(</span><span class="n">inAgentHostNameStr</span><span class="o">.</span><span class="n">upper</span><span class="p">(),</span> <span class="n">inAgentUserNameStr</span><span class="o">.</span><span class="n">upper</span><span class="p">(),</span> <span class="n">inProcessNameWOExeStr</span><span class="o">.</span><span class="n">upper</span><span class="p">())]</span><span class="o">=</span><span class="bp">self</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>
<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"> 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"> :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="n">lLogBool</span> <span class="o">=</span> <span class="kc">False</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;1_STOPPED_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;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;2_STOP_SAFE&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;4_STARTED&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="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">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
<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"> Manual/Auto start. Manual start 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"> :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="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">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">#pdb.set_trace()</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;5_STARTED_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;4_STARTED&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="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>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Manual/Auto stop safe. Stop safe is the operation which send signal to process to terminate own work (send term signal to process). Managers.Process wait for the mStopSafeTimeoutSecFloat seconds. After that, if process is not terminated - self will StopForce it.</span>
<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"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">pass</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>
<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 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"> :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="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;1_STOPPED_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;0_STOPPED&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="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>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Manual/Auto restart safe. Restart safe is the operation which send signal to process to terminate own work (send term signal to process). Then it run process. Managers.Process wait for the mStopSafeTimeoutSecFloat seconds. After that, if process is not terminated - self will StopForce it.</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"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">pass</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>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Manual/Auto restart force. Force restart dont wait process termination - it just terminate process now ant then start it.</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"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">pass</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>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Lof information about status change</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&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">): Status has been changed to </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">)</span></div>
<div class="viewcode-block" id="Process.StatusCheck"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusCheck">[docs]</a> <span class="k">def</span> <span class="nf">StatusCheck</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Check if process is alive. The def will save the manual flag is exists.</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="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">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">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="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">mStatusStr</span> <span class="o">==</span> <span class="s2">&quot;1_STOPPED_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;5_STARTED_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;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">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;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="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="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">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>
<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"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">pass</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>
<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"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">pass</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>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Check process status and auto stop safe it if self.mStatusStr is 4_STARTED</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">pass</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>
<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"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">pass</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>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Return the process instance by the inProcessNameWOExeStr</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: Process instance (if exists) Else None</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">GSettingsGet</span><span class="p">()[</span><span class="s2">&quot;ManagersProcessDict&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">get</span><span class="p">((</span><span class="n">inAgentHostNameStr</span><span class="o">.</span><span class="n">upper</span><span class="p">(),</span> <span class="n">inAgentUserNameStr</span><span class="o">.</span><span class="n">upper</span><span class="p">(),</span> <span class="n">inProcessNameWOExeStr</span><span class="o">.</span><span class="n">upper</span><span class="p">()),</span><span class="kc">None</span><span class="p">)</span></div>
<div class="viewcode-block" id="ProcessStatusStrGet"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStatusStrGet">[docs]</a><span class="k">def</span> <span class="nf">ProcessStatusStrGet</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="nb">str</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Get the status of the Process instance.</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: Process status. See self.mStatusStr.</span>
<span class="sd"> Process instance has the following statuses:</span>
<span class="sd"> - 0_STOPPED</span>
<span class="sd"> - 1_STOPPED_MANUAL</span>
<span class="sd"> - 2_STOP_SAFE</span>
<span class="sd"> - 3_STOP_SAFE_MANUAL</span>
<span class="sd"> - 4_STARTED</span>
<span class="sd"> - 5_STARTED_MANUAL</span>
<span class="sd"> - None (if Process instance not exists)</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="k">return</span> <span class="n">lProcess</span><span class="o">.</span><span class="n">mStatusStr</span></div>
<div class="viewcode-block" id="ProcessStart"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStart">[docs]</a><span class="k">def</span> <span class="nf">ProcessStart</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">inIsManualBool</span><span class="p">:</span> <span class="nb">bool</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"> Manual/Auto start. Manual start will block scheduling execution. To return schedule execution use def Manual2Auto</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 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.</span>
<span class="sd"> Process instance has the following statuses:</span>
<span class="sd"> - 0_STOPPED</span>
<span class="sd"> - 1_STOPPED_MANUAL</span>
<span class="sd"> - 2_STOP_SAFE</span>
<span class="sd"> - 3_STOP_SAFE_MANUAL</span>
<span class="sd"> - 4_STARTED</span>
<span class="sd"> - 5_STARTED_MANUAL</span>
<span class="sd"> - None (if Process instance not exists)</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="k">return</span> <span class="n">lProcess</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="ProcessStopSafe"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStopSafe">[docs]</a><span class="k">def</span> <span class="nf">ProcessStopSafe</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">inIsManualBool</span><span class="p">:</span> <span class="nb">bool</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"> Manual/Auto stop safe. Stop safe is the operation which send signal to process to terminate own work (send term signal to process). Managers.Process wait for the mStopSafeTimeoutSecFloat seconds. After that, if process is not terminated - self will StopForce it.</span>
<span class="sd"> Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto</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 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.</span>
<span class="sd"> Process instance has the following statuses:</span>
<span class="sd"> - 0_STOPPED</span>
<span class="sd"> - 1_STOPPED_MANUAL</span>
<span class="sd"> - 2_STOP_SAFE</span>
<span class="sd"> - 3_STOP_SAFE_MANUAL</span>
<span class="sd"> - 4_STARTED</span>
<span class="sd"> - 5_STARTED_MANUAL</span>
<span class="sd"> - None (if Process instance not exists)</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="k">return</span> <span class="n">lProcess</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></div>
<div class="viewcode-block" id="ProcessStopForce"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStopForce">[docs]</a><span class="k">def</span> <span class="nf">ProcessStopForce</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">inIsManualBool</span><span class="p">:</span> <span class="nb">bool</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"> Manual/Auto stop force. Force stop dont 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"> :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 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.</span>
<span class="sd"> Process instance has the following statuses:</span>
<span class="sd"> - 0_STOPPED</span>
<span class="sd"> - 1_STOPPED_MANUAL</span>
<span class="sd"> - 2_STOP_SAFE</span>
<span class="sd"> - 3_STOP_SAFE_MANUAL</span>
<span class="sd"> - 4_STARTED</span>
<span class="sd"> - 5_STARTED_MANUAL</span>
<span class="sd"> - None (if Process instance not exists)</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="k">return</span> <span class="n">lProcess</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></div>
<div class="viewcode-block" id="ProcessStatusCheck"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStatusCheck">[docs]</a><span class="k">def</span> <span class="nf">ProcessStatusCheck</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="nb">str</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Check if process is alive. The def will save the manual flag is exists.</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: Process status. See self.mStatusStr.</span>
<span class="sd"> Process instance has the following statuses:</span>
<span class="sd"> - 0_STOPPED</span>
<span class="sd"> - 1_STOPPED_MANUAL</span>
<span class="sd"> - 2_STOP_SAFE</span>
<span class="sd"> - 3_STOP_SAFE_MANUAL</span>
<span class="sd"> - 4_STARTED</span>
<span class="sd"> - 5_STARTED_MANUAL</span>
<span class="sd"> - None (if Process instance not exists)</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">StatusCheck</span><span class="p">()</span>
<span class="k">return</span> <span class="n">lProcess</span><span class="o">.</span><span class="n">mStatusStr</span></div>
<div class="viewcode-block" id="ProcessManual2Auto"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessManual2Auto">[docs]</a><span class="k">def</span> <span class="nf">ProcessManual2Auto</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="nb">str</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"> :return: Process status. See self.mStatusStr.</span>
<span class="sd"> Process instance has the following statuses:</span>
<span class="sd"> - 0_STOPPED</span>
<span class="sd"> - 1_STOPPED_MANUAL</span>
<span class="sd"> - 2_STOP_SAFE</span>
<span class="sd"> - 3_STOP_SAFE_MANUAL</span>
<span class="sd"> - 4_STARTED</span>
<span class="sd"> - 5_STARTED_MANUAL</span>
<span class="sd"> - None (if Process instance not exists)</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="k">return</span> <span class="n">lProcess</span><span class="o">.</span><span class="n">Manual2Auto</span><span class="p">()</span></div>
</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>

@ -109,6 +109,7 @@
<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>

@ -109,6 +109,7 @@
<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>

@ -26,6 +26,10 @@ Group GSettings...
######################
Basic defs to work with singleton gSettings.
Group Storage...
######################
Defs to work with special locations in Orchestrator: Robot, User (TODO), User + Robot (TODO)
Group OS...
######################
Interaction with shell on the Orchestrator user session.

@ -0,0 +1,52 @@
####################################
6. Defs Managers
####################################
**************************************************
Process (General)
**************************************************
.. code-block:: python
# EXAMPLE
from pyOpenRPA.Orchestrator import Managers
lProcess = Orchestrator.Managers.Process(inAgentHostNameStr="PC-DESKTOP",inAgentUserNameStr="ND", inProcessNameWOExeStr="notepad",inStartCMDStr="notepad")
.. automodule:: pyOpenRPA.Orchestrator.Managers.Process
:members:
:autosummary:
**************************************************
Process (Details)
**************************************************
.. automodule:: pyOpenRPA.Orchestrator.Managers.Process
:members:
:autosummary:
**************************************************
ControlPanel (General)
**************************************************
.. code-block:: python
# EXAMPLE
from pyOpenRPA.Orchestrator import Managers
lCP = Managers.ControlPanel(inControlPanelNameStr="TestTTT",inRefreshHTMLJinja2TemplatePathStr="ControlPanel\\test.html", inJinja2TemplateRefreshBool = True)
.. automodule:: pyOpenRPA.Orchestrator.Managers.ControlPanel
:members:
:autosummary:
**************************************************
ControlPanel (Details)
**************************************************
.. automodule:: pyOpenRPA.Orchestrator.Managers.ControlPanel
:members:
:autosummary:

@ -109,6 +109,7 @@
<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>
@ -183,7 +184,10 @@
<div class="genindex-jumpbox">
<a href="#A"><strong>A</strong></a>
| <a href="#C"><strong>C</strong></a>
| <a href="#D"><strong>D</strong></a>
| <a href="#G"><strong>G</strong></a>
| <a href="#I"><strong>I</strong></a>
| <a href="#J"><strong>J</strong></a>
| <a href="#M"><strong>M</strong></a>
| <a href="#O"><strong>O</strong></a>
@ -197,20 +201,32 @@
<h2 id="A">A</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ActivityItemCreate">ActivityItemCreate() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ActivityItemDefAliasCreate">ActivityItemDefAliasCreate() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ActivityItemDefAliasModulesLoad">ActivityItemDefAliasModulesLoad() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ActivityItemDefAliasUpdate">ActivityItemDefAliasUpdate() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ActivityItemHelperDefAutofill">ActivityItemHelperDefAutofill() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ActivityItemHelperDefList">ActivityItemHelperDefList() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentActivityItemAdd">AgentActivityItemAdd() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentActivityItemExists">AgentActivityItemExists() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentActivityItemReturnExists">AgentActivityItemReturnExists() (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__.AgentActivityItemReturnGet">AgentActivityItemReturnGet() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSCMD">AgentOSCMD() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSFileBinaryDataBase64StrAppend">AgentOSFileBinaryDataBase64StrAppend() (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__.AgentOSFileBinaryDataBase64StrCreate">AgentOSFileBinaryDataBase64StrCreate() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSFileBinaryDataBase64StrReceive">AgentOSFileBinaryDataBase64StrReceive() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
@ -228,6 +244,22 @@
</ul></td>
</tr></table>
<h2 id="C">C</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<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>
</ul></td>
</tr></table>
<h2 id="D">D</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<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>
</ul></td>
</tr></table>
<h2 id="G">G</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
@ -235,10 +267,12 @@
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsAutocleaner">GSettingsAutocleaner() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsKeyListValueAppend">GSettingsKeyListValueAppend() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsGet">GSettingsGet() (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__.GSettingsKeyListValueAppend">GSettingsKeyListValueAppend() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsKeyListValueGet">GSettingsKeyListValueGet() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsKeyListValueOperatorPlus">GSettingsKeyListValueOperatorPlus() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
@ -248,13 +282,27 @@
</ul></td>
</tr></table>
<h2 id="I">I</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<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>
</ul></td>
<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>
</ul></td>
</tr></table>
<h2 id="J">J</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.Web.Basic.JSActivityListExecute">JSActivityListExecute() (in module pyOpenRPA.Orchestrator.Web.Basic)</a>
<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>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.Web.Basic.JSActivityListExecute">JSActivityListExecute() (in module pyOpenRPA.Orchestrator.Web.Basic)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.Web.Basic.JSProcessorActivityListAdd">JSProcessorActivityListAdd() (in module pyOpenRPA.Orchestrator.Web.Basic)</a>
</li>
</ul></td>
@ -263,6 +311,8 @@
<h2 id="M">M</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<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>
<li>
module
@ -270,6 +320,10 @@
<li><a href="Agent/02_Defs.html#module-pyOpenRPA.Agent.__Agent__">pyOpenRPA.Agent.__Agent__</a>
</li>
<li><a href="Orchestrator/02_Defs.html#module-pyOpenRPA.Orchestrator.__Orchestrator__">pyOpenRPA.Orchestrator.__Orchestrator__</a>
</li>
<li><a href="Orchestrator/06_Defs%20Managers.html#module-1">pyOpenRPA.Orchestrator.Managers.ControlPanel</a>, <a href="Orchestrator/06_Defs%20Managers.html#module-pyOpenRPA.Orchestrator.Managers.ControlPanel">[1]</a>
</li>
<li><a href="Orchestrator/06_Defs%20Managers.html#module-0">pyOpenRPA.Orchestrator.Managers.Process</a>, <a href="Orchestrator/06_Defs%20Managers.html#module-pyOpenRPA.Orchestrator.Managers.Process">[1]</a>
</li>
<li><a href="Orchestrator/02_Defs.html#module-pyOpenRPA.Orchestrator.Web.Basic">pyOpenRPA.Orchestrator.Web.Basic</a>
</li>
@ -282,10 +336,30 @@
<h2 id="O">O</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<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>
<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>
<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>
<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>
<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>
<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>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.Orchestrator">Orchestrator() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorIsAdmin">OrchestratorIsAdmin() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorLoggerGet">OrchestratorLoggerGet() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorPySearchInit">OrchestratorPySearchInit() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorRerunAsAdmin">OrchestratorRerunAsAdmin() (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__.OrchestratorRestart">OrchestratorRestart() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionRestore">OrchestratorSessionRestore() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
@ -298,8 +372,6 @@
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OSCMD">(in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OSCredentialsVerify">OSCredentialsVerify() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSFileBinaryDataBase64StrAppend">OSFileBinaryDataBase64StrAppend() (in module pyOpenRPA.Agent.__Agent__)</a>
@ -320,11 +392,17 @@
<h2 id="P">P</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="Orchestrator/06_Defs%20Managers.html#id0">Process (class in pyOpenRPA.Orchestrator.Managers.Process)</a>, <a href="Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process">[1]</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessDefIntervalCall">ProcessDefIntervalCall() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</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>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessIsStarted">ProcessIsStarted() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessListGet">ProcessListGet() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</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>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemAppend">ProcessorActivityItemAppend() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
@ -335,13 +413,25 @@
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorAliasDefUpdate">ProcessorAliasDefUpdate() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStart">ProcessStart() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<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>
</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>
<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>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStop">ProcessStop() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.ProcessWOExeUpperUserListGet">ProcessWOExeUpperUserListGet() (in module pyOpenRPA.Agent.__Agent__)</a>
<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>
</ul></td>
<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>
<li><a href="Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.ProcessWOExeUpperUserListGet">ProcessWOExeUpperUserListGet() (in module pyOpenRPA.Agent.__Agent__)</a>
</li>
<li><a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.PWASpecification_Get_PWAApplication">PWASpecification_Get_PWAApplication() (in module pyOpenRPA.Robot.UIDesktop)</a>
</li>
<li><a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.PWASpecification_Get_UIO">PWASpecification_Get_UIO() (in module pyOpenRPA.Robot.UIDesktop)</a>
@ -358,6 +448,20 @@
<ul>
<li><a href="Orchestrator/02_Defs.html#module-pyOpenRPA.Orchestrator.__Orchestrator__">module</a>
</li>
</ul></li>
<li>
pyOpenRPA.Orchestrator.Managers.ControlPanel
<ul>
<li><a href="Orchestrator/06_Defs%20Managers.html#module-1">module</a>, <a href="Orchestrator/06_Defs%20Managers.html#module-pyOpenRPA.Orchestrator.Managers.ControlPanel">[1]</a>
</li>
</ul></li>
<li>
pyOpenRPA.Orchestrator.Managers.Process
<ul>
<li><a href="Orchestrator/06_Defs%20Managers.html#module-0">module</a>, <a href="Orchestrator/06_Defs%20Managers.html#module-pyOpenRPA.Orchestrator.Managers.Process">[1]</a>
</li>
</ul></li>
<li>
@ -394,12 +498,12 @@
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionFileStoredSend">RDPSessionFileStoredSend() (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__.RDPSessionLogoff">RDPSessionLogoff() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionMonitorStop">RDPSessionMonitorStop() (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__.RDPSessionProcessStartIfNotRunning">RDPSessionProcessStartIfNotRunning() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionProcessStop">RDPSessionProcessStop() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
@ -409,6 +513,14 @@
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionResponsibilityCheck">RDPSessionResponsibilityCheck() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.RDPTemplateCreate">RDPTemplateCreate() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</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>
<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>
<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>
<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>
</ul></td>
</tr></table>
@ -417,6 +529,34 @@
<table style="width: 100%" class="indextable genindextable"><tr>
<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>
<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>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.Start">Start() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<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>
</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>
<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>
</ul></td>
<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>
<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>
<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>
<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>
<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>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.StorageRobotExists">StorageRobotExists() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.StorageRobotGet">StorageRobotGet() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
</ul></td>
</tr></table>
@ -489,10 +629,14 @@
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.WebRequestParseBodyJSON">WebRequestParseBodyJSON() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.WebRequestParseBodyStr">WebRequestParseBodyStr() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.WebRequestParseFile">WebRequestParseFile() (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__.WebRequestParseFile">WebRequestParseFile() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.WebRequestParsePath">WebRequestParsePath() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.WebRequestResponseSend">WebRequestResponseSend() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.WebURLConnectDef">WebURLConnectDef() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>

@ -110,6 +110,7 @@
<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>
@ -353,6 +354,7 @@ At the time of this writing the pyOpenRPA is successfully using in several big R
<li class="toctree-l2"><a class="reference internal" href="Orchestrator/02_Defs.html#pyopenrpa-orchestrator-orchestrator">pyOpenRPA.Orchestrator.__Orchestrator__</a><ul>
<li class="toctree-l3"><a class="reference internal" href="Orchestrator/02_Defs.html#group-agent">Group Agent…</a></li>
<li class="toctree-l3"><a class="reference internal" href="Orchestrator/02_Defs.html#group-gsettings">Group GSettings…</a></li>
<li class="toctree-l3"><a class="reference internal" href="Orchestrator/02_Defs.html#group-storage">Group Storage…</a></li>
<li class="toctree-l3"><a class="reference internal" href="Orchestrator/02_Defs.html#group-os">Group OS…</a></li>
<li class="toctree-l3"><a class="reference internal" href="Orchestrator/02_Defs.html#group-process">Group Process…</a></li>
<li class="toctree-l3"><a class="reference internal" href="Orchestrator/02_Defs.html#group-processor">Group Processor…</a></li>
@ -374,6 +376,13 @@ At the time of this writing the pyOpenRPA is successfully using in several big R
<li class="toctree-l2"><a class="reference internal" href="Orchestrator/05_UAC.html#uac-dict-for-orchestrator-web-ui-rights">UAC Dict for Orchestrator WEB UI rights</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Orchestrator/06_Defs%20Managers.html#process-general">Process (General)</a></li>
<li class="toctree-l2"><a class="reference internal" href="Orchestrator/06_Defs%20Managers.html#module-0">Process (Details)</a></li>
<li class="toctree-l2"><a class="reference internal" href="Orchestrator/06_Defs%20Managers.html#controlpanel-general">ControlPanel (General)</a></li>
<li class="toctree-l2"><a class="reference internal" href="Orchestrator/06_Defs%20Managers.html#module-1">ControlPanel (Details)</a></li>
</ul>
</li>
</ul>
</div>
<div class="toctree-wrapper compound">

Binary file not shown.

@ -112,6 +112,7 @@
<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>
@ -206,6 +207,16 @@
<td>&#160;&#160;&#160;
<a href="Orchestrator/02_Defs.html#module-pyOpenRPA.Orchestrator.__Orchestrator__"><code class="xref">pyOpenRPA.Orchestrator.__Orchestrator__</code></a></td><td>
<em></em></td></tr>
<tr class="cg-1">
<td></td>
<td>&#160;&#160;&#160;
<a href="Orchestrator/06_Defs%20Managers.html#module-1"><code class="xref">pyOpenRPA.Orchestrator.Managers.ControlPanel</code></a></td><td>
<em></em></td></tr>
<tr class="cg-1">
<td></td>
<td>&#160;&#160;&#160;
<a href="Orchestrator/06_Defs%20Managers.html#module-0"><code class="xref">pyOpenRPA.Orchestrator.Managers.Process</code></a></td><td>
<em></em></td></tr>
<tr class="cg-1">
<td></td>
<td>&#160;&#160;&#160;

@ -112,6 +112,7 @@
<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>

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

@ -44,6 +44,9 @@ def __Create__():
# # # # # # # # # # # # # # # # # #
},
"ServerDict": {
"ControlPanelDict": {
# "CPKey": <Managers.ControlPanel instance>
},
"AgentLimitLogSizeBytesInt": 300, # Don't show body if json body of transmition is more than
"ServerThread": None, # Server thread is there
"AgentActivityLifetimeSecFloat": 1200.0, # Time in seconds to life for activity for the agent
@ -150,6 +153,7 @@ def __Create__():
# },
],
},
"ManagersProcessDict":{}, # The key of the Process is (mAgentHostNameStr.upper(), mAgentUserNameStr.upper(), mProcessNameWOExeStr.upper())
"ProcessorDict": { # Has been changed. New general processor (one threaded) v.1.2.0
"ActivityList": [ # List of the activities
# {
@ -167,6 +171,7 @@ def __Create__():
"ThreadIdInt": None, # Technical field - will be setup when processor init
"WarningExecutionMoreThanSecFloat": 60.0 # Push warning if execution more than n seconds
},
# TODO REMOVE DEPRECATED KEYS IN v.2.0.0
"ControlPanelDict": { # Old structure > CPDict
"RefreshSeconds": 5, # deprecated parameter
"RobotList": [
@ -176,6 +181,7 @@ def __Create__():
#}
]
},
# TODO REMOVE DEPRECATED KEYS IN v.2.0.0
"CPDict": {
# "CPKey": {"HTMLRenderDef":None, "JSONGeneratorDef":None, "JSInitGeneratorDef":None}
},
@ -299,7 +305,8 @@ def __UACClientAdminCreate__():
"RestartOrchestratorBool": True, # Restart orchestrator activity
"RestartOrchestratorGITPullBool": True, # Turn off (RDP remember) orc + git pull + Turn on (rdp remember)
"RestartPCBool": True, # Send CMD to restart pc
"NothingBool":True # USe option if you dont want to give some access to the RDP controls
"NothingBool":True, # USe option if you dont want to give some access to the RDP controls
"Debugging":True # Debugging tool
},
"ActivityDict": { # Empty dict - all access
"ActivityListExecuteBool": True, # Execute activity at the current thread
@ -329,7 +336,7 @@ def LoggerDumpLogHandlerAdd(inLogger, inGSettingsClientDict):
# inModeStr:
# "BASIC" - create standart configuration
from pyOpenRPA.Orchestrator.Utils import LoggerHandlerDumpLogList
def Create(inModeStr="BASIC"):
def Create(inModeStr="BASIC", inLoggerLevel = None):
if inModeStr=="BASIC":
lResult = __Create__() # Create settings
# Создать файл логирования
@ -339,27 +346,31 @@ def Create(inModeStr="BASIC"):
##########################
# Подготовка логгера Robot
#########################
mRobotLogger = lResult["Logger"]
mRobotLogger.setLevel(logging.INFO)
# create the logging file handler
mRobotLoggerFH = logging.FileHandler(
"Reports\\" + datetime.datetime.now().strftime("%Y_%m_%d") + ".log")
mRobotLoggerFormatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s')
mRobotLoggerFH.setFormatter(mRobotLoggerFormatter)
# add handler to logger object
mRobotLogger.addHandler(mRobotLoggerFH)
####################Add console output
handler = logging.StreamHandler(sys.stdout)
handler.setFormatter(mRobotLoggerFormatter)
mRobotLogger.addHandler(handler)
############################################
LoggerDumpLogHandlerAdd(inLogger=mRobotLogger, inGSettingsClientDict=lResult["Client"])
#mHandlerDumpLogList = LoggerHandlerDumpLogList.LoggerHandlerDumpLogList(inDict=lResult["Client"],
# inKeyStr="DumpLogList",
# inHashKeyStr="DumpLogListHashStr",
# inRowCountInt=lResult["Client"][
# "DumpLogListCountInt"])
#mHandlerDumpLogList.setFormatter(mRobotLoggerFormatter)
#mRobotLogger.addHandler(mHandlerDumpLogList)
if inLoggerLevel is None: inLoggerLevel=logging.INFO
lL = lResult["Logger"]
if len(lL.handlers) == 0:
lL.setLevel(logging.INFO)
# create the logging file handler
mRobotLoggerFH = logging.FileHandler(
"Reports\\" + datetime.datetime.now().strftime("%Y_%m_%d") + ".log")
mRobotLoggerFormatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s')
mRobotLoggerFH.setFormatter(mRobotLoggerFormatter)
# add handler to logger object
lL.addHandler(mRobotLoggerFH)
####################Add console output
handler = logging.StreamHandler(sys.stdout)
handler.setFormatter(mRobotLoggerFormatter)
lL.addHandler(handler)
############################################
LoggerDumpLogHandlerAdd(inLogger=lL, inGSettingsClientDict=lResult["Client"])
#mHandlerDumpLogList = LoggerHandlerDumpLogList.LoggerHandlerDumpLogList(inDict=lResult["Client"],
# inKeyStr="DumpLogList",
# inHashKeyStr="DumpLogListHashStr",
# inRowCountInt=lResult["Client"][
# "DumpLogListCountInt"])
#mHandlerDumpLogList.setFormatter(mRobotLoggerFormatter)
#mRobotLogger.addHandler(mHandlerDumpLogList)
else:
if lL: lL.warning("Pay attention! Your code has been call SettingsTemplate.Create - since pyOpenRPA v1.2.7 GSettings is creating automatically")
return lResult # return the result dict
```

@ -29,7 +29,8 @@ if not Orchestrator.OrchestratorIsAdmin():
Orchestrator.OrchestratorRerunAsAdmin()
print(f"Orchestrator will be run as administrator!")
elif __name__ == "__main__": # New init way - allow run as module -m PyOpenRPA.Orchestrator
gSettings = SettingsTemplate.Create(inModeStr="BASIC") # Create GSettings with basic configuration - no more config is available from the box - you can create own
gSettings = Orchestrator.GSettingsGet()
#gSettings = SettingsTemplate.Create(inModeStr="BASIC") # Create GSettings with basic configuration - no more config is available from the box - you can create own
# TEST Add User ND - Add Login ND to superuser of the Orchestrator
lUACClientDict = SettingsTemplate.__UACClientAdminCreate__()
@ -38,47 +39,12 @@ elif __name__ == "__main__": # New init way - allow run as module -m PyOpenRPA.O
Orchestrator.UACUpdate(inGSettings=gSettings, inADLoginStr="IMaslov", inADStr="", inADIsDefaultBool=True, inURLList=[])
# TEST Add Supertoken for the all access between robots
Orchestrator.UACSuperTokenUpdate(inGSettings=gSettings, inSuperTokenStr="1992-04-03-0643-ru-b4ff-openrpa52zzz")
# Add first interface!
Orchestrator.WebListenCreate(inGSettings=gSettings)
# Restore DUMP
Orchestrator.OrchestratorSessionRestore(inGSettings=gSettings)
# INFO Relative/Absolute import see below - after settings init
# Template for import CP - Control Panels
# ATTENTION - Pay attention to CP names! Orchestrator is one for the all control panels per one machine
## !!! For Absolute import control panels !!!
# try:
# sys.path.insert(0,os.path.abspath(os.path.join(r"..\ROBOT\Builds")))
# import pyRobot_CP
# pyRobot_CP.SettingsUpdate(inGSettings=gSettings)
# except Exception as e:
# gSettings["Logger"].exception(f"Exception when init CP. See below.")
## !!! For Relative import control panels !!!
# try:
# sys.path.insert(0,os.path.abspath(os.path.join(r"..\ROBOT\Builds")))
# from pyRobot_CP import ControlPanel
# ControlPanel.SettingsUpdate(inGSettings=gSettings)
# except Exception as e:
# gSettings["Logger"].exception(f"Exception when init CP. See below.")
## !!! For Relative import !!! CP Version Check
try:
sys.path.insert(0,os.path.abspath(os.path.join(r"")))
from ControlPanel import CP_VersionCheck
CP_VersionCheck.SettingsUpdate(inGSettings=gSettings)
except Exception as e:
gSettings["Logger"].exception(f"Exception when init CP. See below.")
try:
from ControlPanel import CP_Test
CP_Test.SettingsUpdate(inGSettings=gSettings)
except Exception as e:
gSettings["Logger"].exception(f"Exception when init CP. See below.")
# Autoinit control panels starts with CP_
lPyModules = Orchestrator.OrchestratorPySearchInit(inGlobPatternStr="ControlPanel\\CP_*.py", inDefStr="SettingsUpdate", inDefArgNameGSettingsStr="inGSettings")
# Call the orchestrator def
Orchestrator.Orchestrator(inGSettings=gSettings, inDumpRestoreBool=False)
else:

File diff suppressed because it is too large Load Diff

@ -29,107 +29,107 @@ UIDesktop.Utils.ProcessBitness.SettingsInit(lPyOpenRPA_SettingsDict)
| #Backend selection - attribute “backend” (“win32” || “uia”) in 1-st list element
|
|
| `PWASpecification_Get_UIO`(…)
| #Backend def selection - attribute “backend” (“win32” || “uia”) in 1-st list element #old name - GetControl
|
|
| `UIOSelectorSecs_WaitAppear_Bool`(…)
| Wait for UI object will appear in GUI for inWaitSecs seconds.
|
|
| `UIOSelectorSecs_WaitDisappear_Bool`(…)
| Wait for UI object will disappear in GUI for inWaitSecs seconds.
|
|
| `UIOSelectorUIOActivity_Run_Dict`(…[, …])
| Run the activity in UIO (UI Object)
|
|
| `UIOSelector_Exist_Bool`(inUIOSelector)
| Check if object is exist by the UIO selector.
|
|
| `UIOSelector_FocusHighlight`(inUIOSelector)
| Set focus and highlight (draw outline) the element (in app) by the UIO selector.
|
|
| `UIOSelector_GetChildList_UIOList`([…])
| Get list of child UIOs by the parent UIOSelector
|
|
| `UIOSelector_Get_BitnessInt`(inSpecificationList)
| Detect process bitness by the UI Object UIO Selector.
|
|
| `UIOSelector_Get_BitnessStr`(inSpecificationList)
| Detect process bitness by the UI Object UIO Selector.
|
|
| `UIOSelector_Get_UIO`(inSpecificationList[, …])
| Get the pywinauto object by the UIO selector.
|
|
| `UIOSelector_Get_UIOActivityList`(inUIOSelector)
| Get the list of the UI object activities
|
|
| `UIOSelector_Get_UIOInfo`(inUIOSelector)
| Get the UIO dict of the attributes
|
|
| `UIOSelector_Get_UIOList`(inSpecificationList)
| Get the UIO list by the selector
|
|
| `UIOSelector_Highlight`(inUIOSelector)
| Highlight (draw outline) the element (in app) by the UIO selector.
|
|
| `UIOSelector_SafeOtherGet_Process`(inUIOSelector)
| Safe get other process or None if destination app is the other/same bitness
|
|
| `UIOSelector_SearchChildByMouse_UIO`(…)
| UIOSelector (see description on the top of the document) #old name - AutomationSearchMouseElement
|
|
| `UIOSelector_SearchChildByMouse_UIOTree`(…)
| !!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!!
|
|
| `UIOSelector_TryRestore_Dict`(inSpecificationList)
| Try to restore (maximize) window, if its minimized.
|
|
| `UIOSelectorsSecs_WaitAppear_List`(…[, …])
| Wait for many UI object will appear in GUI for inWaitSecs seconds.
|
|
| `UIOSelectorsSecs_WaitDisappear_List`(…[, …])
| Wait for many UI object will disappear in GUI for inWaitSecs seconds.
|
|
### pyOpenRPA.Robot.UIDesktop.Get_OSBitnessInt()
Detect OS bitness.

@ -288,6 +288,9 @@ In wiki you can use the following docs:
* Group GSettings…
* Group Storage…
* Group OS…
@ -333,6 +336,21 @@ In wiki you can use the following docs:
* UAC Dict for Orchestrator WEB UI rights
* 6. Defs Managers
* Process (General)
* Process (Details)
* ControlPanel (General)
* ControlPanel (Details)
* 2. Defs

Loading…
Cancel
Save