if__name__=="__main__":# New init way - allow run as module -m PyOpenRPA.Orchestrator
frompyOpenRPAimportOrchestrator# Import orchestrator main
frompyOpenRPAimportOrchestrator# Import orchestrator main
#Run as administrator
ifnotOrchestrator.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
# TEST Add User ND - Add Login ND to superuser of the Orchestrator
@ -60,7 +63,6 @@ if __name__ == "__main__": # New init way - allow run as module -m PyOpenRPA.Orc
<td><p>Check _SessionLast_RDPList.json and _SessionLast_StorageDict.pickle in working directory. if exist - load into gsettings # _SessionLast_StorageDict.pickle (binary) _SessionLast_RDPList.json (encoding = “utf-8”) _SessionLast_StorageDict.pickle (binary).</p></td>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">OrchestratorIsAdmin</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#OrchestratorIsAdmin"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorIsAdmin"title="Permalink to this definition">¶</a></dt>
<dd><p>Check if Orchestrator process is running as administrator</p>
<dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>True - run as administrator; False - not as administrator</p>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">OrchestratorRerunAsAdmin</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#OrchestratorRerunAsAdmin"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorRerunAsAdmin"title="Permalink to this definition">¶</a></dt>
<dd><p>Check if not admin - then rerun orchestrator as administrator</p>
<dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>True - run as administrator; False - not as administrator</p>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">OrchestratorRestart</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inGSettings</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#OrchestratorRestart"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorRestart"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">OrchestratorSessionRestore</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inGSettings</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#OrchestratorSessionRestore"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionRestore"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">OrchestratorSessionRestore</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inGSettings</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#OrchestratorSessionRestore"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionRestore"title="Permalink to this definition">¶</a></dt>
<dd><p>Check _SessionLast_RDPList.json and _SessionLast_StorageDict.pickle in working directory. if exist - load into gsettings
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">OrchestratorSessionSave</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inGSettings</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#OrchestratorSessionSave"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionSave"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">OrchestratorSessionSave</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inGSettings</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#OrchestratorSessionSave"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionSave"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="simple">
<dt>Orchestrator session save in file</dt><dd><p>_SessionLast_RDPList.json (encoding = “utf-8”)
<spanclass="k">if</span><spanclass="vm">__name__</span><spanclass="o">==</span><spanclass="s2">"__main__"</span><spanclass="p">:</span><spanclass="c1"># New init way - allow run as module -m PyOpenRPA.Orchestrator</span>
<spanclass="nb">print</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"Orchestrator will be run as administrator!"</span><spanclass="p">)</span>
<spanclass="k">elif</span><spanclass="vm">__name__</span><spanclass="o">==</span><spanclass="s2">"__main__"</span><spanclass="p">:</span><spanclass="c1"># New init way - allow run as module -m PyOpenRPA.Orchestrator</span>
<spanclass="n">gSettings</span><spanclass="o">=</span><spanclass="n">SettingsTemplate</span><spanclass="o">.</span><spanclass="n">Create</span><spanclass="p">(</span><spanclass="n">inModeStr</span><spanclass="o">=</span><spanclass="s2">"BASIC"</span><spanclass="p">)</span><spanclass="c1"># Create GSettings with basic configuration - no more config is available from the box - you can create own</span>
<spanclass="c1"># TEST Add User ND - Add Login ND to superuser of the Orchestrator</span>
@ -255,7 +258,6 @@
<spanclass="c1"># Call the orchestrator def</span>
<spanclass="nb">print</span><spanclass="p">(</span><spanclass="s2">"!WARNING! Current orchestrator settings do not support old type of the Orchestrator start. Use new Orchestrator type start (see v1.2.0)"</span><spanclass="p">)</span>
<spanclass="nb">print</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"!SKIPPED! Already run as administrator!"</span><spanclass="p">)</span></div>
<spanclass="k">if</span><spanclass="n">lL</span><spanclass="p">:</span><spanclass="n">lL</span><spanclass="o">.</span><spanclass="n">exception</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"Exception when dump data before restart the Orchestrator"</span><spanclass="p">)</span>
<spanclass="n">lFile</span><spanclass="o">.</span><spanclass="n">close</span><spanclass="p">()</span><spanclass="c1"># Close the file</span>
<spanclass="n">os</span><spanclass="o">.</span><spanclass="n">remove</span><spanclass="p">(</span><spanclass="s2">"_SessionLast_RDPList.json"</span><spanclass="p">)</span><spanclass="c1"># remove the temp file</span>
<spanclass="n">gSettingsDict</span><spanclass="p">[</span><spanclass="s2">"RobotRDPActive"</span><spanclass="p">][</span><spanclass="s2">"RDPList"</span><spanclass="p">]</span><spanclass="o">=</span><spanclass="n">lSessionLastRDPList</span><spanclass="c1"># Set the last session dict</span>
<spanclass="n">inGSettings</span><spanclass="p">[</span><spanclass="s2">"RobotRDPActive"</span><spanclass="p">][</span><spanclass="s2">"RDPList"</span><spanclass="p">]</span><spanclass="o">=</span><spanclass="n">lSessionLastRDPList</span><spanclass="c1"># Set the last session dict</span>
<spanclass="k">if</span><spanclass="n">lL</span><spanclass="p">:</span><spanclass="n">lL</span><spanclass="o">.</span><spanclass="n">warning</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"RDP Session List was restored from previous Orchestrator session"</span><spanclass="p">)</span>
<spanclass="kn">from</span><spanclass="nn">..</span><spanclass="kn">import</span><spanclass="n">__version__</span><spanclass="c1"># Get version from the package</span>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorIsAdmin">OrchestratorIsAdmin() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorRerunAsAdmin">OrchestratorRerunAsAdmin() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorRestart">OrchestratorRestart() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li>
<li><ahref="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.OrchestratorSessionRestore">OrchestratorSessionRestore() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
@ -139,19 +139,29 @@ Work with activity scheduling.
| Verify user credentials in windows.
|
| `OrchestratorIsAdmin`()
| Check if Orchestrator process is running as administrator
|
| `OrchestratorRerunAsAdmin`()
| Check if not admin - then rerun orchestrator as administrator
|
| `OrchestratorRestart`([inGSettings])
| Orchestrator restart
|
| `OrchestratorSessionRestore`([inGSettings])
| `OrchestratorSessionRestore`(inGSettings)
| Check _SessionLast_RDPList.json and _SessionLast_StorageDict.pickle in working directory. if exist - load into gsettings # _SessionLast_StorageDict.pickle (binary) _SessionLast_RDPList.json (encoding = “utf-8”) _SessionLast_StorageDict.pickle (binary).
| Check _SessionLast_RDPList.json and _SessionLast_StorageDict.pickle in working directory. if exist - load into gsettings # _SessionLast_StorageDict.pickle (binary) _SessionLast_RDPList.json (encoding = “utf-8”) _SessionLast_StorageDict.pickle (binary).
|
| `OrchestratorSessionSave`([inGSettings])
| `OrchestratorSessionSave`(inGSettings)
| Orchestrator session save in file
| Orchestrator session save in file
|
| `ProcessDefIntervalCall`(inGSettings, inDef, …)
@ -794,6 +804,26 @@ Verify user credentials in windows. Return bool
@ -23,9 +23,12 @@ if lPyOpenRPASourceFolderPathStr != "": sys.path.insert(0,os.path.abspath(os.pat
# Start import after config the pyOpenRPA folder
from pyOpenRPA.Orchestrator import SettingsTemplate # Import functionallity
if __name__ == "__main__": # New init way - allow run as module -m PyOpenRPA.Orchestrator
from pyOpenRPA import Orchestrator # Import orchestrator main
from pyOpenRPA import Orchestrator # Import orchestrator main
#Run as administrator
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
# TEST Add User ND - Add Login ND to superuser of the Orchestrator
@ -75,7 +78,6 @@ if __name__ == "__main__": # New init way - allow run as module -m PyOpenRPA.Orc