@ -1,4 +1,8 @@
|
||||
Лицензия-оферта
|
||||
pyOpenRPA License
|
||||
pyOpenRPA open license
|
||||
pyOpenRPA открытая лицензия
|
||||
|
||||
Copyright (c) 2019 Ivan Maslov
|
||||
Правообладатель: 2019 Маслов Иван Дмитриевич
|
||||
|
||||
Текст лицензии см. в файле: LICENSE.PDF (в корне репозитория) или по адресу: https://pyopenrpa.ru/license/oferta.pdf
|
||||
|
||||
|
@ -1,4 +0,0 @@
|
||||
# Sphinx build info version 1
|
||||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||
config: 1f7d335ae78af2465667fce9967ef73c
|
||||
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
@ -1,291 +0,0 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>2. Roadmap — pyOpenRPA v1.2.0 documentation</title>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="_static/favicon.ico"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/underscore.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
|
||||
<script type="text/javascript" src="_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="3. Copyrights & Contacts" href="03_Copyrights_Contacts.html" />
|
||||
<link rel="prev" title="1. How to install" href="01_HowToInstall.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 class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="01_HowToInstall.html">1. How to install</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">2. Roadmap</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="03_Copyrights_Contacts.html">3. Copyrights & Contacts</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">ROBOT</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Robot/01_Robot.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Robot/02_Defs.html">2. Defs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Robot/03_HowToUse.html">3. How to use</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Robot/04_Dependencies.html">4. Dependencies</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">STUDIO</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Studio/01_Studio.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Studio/02_HowToUse.html">2. How to use</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">ORCHESTRATOR</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Orchestrator/01_Orchestrator.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Orchestrator/02_Defs.html">2. Defs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Orchestrator/03_gSettingsTemplate.html">3. gSettings Template</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Orchestrator/04_HowToUse.html">4. How to use</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Orchestrator/05_UAC.html">5. UAC - User Access Control</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">AGENT</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Agent/02_Defs.html">2. Defs</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">TOOLS</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Tools/02_Defs.html">2. Defs StopSafe</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="index.html">pyOpenRPA</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>2. Roadmap</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
<a href="_sources/02_RoadMap.rst.txt" rel="nofollow"> View page source</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="roadmap">
|
||||
<h1>2. Roadmap<a class="headerlink" href="#roadmap" title="Permalink to this headline">¶</a></h1>
|
||||
<ul class="simple">
|
||||
<li><dl class="simple">
|
||||
<dt>Guide</dt><dd><ul>
|
||||
<li><dl class="simple">
|
||||
<dt>ENG - done 2021.03.11</dt><dd><ul>
|
||||
<li><p>HTML <a class="reference external" href="https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/ENG_Guide/html/index.html">|OPEN GITLAB|</a></p></li>
|
||||
<li><p>MarkDown <a class="reference external" href="https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/ENG_Guide/markdown/index.md">|OPEN GITLAB|</a></p></li>
|
||||
<li><p>PDF <a class="reference external" href="https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/ENG_Guide/pdf/pyOpenRPA_Guide_ENG.pdf">[|OPEN GITLAB|]</a></p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li><p>RUS - queue</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li><dl class="simple">
|
||||
<dt>Tutorial</dt><dd><ul>
|
||||
<li><p>ENG - queue</p></li>
|
||||
<li><dl class="simple">
|
||||
<dt>RUS - in progress</dt><dd><ul>
|
||||
<li><p>Article: Less cost - no paid RPA <a class="reference external" href="https://habr.com/ru/post/506766/">|OPEN HABR|</a></p></li>
|
||||
<li><p>Tutorial Desktop UI <a class="reference external" href="https://habr.com/ru/post/509644/">|OPEN HABR|</a>; <a class="reference external" href="https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/RUS_Tutorial/DesktopGUI_Habr/index.md">|OPEN GITLAB|</a></p></li>
|
||||
<li><p>Tutorial Web UI <a class="reference external" href="https://habr.com/ru/post/515310/">|OPEN HABR|</a>; <a class="reference external" href="https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/RUS_Tutorial/WebGUI_Habr/readme.md">|OPEN GITLAB|</a></p></li>
|
||||
<li><p>Article: RPA as a core of the IT automation - soon</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li><dl class="simple">
|
||||
<dt>Leaflet</dt><dd><ul>
|
||||
<li><p>ENG queue</p></li>
|
||||
<li><dl class="simple">
|
||||
<dt>RUS done 2021.02.23</dt><dd><ul>
|
||||
<li><p>RUS Leaflet pyOpenRPA v4.pdf <a class="reference external" href="https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/RUS_Leaflet/RUS%20Leaflet%20pyOpenRPA%20v4.pdf">|OPEN GITLAB|</a></p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
<a href="03_Copyrights_Contacts.html" class="btn btn-neutral float-right" title="3. Copyrights & Contacts" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
<a href="01_HowToInstall.html" class="btn btn-neutral float-left" title="1. How to install" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© 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>
|
@ -1,278 +0,0 @@
|
||||
|
||||
|
||||
<!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>3. Copyrights & Contacts — pyOpenRPA v1.2.0 documentation</title>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="_static/favicon.ico"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/underscore.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
|
||||
<script type="text/javascript" src="_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="1. Description" href="Robot/01_Robot.html" />
|
||||
<link rel="prev" title="2. Roadmap" href="02_RoadMap.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 class="current">
|
||||
<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 current"><a class="current reference internal" href="#">3. Copyrights & Contacts</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#ivan-maslov-founder">Ivan Maslov (founder)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#rd-party-components-license-dependencies">3-rd party components license dependencies</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">ROBOT</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Robot/01_Robot.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Robot/02_Defs.html">2. Defs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Robot/03_HowToUse.html">3. How to use</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Robot/04_Dependencies.html">4. Dependencies</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">STUDIO</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Studio/01_Studio.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Studio/02_HowToUse.html">2. How to use</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">ORCHESTRATOR</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Orchestrator/01_Orchestrator.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Orchestrator/02_Defs.html">2. Defs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Orchestrator/03_gSettingsTemplate.html">3. gSettings Template</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Orchestrator/04_HowToUse.html">4. How to use</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Orchestrator/05_UAC.html">5. UAC - User Access Control</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">AGENT</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Agent/02_Defs.html">2. Defs</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">TOOLS</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Tools/02_Defs.html">2. Defs StopSafe</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="index.html">pyOpenRPA</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>3. Copyrights & Contacts</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
<a href="_sources/03_Copyrights_Contacts.rst.txt" rel="nofollow"> View page source</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="copyrights-contacts">
|
||||
<span id="id1"></span><h1>3. Copyrights & Contacts<a class="headerlink" href="#copyrights-contacts" title="Permalink to this headline">¶</a></h1>
|
||||
<p>pyOpenRPA is created by Ivan Maslov (Russia).
|
||||
Hosted by PYOPENRPA LLC (Russia)</p>
|
||||
<p>My purpose is to create #IT4Business models in the companies.
|
||||
I can help you to create the new #IT4Business in your company.
|
||||
#IT4Business homepage - <a class="reference external" href="https://www.facebook.com/RU.IT4Business">https://www.facebook.com/RU.IT4Business</a>
|
||||
#IT4Busines is the methodology which is created for build compact fast and reliable IT function in company.
|
||||
If you has many IT specialists, very long deadlines for the IT tasks, many bugs in IT software - #IT4Business is for you :)</p>
|
||||
<p>If you need some IT help - feel free to contact me (prefer e-mail or skype).
|
||||
If you will find some issue in pyOpenRPA - write about it to me via e-mail/skype/gitlab issue.</p>
|
||||
<p>Thank you!</p>
|
||||
<div class="section" id="ivan-maslov-founder">
|
||||
<h2>Ivan Maslov (founder)<a class="headerlink" href="#ivan-maslov-founder" title="Permalink to this headline">¶</a></h2>
|
||||
<ul class="simple">
|
||||
<li><p>E-mail: <a class="reference external" href="mailto:Ivan.Maslov%40UnicodeLabs.ru">Ivan<span>.</span>Maslov<span>@</span>UnicodeLabs<span>.</span>ru</a></p></li>
|
||||
<li><p>Skype: MegaFinder</p></li>
|
||||
<li><p>Facebook: <a class="reference external" href="https://www.facebook.com/RU.IT4Business">https://www.facebook.com/RU.IT4Business</a></p></li>
|
||||
<li><p>LinkedIn: <a class="reference external" href="https://www.linkedin.com/in/RU-IvanMaslov/">https://www.linkedin.com/in/RU-IvanMaslov/</a></p></li>
|
||||
<li><p>WhatsApp | Telegram: +7 906 722 39 25</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="rd-party-components-license-dependencies">
|
||||
<h2>3-rd party components license dependencies<a class="headerlink" href="#rd-party-components-license-dependencies" title="Permalink to this headline">¶</a></h2>
|
||||
<ul class="simple">
|
||||
<li><p>WinPython 3.7.1 32-bit & 64-bit, license MIT (<a class="reference external" href="https://github.com/winpython/winpython">https://github.com/winpython/winpython</a>)</p></li>
|
||||
<li><p>Selenium v…, license Apache 2.0</p></li>
|
||||
<li><p>pywinauto 0.6.5, license BSD 3-Clause (<a class="reference external" href="https://github.com/pywinauto/pywinauto">https://github.com/pywinauto/pywinauto</a>)</p></li>
|
||||
<li><p>Semantic UI …, license MIT (<a class="reference external" href="https://github.com/Semantic-Org/Semantic-UI">https://github.com/Semantic-Org/Semantic-UI</a>)</p></li>
|
||||
<li><p>PyAutoGUI …, license BSD 3-Clause (<a class="reference external" href="https://github.com/asweigart/pyautogui">https://github.com/asweigart/pyautogui</a>)</p></li>
|
||||
<li><p>keyboard …, license MIT (<a class="reference external" href="https://github.com/boppreh/keyboard">https://github.com/boppreh/keyboard</a>)</p></li>
|
||||
<li><p>pywin32</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
<a href="Robot/01_Robot.html" class="btn btn-neutral float-right" title="1. Description" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
<a href="02_RoadMap.html" class="btn btn-neutral float-left" title="2. Roadmap" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© 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>
|
@ -1,607 +0,0 @@
|
||||
|
||||
|
||||
<!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>3. gSettings Template — pyOpenRPA v1.2.0 documentation</title>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="../_static/favicon.ico"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Index" href="../genindex.html" />
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="4. How to use" href="04_HowToUse.html" />
|
||||
<link rel="prev" title="2. Defs" href="02_Defs.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search" >
|
||||
|
||||
|
||||
|
||||
<a href="../index.html" class="icon icon-home"> pyOpenRPA
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="caption"><span class="caption-text">GENERAL</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../01_HowToInstall.html">1. How to install</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../02_RoadMap.html">2. Roadmap</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../03_Copyrights_Contacts.html">3. Copyrights & 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 class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="01_Orchestrator.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="02_Defs.html">2. Defs</a></li>
|
||||
<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>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">TOOLS</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="../index.html">pyOpenRPA</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="../index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>3. gSettings Template</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
<a href="../_sources/Orchestrator/03_gSettingsTemplate.rst.txt" rel="nofollow"> View page source</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="gsettings-template">
|
||||
<h1>3. gSettings Template<a class="headerlink" href="#gsettings-template" title="Permalink to this headline">¶</a></h1>
|
||||
<p>gSettings structure</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">os</span><span class="o">,</span> <span class="nn">logging</span><span class="o">,</span> <span class="nn">datetime</span><span class="o">,</span> <span class="nn">sys</span>
|
||||
<span class="kn">import</span> <span class="nn">schedule</span> <span class="c1"># https://schedule.readthedocs.io/en/stable/examples.html</span>
|
||||
|
||||
<span class="c1"># Technical def - return GSettings structure with examples</span>
|
||||
<span class="k">def</span> <span class="nf">__Create__</span><span class="p">():</span>
|
||||
<span class="k">return</span> <span class="p">{</span>
|
||||
<span class="s2">"VersionStr"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span> <span class="c1"># Will be filled in orchestrator,</span>
|
||||
<span class="s2">"Autocleaner"</span><span class="p">:</span> <span class="p">{</span>
|
||||
<span class="c1"># Some gurbage is collecting in g settings. So you can configure autocleaner to periodically clear gSettings</span>
|
||||
<span class="s2">"IntervalSecFloat"</span><span class="p">:</span> <span class="mf">3600.0</span><span class="p">,</span> <span class="c1"># Sec float to periodically clear gsettings</span>
|
||||
<span class="s2">"AgentActivityReturnLifetimeSecFloat"</span><span class="p">:</span> <span class="mf">300.0</span> <span class="c1"># Time in seconds to life for activity result recieved from the agent</span>
|
||||
<span class="p">},</span>
|
||||
<span class="s2">"Client"</span><span class="p">:</span> <span class="p">{</span> <span class="c1"># Settings about client web orchestrator</span>
|
||||
<span class="s2">"Session"</span><span class="p">:</span> <span class="p">{</span>
|
||||
<span class="c1"># Settings about web session. Session algorythms works only for special requests (URL in ServerSettings)</span>
|
||||
<span class="s2">"LifetimeSecFloat"</span><span class="p">:</span> <span class="mf">600.0</span><span class="p">,</span>
|
||||
<span class="c1"># Client Session lifetime in seconds. after this time server will forget about this client session</span>
|
||||
<span class="s2">"LifetimeRequestSecFloat"</span><span class="p">:</span> <span class="mf">120.0</span><span class="p">,</span> <span class="c1"># 1 client request lifetime in server in seconds</span>
|
||||
<span class="s2">"ControlPanelRefreshIntervalSecFloat"</span><span class="p">:</span> <span class="mf">2.0</span><span class="p">,</span> <span class="c1"># Interval to refresh control panels for session,</span>
|
||||
<span class="s2">"TechnicalSessionGUIDCache"</span><span class="p">:</span> <span class="p">{</span> <span class="c1"># TEchnical cache. Fills when web browser is requesting</span>
|
||||
<span class="c1"># "SessionGUIDStr":{ # Session with some GUID str. On client session guid stored in cookie "SessionGUIDStr"</span>
|
||||
<span class="c1"># "InitDatetime": None, # Datetime when session GUID was created</span>
|
||||
<span class="c1"># "DatasetLast": {</span>
|
||||
<span class="c1"># "ControlPanel": {</span>
|
||||
<span class="c1"># "Data": None, # Struct to check with new iterations. None if starts</span>
|
||||
<span class="c1"># "ReturnBool": False # flag to return, close request and return data as json</span>
|
||||
<span class="c1"># }</span>
|
||||
<span class="c1"># },</span>
|
||||
<span class="c1"># "ClientRequestHandler": None, # Last client request handler</span>
|
||||
<span class="c1"># "UserADStr": None, # User, who connect. None if user is not exists</span>
|
||||
<span class="c1"># "DomainADStr": None, # Domain of the user who connect. None if user is not exists</span>
|
||||
<span class="c1"># }</span>
|
||||
<span class="p">},</span>
|
||||
<span class="p">},</span>
|
||||
<span class="c1"># # # # # # Client... # # # # # # # #</span>
|
||||
<span class="s2">"DumpLogListRefreshIntervalSecFloat"</span><span class="p">:</span> <span class="mf">3.0</span><span class="p">,</span> <span class="c1"># Duration between updates for the Client</span>
|
||||
<span class="s2">"DumpLogListCountInt"</span><span class="p">:</span> <span class="mi">100</span><span class="p">,</span> <span class="c1"># Set the max row for the dump</span>
|
||||
<span class="s2">"DumpLogList"</span><span class="p">:</span> <span class="p">[],</span> <span class="c1"># Will be filled automatically</span>
|
||||
<span class="s2">"DumpLogListHashStr"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span> <span class="c1"># Will be filled automatically</span>
|
||||
<span class="c1"># # # # # # # # # # # # # # # # # #</span>
|
||||
<span class="p">},</span>
|
||||
<span class="s2">"ServerDict"</span><span class="p">:</span> <span class="p">{</span>
|
||||
<span class="s2">"ControlPanelDict"</span><span class="p">:</span> <span class="p">{</span>
|
||||
<span class="c1"># "CPKey": <Managers.ControlPanel instance></span>
|
||||
<span class="p">},</span>
|
||||
<span class="s2">"AgentLimitLogSizeBytesInt"</span><span class="p">:</span> <span class="mi">300</span><span class="p">,</span> <span class="c1"># Don't show body if json body of transmition is more than</span>
|
||||
<span class="s2">"ServerThread"</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">"AgentActivityLifetimeSecFloat"</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>
|
||||
<span class="s2">"AgentConnectionLifetimeSecFloat"</span><span class="p">:</span> <span class="mf">300.0</span><span class="p">,</span> <span class="c1"># Time in seconds to handle the open connection to the Agent</span>
|
||||
<span class="s2">"AgentLoopSleepSecFloat"</span><span class="p">:</span> <span class="mf">2.0</span><span class="p">,</span> <span class="c1"># Time in seconds to sleep between loops when check to send some activity to the agent</span>
|
||||
<span class="s2">"AgentFileChunkBytesSizeInt"</span><span class="p">:</span> <span class="mi">50000000</span><span class="p">,</span> <span class="c1"># size of the each chunk for the agent transmition</span>
|
||||
<span class="s2">"AgentFileChunkCheckIntervalSecFloat"</span><span class="p">:</span> <span class="mf">0.2</span><span class="p">,</span> <span class="c1"># The interval for check last activity item was successfully sent</span>
|
||||
<span class="s2">"WorkingDirectoryPathStr"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span> <span class="c1"># Will be filled automatically</span>
|
||||
<span class="s2">"RequestTimeoutSecFloat"</span><span class="p">:</span> <span class="mi">300</span><span class="p">,</span> <span class="c1"># Time to handle request in seconds,</span>
|
||||
<span class="s2">"ListenDict"</span><span class="p">:</span> <span class="p">{</span> <span class="c1"># Prototype</span>
|
||||
<span class="c1">#"Default":{</span>
|
||||
<span class="c1"># "AddressStr":"",</span>
|
||||
<span class="c1"># "PortInt":80,</span>
|
||||
<span class="c1"># "CertFilePEMPathStr":None,</span>
|
||||
<span class="c1"># "KeyFilePathStr":None,</span>
|
||||
<span class="c1"># "ServerInstance": None</span>
|
||||
<span class="c1">#}</span>
|
||||
<span class="p">},</span>
|
||||
<span class="s2">"AccessUsers"</span><span class="p">:</span> <span class="p">{</span> <span class="c1"># Default - all URL is blocked</span>
|
||||
<span class="s2">"FlagCredentialsAsk"</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span> <span class="c1"># Turn on Authentication</span>
|
||||
<span class="s2">"RuleDomainUserDict"</span><span class="p">:</span> <span class="p">{</span>
|
||||
<span class="c1"># ("DOMAIN", "USER"): { !!!!! only in upper case !!!!</span>
|
||||
<span class="c1"># "MethodMatchURLBeforeList": [</span>
|
||||
<span class="c1"># {</span>
|
||||
<span class="c1"># "Method":"GET|POST",</span>
|
||||
<span class="c1"># "MatchType":"BeginWith|Contains|Equal|EqualCase",</span>
|
||||
<span class="c1"># "URL":"",</span>
|
||||
<span class="c1"># "FlagAccessDefRequestGlobalAuthenticate": None, #Return bool</span>
|
||||
<span class="c1"># "FlagAccess": True</span>
|
||||
<span class="c1"># }</span>
|
||||
<span class="c1"># ],</span>
|
||||
<span class="c1"># "ControlPanelKeyAllowedList":[], # If empty - all is allowed</span>
|
||||
<span class="c1"># "RoleHierarchyAllowedDict": {</span>
|
||||
<span class="c1"># "Orchestrator":{</span>
|
||||
<span class="c1"># "Controls": {</span>
|
||||
<span class="c1"># "RestartOrchestrator": {}, # Feature to restart orchestrator on virtual machine</span>
|
||||
<span class="c1"># "LookMachineScreenshots": {} # Feature to look machina screenshots</span>
|
||||
<span class="c1"># },</span>
|
||||
<span class="c1"># "RDPActive": { # Robot RDP active module</span>
|
||||
<span class="c1"># "ListRead": {} # Access to read RDP session list</span>
|
||||
<span class="c1"># }</span>
|
||||
<span class="c1"># }</span>
|
||||
<span class="c1"># }</span>
|
||||
<span class="c1"># }</span>
|
||||
<span class="p">},</span>
|
||||
<span class="s2">"RuleMethodMatchURLBeforeList"</span><span class="p">:</span> <span class="p">[</span> <span class="c1"># General MethodMatchURL list (no domain/user)</span>
|
||||
<span class="c1"># {</span>
|
||||
<span class="c1"># "Method":"GET|POST",</span>
|
||||
<span class="c1"># "MatchType":"BeginWith|Contains|Equal|EqualCase",</span>
|
||||
<span class="c1"># "URL":"",</span>
|
||||
<span class="c1"># "FlagAccessDefRequestGlobalAuthenticate": None, #Return bool</span>
|
||||
<span class="c1"># "FlagAccess": True</span>
|
||||
<span class="c1"># }</span>
|
||||
<span class="p">],</span>
|
||||
<span class="s2">"AuthTokensDict"</span><span class="p">:</span> <span class="p">{</span>
|
||||
<span class="c1"># "<AuthToken>":{"User":"", "Domain":"", "TokenDatetime":<Datetime>, "FlagDoNotExpire":True}</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">},</span>
|
||||
<span class="s2">"URLList"</span><span class="p">:</span> <span class="p">[</span> <span class="c1"># List of available URLs with the orchestrator server</span>
|
||||
<span class="c1"># {</span>
|
||||
<span class="c1"># "Method":"GET|POST",</span>
|
||||
<span class="c1"># "URL": "/index", #URL of the request</span>
|
||||
<span class="c1"># "MatchType": "", #"BeginWith|Contains|Equal|EqualCase",</span>
|
||||
<span class="c1"># "ResponseFilePath": "", #Absolute or relative path</span>
|
||||
<span class="c1"># "ResponseFolderPath": "", #Absolute or relative path</span>
|
||||
<span class="c1"># "ResponseContentType": "", #HTTP Content-type</span>
|
||||
<span class="c1"># "ResponseDefRequestGlobal": None ,#Function with str result</span>
|
||||
<span class="c1"># "UACBool": True # True - check user access before do this URL item. None - get Server flag if ask user</span>
|
||||
<span class="c1"># }</span>
|
||||
<span class="c1">#{</span>
|
||||
<span class="c1"># "Method": "GET",</span>
|
||||
<span class="c1"># "URL": "/test/", # URL of the request</span>
|
||||
<span class="c1"># "MatchType": "BeginWith", # "BeginWith|Contains|Equal|EqualCase",</span>
|
||||
<span class="c1"># # "ResponseFilePath": "", #Absolute or relative path</span>
|
||||
<span class="c1"># "ResponseFolderPath": "C:\Abs\Archive\scopeSrcUL\OpenRPA\Orchestrator\Settings",</span>
|
||||
<span class="c1"># # Absolute or relative path</span>
|
||||
<span class="c1"># # "ResponseContentType": "", #HTTP Content-type</span>
|
||||
<span class="c1"># # "ResponseDefRequestGlobal": None #Function with str result</span>
|
||||
<span class="c1"># # "UACBool": True # True - check user access before do this URL item</span>
|
||||
<span class="c1">#}</span>
|
||||
<span class="p">],</span>
|
||||
|
||||
<span class="p">},</span>
|
||||
<span class="s2">"OrchestratorStart"</span><span class="p">:</span> <span class="p">{</span>
|
||||
<span class="s2">"DefSettingsUpdatePathList"</span><span class="p">:</span> <span class="p">[],</span>
|
||||
<span class="c1"># List of the .py files which should be loaded before init the algorythms</span>
|
||||
<span class="s2">"ActivityList"</span><span class="p">:</span> <span class="p">[]</span>
|
||||
<span class="p">},</span>
|
||||
<span class="s2">"SchedulerDict"</span><span class="p">:</span> <span class="p">{</span>
|
||||
<span class="s2">"Schedule"</span><span class="p">:</span> <span class="n">schedule</span><span class="p">,</span> <span class="c1"># https://schedule.readthedocs.io/en/stable/examples.html</span>
|
||||
<span class="s2">"CheckIntervalSecFloat"</span><span class="p">:</span> <span class="mf">5.0</span><span class="p">,</span> <span class="c1"># Check interval in seconds</span>
|
||||
<span class="s2">"ActivityTimeList"</span><span class="p">:</span> <span class="p">[</span>
|
||||
<span class="c1"># {</span>
|
||||
<span class="c1"># "TimeHH:MMStr": "22:23", # Time [HH:MM] to trigger activity</span>
|
||||
<span class="c1"># "WeekdayList": [0, 1, 2, 3, 4, 5, 6], #List of the weekday index when activity is applicable, Default [0,1,2,3,4,5,6]</span>
|
||||
<span class="c1"># "ActivityList": [</span>
|
||||
<span class="c1"># # {</span>
|
||||
<span class="c1"># # "Def":"DefAliasTest", # def link or def alias (look gSettings["Processor"]["AliasDefDict"])</span>
|
||||
<span class="c1"># # "ArgList":[1,2,3], # Args list</span>
|
||||
<span class="c1"># # "ArgDict":{"ttt":1,"222":2,"dsd":3} # Args dictionary</span>
|
||||
<span class="c1"># # "ArgGSettings": # Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
|
||||
<span class="c1"># # "ArgLogger": None # Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
|
||||
<span class="c1"># # "GUIDStr": ..., # GUID of the activity</span>
|
||||
<span class="c1"># # },</span>
|
||||
<span class="c1"># ],</span>
|
||||
<span class="c1"># "GUID": None # Will be filled in Orchestrator automatically - is needed for detect activity completion</span>
|
||||
<span class="c1"># },</span>
|
||||
<span class="p">],</span>
|
||||
<span class="p">},</span>
|
||||
<span class="s2">"ManagersProcessDict"</span><span class="p">:{},</span> <span class="c1"># The key of the Process is (mAgentHostNameStr.upper(), mAgentUserNameStr.upper(), mProcessNameWOExeStr.upper())</span>
|
||||
<span class="s2">"ManagersGitDict"</span><span class="p">:{},</span> <span class="c1"># The key of the Git instance is (mAgentHostNameStr.upper(), mAgentUserNameStr.upper(), mAbsPathUpperStr.upper())</span>
|
||||
<span class="s2">"ProcessorDict"</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">"ActivityList"</span><span class="p">:</span> <span class="p">[</span> <span class="c1"># List of the activities</span>
|
||||
<span class="c1"># {</span>
|
||||
<span class="c1"># "Def":"DefAliasTest", # def link or def alias (look gSettings["Processor"]["AliasDefDict"])</span>
|
||||
<span class="c1"># "ArgList":[1,2,3], # Args list</span>
|
||||
<span class="c1"># "ArgDict":{"ttt":1,"222":2,"dsd":3} # Args dictionary</span>
|
||||
<span class="c1"># "ArgGSettings": # Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
|
||||
<span class="c1"># "ArgLogger": None # Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
|
||||
<span class="c1"># "GUIDStr": ..., # GUID of the activity</span>
|
||||
<span class="c1"># },</span>
|
||||
<span class="p">],</span>
|
||||
<span class="s2">"ActivityItemNowDict"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span> <span class="c1"># Activity Item which is executing now</span>
|
||||
<span class="s2">"AliasDefDict"</span><span class="p">:</span> <span class="p">{},</span> <span class="c1"># Storage for def with Str alias. To use it see pyOpenRPA.Orchestrator.ControlPanel</span>
|
||||
<span class="s2">"CheckIntervalSecFloat"</span><span class="p">:</span> <span class="mf">1.0</span><span class="p">,</span> <span class="c1"># Interval for check gSettings in ProcessorDict > ActivityList</span>
|
||||
<span class="s2">"ExecuteBool"</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span> <span class="c1"># Flag to execute thread processor</span>
|
||||
<span class="s2">"ThreadIdInt"</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">"WarningExecutionMoreThanSecFloat"</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"># # # # # # # # # # # # # #</span>
|
||||
<span class="s2">"RobotRDPActive"</span><span class="p">:</span> <span class="p">{</span>
|
||||
<span class="s2">"RecoveryDict"</span><span class="p">:</span> <span class="p">{</span>
|
||||
<span class="s2">"CatchPeriodSecFloat"</span><span class="p">:</span> <span class="mi">1200</span><span class="p">,</span> <span class="c1"># Catch last 10 minutes</span>
|
||||
<span class="s2">"TriggerCountInt"</span><span class="p">:</span> <span class="mi">10</span><span class="p">,</span> <span class="c1"># Activate trigger if for the period orch will catch the reconnect RDP n times</span>
|
||||
<span class="s2">"DoDict"</span><span class="p">:</span> <span class="p">{</span>
|
||||
<span class="s2">"OSRemotePCRestart"</span><span class="p">:</span> <span class="kc">True</span> <span class="c1"># Do powershell remote restart</span>
|
||||
<span class="p">},</span>
|
||||
<span class="s2">"__StatisticsDict__"</span><span class="p">:</span> <span class="p">{</span>
|
||||
<span class="c1"># RDPSessionKeyStr : [time.time(), time.time()],</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">},</span>
|
||||
<span class="s2">"RDPList"</span><span class="p">:</span> <span class="p">{</span>
|
||||
<span class="c1"># "RDPSessionKey":{</span>
|
||||
<span class="c1"># "Host": "77.77.22.22", # Host address</span>
|
||||
<span class="c1"># "Port": "3389", # RDP Port</span>
|
||||
<span class="c1"># "Login": "test", # Login</span>
|
||||
<span class="c1"># "Password": "test", # Password</span>
|
||||
<span class="c1"># "Screen": {</span>
|
||||
<span class="c1"># "Width": 1680, # Width of the remote desktop in pixels</span>
|
||||
<span class="c1"># "Height": 1050, # Height of the remote desktop in pixels</span>
|
||||
<span class="c1"># # "640x480" or "1680x1050" or "FullScreen". If Resolution not exists set full screen</span>
|
||||
<span class="c1"># "FlagUseAllMonitors": False, # True or False</span>
|
||||
<span class="c1"># "DepthBit": "32" # "32" or "24" or "16" or "15"</span>
|
||||
<span class="c1"># },</span>
|
||||
<span class="c1"># "SharedDriveList": ["c"], # List of the Root sesion hard drives</span>
|
||||
<span class="c1"># ###### Will updated in program ############</span>
|
||||
<span class="c1"># "SessionHex": "", # Hex is created when robot runs</span>
|
||||
<span class="c1"># "SessionIsWindowExistBool": False, # Flag if the RDP window is exist, old name "FlagSessionIsActive". Check every n seconds</span>
|
||||
<span class="c1"># "SessionIsWindowResponsibleBool": False, # Flag if RDP window is responsible (recieve commands). Check every nn seconds. If window is Responsible - window is Exist too</span>
|
||||
<span class="c1"># "SessionIsIgnoredBool": False # Flag to ignore RDP window False - dont ignore, True - ignore</span>
|
||||
<span class="c1"># }</span>
|
||||
<span class="p">},</span>
|
||||
<span class="s2">"ResponsibilityCheckIntervalSec"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
<span class="c1"># Seconds interval when Robot check the RDP responsibility. if None - dont check</span>
|
||||
<span class="s2">"FullScreenRDPSessionKeyStr"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
<span class="c1"># RDPSessionKeyStr of the current session which is full screened, None is no session in fullscreen</span>
|
||||
<span class="s2">"ActivityList"</span><span class="p">:</span> <span class="p">[</span>
|
||||
<span class="c1"># Technical Activity list for RobotRDPActive thread - equal to Main activity list, apply only RDP activity</span>
|
||||
<span class="c1"># {</span>
|
||||
<span class="c1"># "DefNameStr":"test", # Function name in RobotRDPActive.Processor</span>
|
||||
<span class="c1"># "ArgList":[1,2,3], # Args list</span>
|
||||
<span class="c1"># "ArgDict":{"ttt":1,"222":2,"dsd":3} # Args dictionary</span>
|
||||
<span class="c1"># },</span>
|
||||
<span class="c1"># {</span>
|
||||
<span class="c1"># "DefNameStr": "RDPSessionConnect", # Function name in RobotRDPActive.Processor</span>
|
||||
<span class="c1"># "ArgList": [], # Args list</span>
|
||||
<span class="c1"># "ArgDict": {"inRDPSessionKeyStr": "TestRDP", "inHostStr": "77.44.33.22", "inPortStr": "3389",</span>
|
||||
<span class="c1"># "inLoginStr": "login", "inPasswordStr": "pass"} # Args dictionary</span>
|
||||
<span class="c1"># },</span>
|
||||
<span class="c1"># {</span>
|
||||
<span class="c1"># "DefNameStr": "RDPSessionDisconnect", # Disconnect the RDP session without logoff. Function name in RobotRDPActive.Processor</span>
|
||||
<span class="c1"># "ArgList": [], # Args list</span>
|
||||
<span class="c1"># "ArgDict": {"inRDPSessionKeyStr": "TestRDP"}</span>
|
||||
<span class="c1"># },</span>
|
||||
<span class="c1"># {</span>
|
||||
<span class="c1"># "DefNameStr": "RDPSessionReconnect", # Disconnect the RDP session without logoff. Function name in RobotRDPActive.Processor</span>
|
||||
<span class="c1"># "ArgList": [], # Args list</span>
|
||||
<span class="c1"># "ArgDict": {"inRDPSessionKeyStr": "TestRDP"}</span>
|
||||
<span class="c1"># }</span>
|
||||
<span class="p">]</span>
|
||||
<span class="p">},</span>
|
||||
<span class="c1"># # # # # # # # # # # # # #</span>
|
||||
<span class="s2">"FileManager"</span><span class="p">:</span> <span class="p">{</span>
|
||||
<span class="s2">"FileURLFilePathDict_help"</span><span class="p">:</span> <span class="s2">"https://localhost:8081/filemanager/<file URL>. All FileURL s must be set in lowercase"</span><span class="p">,</span>
|
||||
<span class="s2">"FileURLFilePathDict"</span><span class="p">:</span> <span class="p">{</span>
|
||||
<span class="c1">#"r01/report.xlsx": "C:\\RPA\\R01_IntegrationOrderOut\\Data\\Reestr_otgruzok.xlsx"</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">},</span>
|
||||
<span class="s2">"Logger"</span><span class="p">:</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s2">"Orchestrator"</span><span class="p">),</span>
|
||||
<span class="s2">"StorageDict"</span><span class="p">:</span> <span class="p">{</span>
|
||||
<span class="s2">"Robot_R01_help"</span><span class="p">:</span> <span class="s2">"Robot data storage in orchestrator env"</span><span class="p">,</span>
|
||||
<span class="s2">"Robot_R01"</span><span class="p">:</span> <span class="p">{},</span>
|
||||
<span class="s2">"R01_OrchestratorToRobot"</span><span class="p">:</span> <span class="p">{</span><span class="s2">"Test2"</span><span class="p">:</span> <span class="s2">"Test2"</span><span class="p">}</span>
|
||||
<span class="p">},</span>
|
||||
<span class="s2">"AgentDict"</span><span class="p">:</span> <span class="p">{</span> <span class="c1"># Will be filled when program runs</span>
|
||||
<span class="c1">#("HostNameUpperStr", "UserUpperStr"): { "IsListenBool": True, "QueueList": [] }</span>
|
||||
<span class="p">},</span>
|
||||
<span class="s2">"AgentActivityReturnDict"</span><span class="p">:</span> <span class="p">{</span> <span class="c1"># Will be filled when programs run - fill result of the Activity execution on the agent</span>
|
||||
<span class="c1"># Key - Activity Item GUID str, Value {"Return": ..., "ReturnedByDatetime": datetime.datetime}</span>
|
||||
<span class="c1"># If key exists - def has been completed</span>
|
||||
<span class="p">}</span>
|
||||
<span class="c1"># "HiddenIsOrchestratorInitialized" - will be inited when orchestrator will be initialized</span>
|
||||
<span class="p">}</span>
|
||||
|
||||
<span class="c1"># Create full configuration for</span>
|
||||
<span class="k">def</span> <span class="nf">__AgentDictItemCreate__</span><span class="p">():</span>
|
||||
<span class="k">return</span> <span class="p">{</span><span class="s2">"IsListenBool"</span><span class="p">:</span><span class="kc">False</span><span class="p">,</span> <span class="s2">"ConnectionCountInt"</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span> <span class="s2">"ConnectionFirstQueueItemCountInt"</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span> <span class="s2">"ActivityList"</span><span class="p">:[]}</span>
|
||||
|
||||
<span class="c1"># Create full configuration for AgentActivityReturnDict</span>
|
||||
<span class="k">def</span> <span class="nf">__AgentActivityReturnDictItemCreate__</span><span class="p">(</span><span class="n">inReturn</span><span class="p">):</span>
|
||||
<span class="k">return</span> <span class="p">{</span><span class="s2">"Return"</span><span class="p">:</span> <span class="n">inReturn</span><span class="p">,</span> <span class="s2">"ReturnedByDatetime"</span><span class="p">:</span> <span class="n">datetime</span><span class="o">.</span><span class="n">datetime</span><span class="o">.</span><span class="n">now</span><span class="p">()}</span>
|
||||
|
||||
<span class="c1"># Create full configuration for</span>
|
||||
<span class="k">def</span> <span class="nf">__UACClientAdminCreate__</span><span class="p">():</span>
|
||||
<span class="n">lResultDict</span> <span class="o">=</span> <span class="p">{</span>
|
||||
<span class="s2">"pyOpenRPADict"</span><span class="p">:{</span>
|
||||
<span class="s2">"CPKeyDict"</span><span class="p">:{</span> <span class="c1"># Empty dict - all access</span>
|
||||
<span class="c1"># "CPKeyStr"{</span>
|
||||
<span class="c1"># }</span>
|
||||
<span class="p">},</span>
|
||||
<span class="s2">"RDPKeyDict"</span><span class="p">:{</span> <span class="c1"># Empty dict - all access</span>
|
||||
<span class="c1">#"RDPKeyStr"{</span>
|
||||
<span class="c1"># "FullscreenBool": True,</span>
|
||||
<span class="c1"># "IgnoreBool":True,</span>
|
||||
<span class="c1"># "ReconnectBool": True</span>
|
||||
<span class="c1"># "NothingBool": True # USe option if you dont want to give some access to the RDP controls</span>
|
||||
<span class="c1"># }</span>
|
||||
<span class="p">},</span>
|
||||
<span class="s2">"AgentKeyDict"</span><span class="p">:</span> <span class="p">{</span> <span class="c1"># Empty dict - all access</span>
|
||||
<span class="c1"># "AgentKeyStr"{</span>
|
||||
<span class="c1"># }</span>
|
||||
<span class="p">},</span>
|
||||
<span class="s2">"AdminDict"</span><span class="p">:{</span> <span class="c1"># Empty dict - all access</span>
|
||||
<span class="s2">"LogViewerBool"</span><span class="p">:</span><span class="kc">True</span><span class="p">,</span> <span class="c1"># Show log viewer on the web page</span>
|
||||
<span class="s2">"CMDInputBool"</span><span class="p">:</span><span class="kc">True</span><span class="p">,</span> <span class="c1"># Execute CMD on the server side and result to the logs</span>
|
||||
<span class="s2">"ScreenshotViewerBool"</span><span class="p">:</span><span class="kc">True</span><span class="p">,</span> <span class="c1"># Show button to look screenshots</span>
|
||||
<span class="s2">"RestartOrchestratorBool"</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span> <span class="c1"># Restart orchestrator activity</span>
|
||||
<span class="s2">"RestartOrchestratorGITPullBool"</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">"RestartPCBool"</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">"NothingBool"</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">"Debugging"</span><span class="p">:</span><span class="kc">True</span> <span class="c1"># Debugging tool</span>
|
||||
<span class="p">},</span>
|
||||
<span class="s2">"ActivityDict"</span><span class="p">:</span> <span class="p">{</span> <span class="c1"># Empty dict - all access</span>
|
||||
<span class="s2">"ActivityListExecuteBool"</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span> <span class="c1"># Execute activity at the current thread</span>
|
||||
<span class="s2">"ActivityListAppendProcessorQueueBool"</span><span class="p">:</span> <span class="kc">True</span> <span class="c1"># Append activity to the processor queue</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">}</span>
|
||||
|
||||
<span class="p">}</span>
|
||||
<span class="k">return</span> <span class="n">lResultDict</span>
|
||||
|
||||
|
||||
<span class="c1"># Init the log dump to WEB</span>
|
||||
<span class="c1"># import pdb; pdb.set_trace()</span>
|
||||
<span class="c1">############################################</span>
|
||||
<span class="k">def</span> <span class="nf">LoggerDumpLogHandlerAdd</span><span class="p">(</span><span class="n">inLogger</span><span class="p">,</span> <span class="n">inGSettingsClientDict</span><span class="p">):</span>
|
||||
<span class="n">lL</span> <span class="o">=</span> <span class="n">inLogger</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">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">'</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">'</span><span class="p">)</span>
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
<span class="n">mRobotLoggerFormatter</span> <span class="o">=</span> <span class="n">lL</span><span class="o">.</span><span class="n">handlers</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">formatter</span>
|
||||
<span class="n">mHandlerDumpLogList</span> <span class="o">=</span> <span class="n">LoggerHandlerDumpLogList</span><span class="o">.</span><span class="n">LoggerHandlerDumpLogList</span><span class="p">(</span><span class="n">inDict</span><span class="o">=</span><span class="n">inGSettingsClientDict</span><span class="p">,</span>
|
||||
<span class="n">inKeyStr</span><span class="o">=</span><span class="s2">"DumpLogList"</span><span class="p">,</span> <span class="n">inHashKeyStr</span><span class="o">=</span><span class="s2">"DumpLogListHashStr"</span><span class="p">,</span> <span class="n">inRowCountInt</span><span class="o">=</span><span class="n">inGSettingsClientDict</span><span class="p">[</span>
|
||||
<span class="s2">"DumpLogListCountInt"</span><span class="p">])</span>
|
||||
<span class="n">mHandlerDumpLogList</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">mHandlerDumpLogList</span><span class="p">)</span>
|
||||
|
||||
<span class="c1"># inModeStr:</span>
|
||||
<span class="c1"># "BASIC" - 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">"BASIC"</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">"BASIC"</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>
|
||||
<span class="c1"># add filemode="w" to overwrite</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="s2">"Reports"</span><span class="p">):</span>
|
||||
<span class="n">os</span><span class="o">.</span><span class="n">makedirs</span><span class="p">(</span><span class="s2">"Reports"</span><span class="p">)</span>
|
||||
<span class="c1">##########################</span>
|
||||
<span class="c1"># Подготовка логгера Robot</span>
|
||||
<span class="c1">#########################</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">"Logger"</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">"Reports</span><span class="se">\\</span><span class="s2">"</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">"%Y_%m_</span><span class="si">%d</span><span class="s2">"</span><span class="p">)</span> <span class="o">+</span> <span class="s2">".log"</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">'</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">'</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">"Client"</span><span class="p">])</span>
|
||||
<span class="c1">#mHandlerDumpLogList = LoggerHandlerDumpLogList.LoggerHandlerDumpLogList(inDict=lResult["Client"],</span>
|
||||
<span class="c1"># inKeyStr="DumpLogList",</span>
|
||||
<span class="c1"># inHashKeyStr="DumpLogListHashStr",</span>
|
||||
<span class="c1"># inRowCountInt=lResult["Client"][</span>
|
||||
<span class="c1"># "DumpLogListCountInt"])</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">"Pay attention! Your code has been call SettingsTemplate.Create - since pyOpenRPA v1.2.7 GSettings is creating automatically"</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>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
<a href="04_HowToUse.html" class="btn btn-neutral float-right" title="4. How to use" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
<a href="02_Defs.html" class="btn btn-neutral float-left" title="2. Defs" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© 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>
|
@ -1,291 +0,0 @@
|
||||
|
||||
|
||||
<!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>4. How to use — pyOpenRPA v1.2.0 documentation</title>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="../_static/favicon.ico"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Index" href="../genindex.html" />
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="5. UAC - User Access Control" href="05_UAC.html" />
|
||||
<link rel="prev" title="3. gSettings Template" href="03_gSettingsTemplate.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 & 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 class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="01_Orchestrator.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="02_Defs.html">2. Defs</a></li>
|
||||
<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>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">TOOLS</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="../index.html">pyOpenRPA</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="../index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>4. How to use</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
<a href="../_sources/Orchestrator/04_HowToUse.rst.txt" rel="nofollow"> View page source</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="how-to-use">
|
||||
<h1>4. How to use<a class="headerlink" href="#how-to-use" title="Permalink to this headline">¶</a></h1>
|
||||
<p>You need to run orchestrator process?</p>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s2">"__main__"</span><span class="p">:</span> <span class="c1"># New init way - allow run as module -m PyOpenRPA.Orchestrator</span>
|
||||
<span class="kn">from</span> <span class="nn">pyOpenRPA</span> <span class="kn">import</span> <span class="n">Orchestrator</span> <span class="c1"># Import orchestrator main</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">"BASIC"</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="c1"># Call the orchestrator main 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>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>If you need more configurations - so you can see here:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">psutil</span><span class="o">,</span> <span class="nn">datetime</span><span class="o">,</span> <span class="nn">logging</span><span class="o">,</span> <span class="nn">os</span><span class="o">,</span> <span class="nn">sys</span>
|
||||
|
||||
|
||||
<span class="c1"># Config settings</span>
|
||||
<span class="n">lPyOpenRPASourceFolderPathStr</span> <span class="o">=</span> <span class="sa">r</span><span class="s2">"..\Sources"</span> <span class="c1"># Path for test pyOpenRPA package</span>
|
||||
|
||||
<span class="c1"># Operations</span>
|
||||
<span class="k">if</span> <span class="n">lPyOpenRPASourceFolderPathStr</span> <span class="o">!=</span> <span class="s2">""</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="n">lPyOpenRPASourceFolderPathStr</span><span class="p">)))</span> <span class="c1"># Path for test pyOpenRPA package</span>
|
||||
<span class="c1"># Start import after config the pyOpenRPA folder</span>
|
||||
<span class="kn">from</span> <span class="nn">pyOpenRPA.Orchestrator</span> <span class="kn">import</span> <span class="n">SettingsTemplate</span> <span class="c1"># Import functionallity</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">pyOpenRPA</span> <span class="kn">import</span> <span class="n">Orchestrator</span> <span class="c1"># Import orchestrator main</span>
|
||||
<span class="c1">#Run as administrator</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="n">Orchestrator</span><span class="o">.</span><span class="n">OrchestratorIsAdmin</span><span class="p">():</span>
|
||||
<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">"Orchestrator will be run as administrator!"</span><span class="p">)</span>
|
||||
<span class="k">else</span><span class="p">:</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="BASIC") # Create GSettings with basic configuration - no more config is available from the box - you can create own</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">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"># 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>
|
||||
<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">"ND"</span><span class="p">,</span> <span class="n">inADStr</span><span class="o">=</span><span class="s2">""</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="n">inRoleHierarchyAllowedDict</span><span class="o">=</span><span class="n">lUACClientDict</span><span class="p">)</span>
|
||||
<span class="c1"># TEST Add User IMaslov - Add Login IMaslov to superuser of the Orchestrator</span>
|
||||
<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">"IMaslov"</span><span class="p">,</span> <span class="n">inADStr</span><span class="o">=</span><span class="s2">""</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">"1992-04-03-0643-ru-b4ff-openrpa52zzz"</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"># 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">"ControlPanel</span><span class="se">\\</span><span class="s2">CP_*.py"</span><span class="p">,</span> <span class="n">inDefStr</span><span class="o">=</span><span class="s2">"SettingsUpdate"</span><span class="p">,</span> <span class="n">inDefArgNameGSettingsStr</span><span class="o">=</span><span class="s2">"inGSettings"</span><span class="p">,</span> <span class="n">inAsyncInitBool</span><span class="o">=</span><span class="kc">True</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>
|
||||
|
||||
|
||||
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
<a href="05_UAC.html" class="btn btn-neutral float-right" title="5. UAC - User Access Control" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
<a href="03_gSettingsTemplate.html" class="btn btn-neutral float-left" title="3. gSettings Template" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© 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>
|
@ -1,463 +0,0 @@
|
||||
|
||||
|
||||
<!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>3. How to use — pyOpenRPA v1.2.0 documentation</title>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="../_static/favicon.ico"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Index" href="../genindex.html" />
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="4. Dependencies" href="04_Dependencies.html" />
|
||||
<link rel="prev" title="2. Defs" href="02_Defs.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search" >
|
||||
|
||||
|
||||
|
||||
<a href="../index.html" class="icon icon-home"> pyOpenRPA
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="caption"><span class="caption-text">GENERAL</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../01_HowToInstall.html">1. How to install</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../02_RoadMap.html">2. Roadmap</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../03_Copyrights_Contacts.html">3. Copyrights & Contacts</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">ROBOT</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="01_Robot.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="02_Defs.html">2. Defs</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">3. How to use</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#how-to-execute-rpa-script">How to execute RPA script</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#create-python-script">Create python script</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#execute-python-script">Execute python script</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#execute-in-the-python-x32">Execute in the Python x32</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#execute-in-the-python-x64">Execute in the Python x64</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#execute-from-cmd-file">Execute from .cmd file</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#use-in-studio-script-n-a">Use in studio script (n/a)</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#desktop-app-ui-access-win32-and-ui-automation-dlls">Desktop app UI access (win32 and UI automation dlls)</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#definitions">Definitions</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#what-is-uio">What is UIO?</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#uioselector-structure-example">UIOSelector structure & example</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#the-uidesktop-module-openrpa-robot-uidesktop-py">The UIDesktop module (OpenRPA/Robot/UIDesktop.py)</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#id1">The UIDesktop module (OpenRPA/Robot/UIDesktop.py)</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#theory-practice-web-app-ui-access-selenium">Theory & practice. WEB app UI access (selenium)</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#about">About</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#id4">How to use</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#theory-practice-keyboard-mouse-manipulation">Theory & practice. Keyboard & mouse manipulation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#theory-practice-screen-capture-image-recognition">Theory & practice. Screen capture & image recognition</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#how-to-automate-image-recognition-on-pc">How to automate image recognition on PC</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="04_Dependencies.html">4. Dependencies</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">STUDIO</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Studio/01_Studio.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Studio/02_HowToUse.html">2. How to use</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">ORCHESTRATOR</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/01_Orchestrator.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/02_Defs.html">2. Defs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/03_gSettingsTemplate.html">3. gSettings Template</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/04_HowToUse.html">4. How to use</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/05_UAC.html">5. UAC - User Access Control</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">AGENT</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">TOOLS</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="../index.html">pyOpenRPA</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="../index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>3. How to use</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
<a href="../_sources/Robot/03_HowToUse.rst.txt" rel="nofollow"> View page source</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="how-to-use">
|
||||
<h1>3. How to use<a class="headerlink" href="#how-to-use" title="Permalink to this headline">¶</a></h1>
|
||||
<p>The Robot tool is the main module for production process automation. It has no graphic/console interface. All low-level actions to OS are perfoming by the Robot tool in pyOpenRPA.</p>
|
||||
<div class="section" id="how-to-execute-rpa-script">
|
||||
<h2>How to execute RPA script<a class="headerlink" href="#how-to-execute-rpa-script" title="Permalink to this headline">¶</a></h2>
|
||||
<p>You can use the robot by the several ways:</p>
|
||||
<ul class="simple">
|
||||
<li><p>In Python script</p></li>
|
||||
<li><p>In Studio script (n/a)</p></li>
|
||||
</ul>
|
||||
<div class="section" id="create-python-script">
|
||||
<h3>Create python script<a class="headerlink" href="#create-python-script" title="Permalink to this headline">¶</a></h3>
|
||||
<p>In order to use robot just add Robot tool folder in work directory and add line “import GUI” in your script.</p>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">sys</span>
|
||||
<span class="n">sys</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s1">'../../'</span><span class="p">)</span>
|
||||
<span class="kn">import</span> <span class="nn">selenium</span> <span class="c1"># [Web app access](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.1.-Theory-&-practice:-Web-app-access-(Chrome,-Firefox,-Opera))<br></span>
|
||||
<span class="kn">import</span> <span class="nn">GUI</span> <span class="c1"># [Win32 & UI Automation access](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.2.-Theory-&-practice:-Desktop-app-UI-access-(win32-and-UI-automation-dlls)) <br></span>
|
||||
<span class="kn">import</span> <span class="nn">pyautogui</span> <span class="c1">#[Screen capture/recognition](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.4.-Theory-&-practice:-Screen-capture-&-image-recognition) [#Mouse manipulation](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.3.-Theory-&-practice:-Keyboard-&-mouse-manipulation)<br></span>
|
||||
<span class="kn">import</span> <span class="nn">cv2</span> <span class="c1"># [Computer vision](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.4.-Theory-&-practice:-Screen-capture-&-image-recognition)<br></span>
|
||||
<span class="kn">import</span> <span class="nn">keyboard</span> <span class="c1">#[Keyboard manipulation](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.3.-Theory-&-practice:-Keyboard-&-mouse-manipulation)<br></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="execute-python-script">
|
||||
<h3>Execute python script<a class="headerlink" href="#execute-python-script" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The pyOpenRPA is fully portable solution. It contains own python enviroment both 32 and 64 bit versions. So, you can execute your python script in several ways:
|
||||
- Execute in python x32 (OpenRPAResourcesWPy32-3720python-3.7.2)
|
||||
- Execute in python x64 (OpenRPAResourcesWPy64-3720python-3.7.2.amd64)
|
||||
- Execute from .cmd file</p>
|
||||
</div>
|
||||
<div class="section" id="execute-in-the-python-x32">
|
||||
<h3>Execute in the Python x32<a class="headerlink" href="#execute-in-the-python-x32" title="Permalink to this headline">¶</a></h3>
|
||||
<p>To execute your python script in x32 bit version just write in command line from x32 python directory:</p>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="s2">"\OpenRPA\Resources\WPy32-3720\python-3.7.2"</span>
|
||||
<span class="n">python</span><span class="o">.</span><span class="n">exe</span> <span class="s2">"path to your python script.py"</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="execute-in-the-python-x64">
|
||||
<h3>Execute in the Python x64<a class="headerlink" href="#execute-in-the-python-x64" title="Permalink to this headline">¶</a></h3>
|
||||
<p>To execute your python script in x32 bit version just write in command line from x32 python directory:</p>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="s2">"\OpenRPA\Resources\WPy64-3720\python-3.7.2.amd64"</span>
|
||||
<span class="n">python</span><span class="o">.</span><span class="n">exe</span> <span class="s2">"path to your python script.py"</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="execute-from-cmd-file">
|
||||
<h3>Execute from .cmd file<a class="headerlink" href="#execute-from-cmd-file" title="Permalink to this headline">¶</a></h3>
|
||||
<p>In order to simplify the execution process you can write several code lines in file with the .cmd extension:</p>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="o">%~</span><span class="n">dp0</span>
|
||||
<span class="n">copy</span> <span class="o">/</span><span class="n">Y</span> <span class="o">..</span>\<span class="n">Resources</span>\<span class="n">WPy32</span><span class="o">-</span><span class="mi">3720</span>\<span class="n">python</span><span class="o">-</span><span class="mf">3.7</span><span class="o">.</span><span class="mi">2</span>\<span class="n">python</span><span class="o">.</span><span class="n">exe</span> <span class="o">..</span>\<span class="n">Resources</span>\<span class="n">WPy32</span><span class="o">-</span><span class="mi">3720</span>\<span class="n">python</span><span class="o">-</span><span class="mf">3.7</span><span class="o">.</span><span class="mi">2</span>\<span class="n">OpenRPAOrchestrator</span><span class="o">.</span><span class="n">exe</span>
|
||||
<span class="o">.</span>\<span class="o">..</span>\<span class="n">Resources</span>\<span class="n">WPy32</span><span class="o">-</span><span class="mi">3720</span>\<span class="n">python</span><span class="o">-</span><span class="mf">3.7</span><span class="o">.</span><span class="mi">2</span>\<span class="n">OpenRPAOrchestrator</span><span class="o">.</span><span class="n">exe</span> <span class="n">orchestratorMain</span><span class="o">.</span><span class="n">py</span>
|
||||
<span class="n">pause</span> <span class="o">></span><span class="n">nul</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="use-in-studio-script-n-a">
|
||||
<h3>Use in studio script (n/a)<a class="headerlink" href="#use-in-studio-script-n-a" title="Permalink to this headline">¶</a></h3>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">sys</span>
|
||||
<span class="n">sys</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s1">'../../'</span><span class="p">)</span>
|
||||
<span class="kn">import</span> <span class="nn">GUI</span>
|
||||
<span class="kn">import</span> <span class="nn">keyboard</span>
|
||||
<span class="kn">import</span> <span class="nn">subprocess</span>
|
||||
<span class="kn">import</span> <span class="nn">time</span>
|
||||
|
||||
<span class="c1">#Highlight the UI Object in Folder explorer</span>
|
||||
<span class="n">GUI</span><span class="o">.</span><span class="n">UIOSelector_FocusHighlight</span><span class="p">([{</span><span class="s2">"class_name"</span><span class="p">:</span><span class="s2">"CabinetWClass"</span><span class="p">,</span><span class="s2">"backend"</span><span class="p">:</span><span class="s2">"uia"</span><span class="p">},{</span><span class="s2">"ctrl_index"</span><span class="p">:</span><span class="mi">2</span><span class="p">},{</span><span class="s2">"ctrl_index"</span><span class="p">:</span><span class="mi">0</span><span class="p">},{</span><span class="s2">"ctrl_index"</span><span class="p">:</span><span class="mi">2</span><span class="p">},{</span><span class="s2">"ctrl_index"</span><span class="p">:</span><span class="mi">0</span><span class="p">}])</span>
|
||||
|
||||
<span class="c1">#Wait 2 seconds</span>
|
||||
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">3</span><span class="p">)</span>
|
||||
|
||||
<span class="c1">#Loop: get child element of UI List</span>
|
||||
<span class="k">for</span> <span class="n">lItem</span> <span class="ow">in</span> <span class="n">GUI</span><span class="o">.</span><span class="n">UIOSelector_Get_UIO</span><span class="p">([{</span><span class="s2">"class_name"</span><span class="p">:</span><span class="s2">"CabinetWClass"</span><span class="p">,</span><span class="s2">"backend"</span><span class="p">:</span><span class="s2">"uia"</span><span class="p">},{</span><span class="s2">"ctrl_index"</span><span class="p">:</span><span class="mi">2</span><span class="p">},{</span><span class="s2">"ctrl_index"</span><span class="p">:</span><span class="mi">0</span><span class="p">},{</span><span class="s2">"ctrl_index"</span><span class="p">:</span><span class="mi">2</span><span class="p">},{</span><span class="s2">"ctrl_index"</span><span class="p">:</span><span class="mi">0</span><span class="p">}])</span><span class="o">.</span><span class="n">children</span><span class="p">():</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">lItem</span><span class="p">))</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Here you can find the docs and examples of the OpenRPA desktop (GUI) app access.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="desktop-app-ui-access-win32-and-ui-automation-dlls">
|
||||
<h2>Desktop app UI access (win32 and UI automation dlls)<a class="headerlink" href="#desktop-app-ui-access-win32-and-ui-automation-dlls" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="section" id="definitions">
|
||||
<h3>Definitions<a class="headerlink" href="#definitions" title="Permalink to this headline">¶</a></h3>
|
||||
<ul class="simple">
|
||||
<li><p><strong>UIO</strong> - UI Object (class of pywinauto UI object) [pywinauto.base_wrapper]</p></li>
|
||||
<li><p><strong>UIOSelector</strong> - List of dict (key attributes)</p></li>
|
||||
<li><p><strong>PWA</strong> - PyWinAuto</p></li>
|
||||
<li><p><strong>PWASpecification</strong> - List of dict (key attributes in pywinauto.find_window notation)</p></li>
|
||||
<li><p><strong>UIOTree</strong> - Recursive Dict of Dict … (UI Parent -> Child hierarchy)</p></li>
|
||||
<li><p><strong>UIOInfo</strong> - Dict of UIO attributes</p></li>
|
||||
<li><p><strong>UIOActivity</strong> - Activity of the UIO (UI object) from the Pywinauto module</p></li>
|
||||
<li><p><strong>UIOEI</strong> - UI Object info object</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="what-is-uio">
|
||||
<h3>What is UIO?<a class="headerlink" href="#what-is-uio" title="Permalink to this headline">¶</a></h3>
|
||||
<p>UIO is a User Interface Object (pyOpenRPA terminology). For maximum compatibility, this instance is inherited from the object model developed in the [pywinauto library (click to get a list of available class functions)](<a class="reference external" href="https://pywinauto.readthedocs.io/en/latest/code/pywinauto.base_wrapper.html">https://pywinauto.readthedocs.io/en/latest/code/pywinauto.base_wrapper.html</a>).</p>
|
||||
<p>This approach allows us to implement useful functionality that has already been successfully developed in other libraries, and Supplement it with the missing functionality. In our case, the missing functionality is the ability to dynamically access UIO objects using UIO selectors.</p>
|
||||
</div>
|
||||
<div class="section" id="uioselector-structure-example">
|
||||
<h3>UIOSelector structure & example<a class="headerlink" href="#uioselector-structure-example" title="Permalink to this headline">¶</a></h3>
|
||||
<p>UIOSelector is the list of condition items for the UIO in GUI. Each item has condition attributes for detect applicable UIO. Here is the description of the available condition attributes in item.</p>
|
||||
<p><strong>Desciption</strong></p>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span>[
|
||||
{
|
||||
"depth_start" :: [int, start from 1] :: the depth index, where to start check the condition list (default 1),
|
||||
"depth_end" :: [int, start from 1] :: the depth index, where to stop check the condition list (default 1),
|
||||
"ctrl_index" || "index" :: [int, starts from 0] :: the index of the UIO in parent UIO child list,
|
||||
"title" :: [str] :: the condition for the UIO attribute *title*,
|
||||
"title_re" :: [str] :: regular expression (python ver) for the condition for the UIO attribute *title*,
|
||||
"rich_text" :: [str] :: the condition for the UIO attribute *rich_text*,
|
||||
"rich_text_re" :: [str] :: regular expression (python ver) for the condition for the UIO attribute *rich_text*,
|
||||
"class_name" :: [str] :: the condition for the UIO attribute *class_name*,
|
||||
"class_name_re" :: [str] :: regular expression (python ver) for the condition for the UIO attribute *class_name*,
|
||||
"friendly_class_name" :: [str] :: the condition for the UIO attribute *friendly_class_name*,
|
||||
"friendly_class_name_re" :: [str] :: regular expression (python ver) for the condition for the UIO attribute *friendly_class_name*,
|
||||
"control_type" :: [str] :: the condition for the UIO attribute *control_type*,
|
||||
"control_type_re" :: [str] :: regular expression (python ver) for the condition for the UIO attribute *control_type*,
|
||||
"is_enabled" :: [bool] :: the condition for the UIO attribute *is_enabled*. If UI object is enabled on GUI,
|
||||
"is_visible" :: [bool] :: the condition for the UIO attribute *is_visible*. If UI object is visible on GUI,
|
||||
"backend" :: [str, "win32" || "uia"] :: the method of UIO extraction (default "win32"). ATTENTION! Current option can be only for the first item of the UIO selector. For the next items this option will be implemented from the first item.
|
||||
},
|
||||
{ ... specification next level UIO }
|
||||
]
|
||||
</pre></div>
|
||||
</div>
|
||||
<p><strong>The UIO selector example</strong></p>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="p">[</span>
|
||||
<span class="p">{</span><span class="s2">"class_name"</span><span class="p">:</span><span class="s2">"CalcFrame"</span><span class="p">,</span> <span class="s2">"backend"</span><span class="p">:</span><span class="s2">"win32"</span><span class="p">},</span> <span class="c1"># 1-st level UIO specification</span>
|
||||
<span class="p">{</span><span class="s2">"title"</span><span class="p">:</span><span class="s2">"Hex"</span><span class="p">,</span> <span class="s2">"depth_start"</span><span class="p">:</span><span class="mi">3</span><span class="p">,</span> <span class="s2">"depth_end"</span><span class="p">:</span> <span class="mi">3</span><span class="p">}</span> <span class="c1"># 3-rd level specification (because of attribute depth_start|depth_stop)</span>
|
||||
<span class="p">]</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="the-uidesktop-module-openrpa-robot-uidesktop-py">
|
||||
<h3>The UIDesktop module (OpenRPA/Robot/UIDesktop.py)<a class="headerlink" href="#the-uidesktop-module-openrpa-robot-uidesktop-py" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The UIDesktop is extension of the pywinauto module which provide access to the desktop apps by the <strong>win32</strong> and <strong>ui automation</strong> dll frameworks (big thx to the Microsoft :) ).</p>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># EXAMPLE 1</span>
|
||||
<span class="kn">from</span> <span class="nn">pyOpenRPA.Robot</span> <span class="kn">import</span> <span class="n">UIDesktop</span>
|
||||
|
||||
<span class="n">UIDesktop</span><span class="o">.</span><span class="n">UIOSelector_Get_UIO</span><span class="p">(</span>
|
||||
<span class="n">inSpecificationList</span><span class="o">=</span><span class="p">[</span>
|
||||
<span class="p">{</span><span class="s2">"title"</span><span class="p">:</span><span class="s2">"notepad.exe"</span><span class="p">},{</span><span class="s2">"title"</span><span class="p">:</span><span class="s2">"OK"</span><span class="p">}],</span>
|
||||
<span class="n">inElement</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
|
||||
<span class="n">inFlagRaiseException</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="id1">
|
||||
<h3>The UIDesktop module (OpenRPA/Robot/UIDesktop.py)<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The UIDesktop is extension of the pywinauto module which provide access to the desktop apps by the <strong>win32</strong> and <strong>ui automation</strong> dll frameworks (big thx to the Microsoft :) ).</p>
|
||||
<p><a href="#id2"><span class="problematic" id="id3">*</span></a>Naming convention: <InArgument>_<ActivityName>_<OutArgument - if exist>*<br></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="theory-practice-web-app-ui-access-selenium">
|
||||
<h2>Theory & practice. WEB app UI access (selenium)<a class="headerlink" href="#theory-practice-web-app-ui-access-selenium" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="section" id="about">
|
||||
<h3>About<a class="headerlink" href="#about" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The pyOpenRPA support web app manipulation (by the Selenium lib).
|
||||
More docs about selenium you can find here (<a class="reference external" href="https://selenium-python.readthedocs.io/">https://selenium-python.readthedocs.io/</a>)</p>
|
||||
</div>
|
||||
<div class="section" id="id4">
|
||||
<h3>How to use<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3>
|
||||
<p>To start use selenium just import selenium modules in the robot tool. Here is the example of the usage.</p>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">selenium</span> <span class="kn">import</span> <span class="n">webdriver</span>
|
||||
<span class="kn">from</span> <span class="nn">selenium.webdriver.common.keys</span> <span class="kn">import</span> <span class="n">Keys</span>
|
||||
|
||||
<span class="n">driver</span> <span class="o">=</span> <span class="n">webdriver</span><span class="o">.</span><span class="n">Chrome</span><span class="p">()</span>
|
||||
<span class="n">driver</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"http://www.python.org"</span><span class="p">)</span>
|
||||
<span class="k">assert</span> <span class="s2">"Python"</span> <span class="ow">in</span> <span class="n">driver</span><span class="o">.</span><span class="n">title</span>
|
||||
<span class="n">elem</span> <span class="o">=</span> <span class="n">driver</span><span class="o">.</span><span class="n">find_element_by_name</span><span class="p">(</span><span class="s2">"q"</span><span class="p">)</span>
|
||||
<span class="n">elem</span><span class="o">.</span><span class="n">clear</span><span class="p">()</span>
|
||||
<span class="n">elem</span><span class="o">.</span><span class="n">send_keys</span><span class="p">(</span><span class="s2">"pycon"</span><span class="p">)</span>
|
||||
<span class="n">elem</span><span class="o">.</span><span class="n">send_keys</span><span class="p">(</span><span class="n">Keys</span><span class="o">.</span><span class="n">RETURN</span><span class="p">)</span>
|
||||
<span class="k">assert</span> <span class="s2">"No results found."</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">driver</span><span class="o">.</span><span class="n">page_source</span>
|
||||
<span class="n">driver</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="theory-practice-keyboard-mouse-manipulation">
|
||||
<h2>Theory & practice. Keyboard & mouse manipulation<a class="headerlink" href="#theory-practice-keyboard-mouse-manipulation" title="Permalink to this headline">¶</a></h2>
|
||||
</div>
|
||||
<div class="section" id="theory-practice-screen-capture-image-recognition">
|
||||
<h2>Theory & practice. Screen capture & image recognition<a class="headerlink" href="#theory-practice-screen-capture-image-recognition" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="section" id="how-to-automate-image-recognition-on-pc">
|
||||
<h3>How to automate image recognition on PC<a class="headerlink" href="#how-to-automate-image-recognition-on-pc" title="Permalink to this headline">¶</a></h3>
|
||||
<p>Here you can find any ways you need to use in your business case:
|
||||
- Find the exact match on the screen with the other image
|
||||
- Use text recognition module (OCR)
|
||||
- Use computer vision (CV) to identify the objects on screen/image/video
|
||||
- Use artificial intelligence (AI) to make custom identification/classification/text recognition</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
<a href="04_Dependencies.html" class="btn btn-neutral float-right" title="4. Dependencies" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
<a href="02_Defs.html" class="btn btn-neutral float-left" title="2. Defs" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© 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>
|
@ -1,248 +0,0 @@
|
||||
|
||||
|
||||
<!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>4. Dependencies — pyOpenRPA v1.2.0 documentation</title>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="../_static/favicon.ico"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Index" href="../genindex.html" />
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="1. Description" href="../Studio/01_Studio.html" />
|
||||
<link rel="prev" title="3. How to use" href="03_HowToUse.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 & Contacts</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">ROBOT</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="01_Robot.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="02_Defs.html">2. Defs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="03_HowToUse.html">3. How to use</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">4. Dependencies</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">STUDIO</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Studio/01_Studio.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Studio/02_HowToUse.html">2. How to use</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">ORCHESTRATOR</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/01_Orchestrator.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/02_Defs.html">2. Defs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/03_gSettingsTemplate.html">3. gSettings Template</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/04_HowToUse.html">4. How to use</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/05_UAC.html">5. UAC - User Access Control</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">AGENT</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">TOOLS</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="../index.html">pyOpenRPA</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="../index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>4. Dependencies</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
<a href="../_sources/Robot/04_Dependencies.rst.txt" rel="nofollow"> View page source</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="dependencies">
|
||||
<h1>4. Dependencies<a class="headerlink" href="#dependencies" title="Permalink to this headline">¶</a></h1>
|
||||
<p>Python 3 x32 [psutil, pywinauto, wmi, PIL, keyboard, pyautogui, win32api (pywin32), selenium, openCV, tesseract, requests, lxml, PyMuPDF]
|
||||
Python 3 x64 [psutil, pywinauto, wmi, PIL, keyboard, pyautogui, win32api (pywin32), selenium, openCV, tesseract, requests, lxml, PyMuPDF]
|
||||
pywinauto (Windows GUI automation)
|
||||
Semantic UI CSS framework
|
||||
JsRender by <a class="reference external" href="https://www.jsviews.com">https://www.jsviews.com</a> (switch to Handlebars)
|
||||
Handlebars</p>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
<a href="../Studio/01_Studio.html" class="btn btn-neutral float-right" title="1. Description" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
<a href="03_HowToUse.html" class="btn btn-neutral float-left" title="3. How to use" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© 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>
|
@ -1,243 +0,0 @@
|
||||
|
||||
|
||||
<!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>1. Description — pyOpenRPA v1.2.0 documentation</title>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="../_static/favicon.ico"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Index" href="../genindex.html" />
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="2. How to use" href="02_HowToUse.html" />
|
||||
<link rel="prev" title="4. Dependencies" href="../Robot/04_Dependencies.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 & 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 class="current">
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="02_HowToUse.html">2. How to use</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">ORCHESTRATOR</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/01_Orchestrator.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/02_Defs.html">2. Defs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/03_gSettingsTemplate.html">3. gSettings Template</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/04_HowToUse.html">4. How to use</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/05_UAC.html">5. UAC - User Access Control</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">AGENT</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">TOOLS</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="../index.html">pyOpenRPA</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="../index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>1. Description</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
<a href="../_sources/Studio/01_Studio.rst.txt" rel="nofollow"> View page source</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="description">
|
||||
<h1>1. Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h1>
|
||||
<p>pyOpenRPA Studio is the executable process.</p>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
<a href="02_HowToUse.html" class="btn btn-neutral float-right" title="2. How to use" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
<a href="../Robot/04_Dependencies.html" class="btn btn-neutral float-left" title="4. Dependencies" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© 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>
|
@ -1,363 +0,0 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>2. How to use — pyOpenRPA v1.2.0 documentation</title>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="../_static/favicon.ico"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Index" href="../genindex.html" />
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="1. Description" href="../Orchestrator/01_Orchestrator.html" />
|
||||
<link rel="prev" title="1. Description" href="01_Studio.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 & 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 class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="01_Studio.html">1. Description</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">2. How to use</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#content">Content</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#how-to-run">How to run</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#ui-description">UI Description</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#gui-screenshot-1">GUI Screenshot 1</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#gui-screenshot-2">GUI Screenshot 2</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#how-to-extract-ui-tree">How to extract UI tree</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#action-click-the-button-expand">Action: Click the button “Expand”</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#result">Result</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#how-to-search-ui-object-by-mouse-hover">How to search UI object by mouse hover</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#action-click-the-button-mouse-search">Action: Click the button “Mouse search”</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#action-turn-mouse-on-the-ui-object-you-are-interested-and-hold-the-ctrl-key-for-3-seconds">Action: Turn mouse on the UI object you are interested and hold the “Ctrl” key for 3 seconds</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#result-the-interested-ui-object-will-be-shown-in-ui-tree-viewer">Result: The interested UI object will be shown in <code class="docutils literal notranslate"><span class="pre">UI</span> <span class="pre">tree</span> <span class="pre">viewer</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#how-to-extract-ui-object-properties">How to extract UI object properties</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#action-choose-the-ui-object-you-are-interested-and-click-it">Action: Choose the UI object you are interested and click it</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#result-the-ui-object-property-list-will-be-shown-in-selected-ui-object-property-list">Result: The UI object property list will be shown in <code class="docutils literal notranslate"><span class="pre">Selected</span> <span class="pre">UI</span> <span class="pre">object</span> <span class="pre">property</span> <span class="pre">list</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">ORCHESTRATOR</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/01_Orchestrator.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/02_Defs.html">2. Defs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/03_gSettingsTemplate.html">3. gSettings Template</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/04_HowToUse.html">4. How to use</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/05_UAC.html">5. UAC - User Access Control</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">AGENT</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">TOOLS</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="../index.html">pyOpenRPA</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="../index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>2. How to use</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
<a href="../_sources/Studio/02_HowToUse.rst.txt" rel="nofollow"> View page source</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="how-to-use">
|
||||
<h1>2. How to use<a class="headerlink" href="#how-to-use" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="section" id="content">
|
||||
<h2>Content<a class="headerlink" href="#content" title="Permalink to this headline">¶</a></h2>
|
||||
<ul class="simple">
|
||||
<li><p><a class="reference external" href="#how-to-run">How to run</a></p></li>
|
||||
<li><p><a class="reference external" href="#ui-description">UI Description</a></p></li>
|
||||
<li><p><a class="reference external" href="#how-to-extract-ui-tree">How to extract UI tree</a></p></li>
|
||||
<li><p><a class="reference external" href="#how-to-search-ui-object-by-mouse-hover">How to search UI object by mouse
|
||||
hover</a></p></li>
|
||||
<li><p><a class="reference external" href="#how-to-extract-ui-object-properties">How to extract UI object
|
||||
properties</a></p></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="how-to-run">
|
||||
<h2>How to run<a class="headerlink" href="#how-to-run" title="Permalink to this headline">¶</a></h2>
|
||||
<ul class="simple">
|
||||
<li><p>For OS x32</p></li>
|
||||
<li><p>Run (double click): OpenRPA_32.cmd (for OS x32)</p></li>
|
||||
<li><p>For OS x64</p></li>
|
||||
<li><p>Run (double click): OpenRPA_64.cmd (for OS x64)</p></li>
|
||||
<li><p>Wait text “running server” in console. Default browser will be open
|
||||
automatically</p></li>
|
||||
<li><p><strong>Attention!</strong> The studio tool does not support the Internet explorer
|
||||
(any version) for GUI rendering (lol)</p></li>
|
||||
</ul>
|
||||
<img alt="504b98f76747f63900a2943532a946bb.png" src="img/504b98f76747f63900a2943532a946bb.png" />
|
||||
</div>
|
||||
<div class="section" id="ui-description">
|
||||
<h2>UI Description<a class="headerlink" href="#ui-description" title="Permalink to this headline">¶</a></h2>
|
||||
<p><strong>The studio tool GUI contains of:</strong></p>
|
||||
<ol class="arabic simple">
|
||||
<li><p>UI tree viewer</p></li>
|
||||
<li><p>Selected UI object hierarchy list</p></li>
|
||||
<li><p>Selected UI object property list</p></li>
|
||||
<li><p>UIO selector editor</p></li>
|
||||
<li><p>UIO action panel</p></li>
|
||||
<li><p>Another Python activity panel</p></li>
|
||||
<li><p>Action/activity list</p></li>
|
||||
</ol>
|
||||
<p><em>Look it on the GUI screenshots are listed below</em></p>
|
||||
<div class="section" id="gui-screenshot-1">
|
||||
<h3>GUI Screenshot 1<a class="headerlink" href="#gui-screenshot-1" title="Permalink to this headline">¶</a></h3>
|
||||
<img alt="504b98f76747f63900a2943532a946bb.png" src="img/d3d6ad14a7e50843bd89d2b14a092fee.png" />
|
||||
</div>
|
||||
<div class="section" id="gui-screenshot-2">
|
||||
<h3>GUI Screenshot 2<a class="headerlink" href="#gui-screenshot-2" title="Permalink to this headline">¶</a></h3>
|
||||
<img alt="65b7d51c0a5b21e6b27dc23d4062d3ca.png" src="img/65b7d51c0a5b21e6b27dc23d4062d3ca.png" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="how-to-extract-ui-tree">
|
||||
<h2>How to extract UI tree<a class="headerlink" href="#how-to-extract-ui-tree" title="Permalink to this headline">¶</a></h2>
|
||||
<p>In order to extract the UI tree do the following: in <code class="docutils literal notranslate"><span class="pre">UI</span> <span class="pre">tree</span> <span class="pre">viewer</span></code>
|
||||
choose the object you are interested and click the button “Expand”. ##</p>
|
||||
<div class="section" id="action-click-the-button-expand">
|
||||
<h3>Action: Click the button “Expand”<a class="headerlink" href="#action-click-the-button-expand" title="Permalink to this headline">¶</a></h3>
|
||||
<img alt="6effc376ff6ea928840674bd744caced.png" src="img/6effc376ff6ea928840674bd744caced.png" />
|
||||
</div>
|
||||
<div class="section" id="result">
|
||||
<h3>Result<a class="headerlink" href="#result" title="Permalink to this headline">¶</a></h3>
|
||||
<img alt="18b9ab36126c8c32168bf5bbb9330701.png" src="img/18b9ab36126c8c32168bf5bbb9330701.png" />
|
||||
</div>
|
||||
<div class="section" id="how-to-search-ui-object-by-mouse-hover">
|
||||
<h3>How to search UI object by mouse hover<a class="headerlink" href="#how-to-search-ui-object-by-mouse-hover" title="Permalink to this headline">¶</a></h3>
|
||||
<p>In order to search UI object do the
|
||||
following: in <code class="docutils literal notranslate"><span class="pre">UI</span> <span class="pre">tree</span> <span class="pre">viewer</span></code> choose the parent object, where you are
|
||||
want to search UI object, and click the button “Mouse search”. The mouse
|
||||
search mode will start. Turn mouse on the UI object you are interested
|
||||
and wait when the studio will highlight the UI object. After the
|
||||
hightlight hold the “Ctrl” key and wait 3 seconds. The interested UI
|
||||
object will be shown in <code class="docutils literal notranslate"><span class="pre">UI</span> <span class="pre">tree</span> <span class="pre">viewer</span></code>.</p>
|
||||
</div>
|
||||
<div class="section" id="action-click-the-button-mouse-search">
|
||||
<h3>Action: Click the button “Mouse search”<a class="headerlink" href="#action-click-the-button-mouse-search" title="Permalink to this headline">¶</a></h3>
|
||||
<img alt="84d7e4de0c840631f87cf7b325b53ad8.png" src="img/84d7e4de0c840631f87cf7b325b53ad8.png" />
|
||||
</div>
|
||||
<div class="section" id="action-turn-mouse-on-the-ui-object-you-are-interested-and-hold-the-ctrl-key-for-3-seconds">
|
||||
<h3>Action: Turn mouse on the UI object you are interested and hold the “Ctrl” key for 3 seconds<a class="headerlink" href="#action-turn-mouse-on-the-ui-object-you-are-interested-and-hold-the-ctrl-key-for-3-seconds" title="Permalink to this headline">¶</a></h3>
|
||||
<img alt="b7c38d622bf5b7afa5b26d1686d7302a.png" src="img/b7c38d622bf5b7afa5b26d1686d7302a.png" />
|
||||
</div>
|
||||
<div class="section" id="result-the-interested-ui-object-will-be-shown-in-ui-tree-viewer">
|
||||
<h3>Result: The interested UI object will be shown in <code class="docutils literal notranslate"><span class="pre">UI</span> <span class="pre">tree</span> <span class="pre">viewer</span></code><a class="headerlink" href="#result-the-interested-ui-object-will-be-shown-in-ui-tree-viewer" title="Permalink to this headline">¶</a></h3>
|
||||
<img alt="629bbf4db2c01b9c640194230949fcd2.png" src="img/629bbf4db2c01b9c640194230949fcd2.png" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="how-to-extract-ui-object-properties">
|
||||
<h2>How to extract UI object properties<a class="headerlink" href="#how-to-extract-ui-object-properties" title="Permalink to this headline">¶</a></h2>
|
||||
<p>In order to extract UI object properties do the following: in
|
||||
<code class="docutils literal notranslate"><span class="pre">Selected</span> <span class="pre">UI</span> <span class="pre">object</span> <span class="pre">hierarchy</span> <span class="pre">list</span></code> choose the UI object you are
|
||||
interested and click it. The UI object property list will be shown in
|
||||
<code class="docutils literal notranslate"><span class="pre">Selected</span> <span class="pre">UI</span> <span class="pre">object</span> <span class="pre">property</span> <span class="pre">list</span></code></p>
|
||||
<div class="section" id="action-choose-the-ui-object-you-are-interested-and-click-it">
|
||||
<h3>Action: Choose the UI object you are interested and click it<a class="headerlink" href="#action-choose-the-ui-object-you-are-interested-and-click-it" title="Permalink to this headline">¶</a></h3>
|
||||
<img alt="2c27be5bdde20b5d062cbb40e74eaec5.png" src="img/2c27be5bdde20b5d062cbb40e74eaec5.png" />
|
||||
</div>
|
||||
<div class="section" id="result-the-ui-object-property-list-will-be-shown-in-selected-ui-object-property-list">
|
||||
<h3>Result: The UI object property list will be shown in <code class="docutils literal notranslate"><span class="pre">Selected</span> <span class="pre">UI</span> <span class="pre">object</span> <span class="pre">property</span> <span class="pre">list</span></code><a class="headerlink" href="#result-the-ui-object-property-list-will-be-shown-in-selected-ui-object-property-list" title="Permalink to this headline">¶</a></h3>
|
||||
<img alt="f235ae29099a713e0246cd574ac3a17c.png" src="img/f235ae29099a713e0246cd574ac3a17c.png" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
<a href="../Orchestrator/01_Orchestrator.html" class="btn btn-neutral float-right" title="1. Description" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
<a href="01_Studio.html" class="btn btn-neutral float-left" title="1. Description" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© 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>
|
Before Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 116 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 15 KiB |
@ -1,237 +0,0 @@
|
||||
|
||||
|
||||
<!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>Overview: module code — 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 & Contacts</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">ROBOT</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Robot/01_Robot.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Robot/02_Defs.html">2. Defs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Robot/03_HowToUse.html">3. How to use</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Robot/04_Dependencies.html">4. Dependencies</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">STUDIO</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Studio/01_Studio.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Studio/02_HowToUse.html">2. How to use</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">ORCHESTRATOR</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/01_Orchestrator.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/02_Defs.html">2. Defs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/03_gSettingsTemplate.html">3. gSettings Template</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/04_HowToUse.html">4. How to use</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/05_UAC.html">5. UAC - User Access Control</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">AGENT</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Agent/02_Defs.html">2. Defs</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">TOOLS</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../Tools/02_Defs.html">2. Defs StopSafe</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="../index.html">pyOpenRPA</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="../index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>Overview: module code</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>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>
|
||||
<li><a href="pyOpenRPA/Tools/StopSafe.html">pyOpenRPA.Tools.StopSafe</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© 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>
|
@ -1,477 +0,0 @@
|
||||
|
||||
|
||||
<!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.Agent.__Agent__ — 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 & Contacts</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">ROBOT</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../Robot/01_Robot.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../Robot/02_Defs.html">2. Defs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../Robot/03_HowToUse.html">3. How to use</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../Robot/04_Dependencies.html">4. Dependencies</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">STUDIO</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../Studio/01_Studio.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../Studio/02_HowToUse.html">2. How to use</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">ORCHESTRATOR</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/01_Orchestrator.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/02_Defs.html">2. Defs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/03_gSettingsTemplate.html">3. gSettings Template</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/04_HowToUse.html">4. How to use</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/05_UAC.html">5. UAC - User Access Control</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">AGENT</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../Agent/02_Defs.html">2. Defs</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">TOOLS</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../Tools/02_Defs.html">2. Defs StopSafe</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="../../../index.html">pyOpenRPA</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="../../../index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li><a href="../../index.html">Module code</a> »</li>
|
||||
|
||||
<li>pyOpenRPA.Agent.__Agent__</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.Agent.__Agent__</h1><div class="highlight"><pre>
|
||||
<span></span><span class="kn">import</span> <span class="nn">threading</span><span class="o">,</span> <span class="nn">socket</span><span class="o">,</span> <span class="nn">getpass</span><span class="o">,</span> <span class="nn">sys</span><span class="o">,</span> <span class="nn">uuid</span><span class="o">,</span> <span class="nn">subprocess</span><span class="o">,</span> <span class="nn">base64</span><span class="o">,</span> <span class="nn">psutil</span><span class="o">,</span> <span class="nn">getpass</span><span class="o">,</span> <span class="nn">time</span>
|
||||
<span class="kn">from</span> <span class="nn">.</span> <span class="kn">import</span> <span class="n">O2A</span><span class="p">,</span> <span class="n">A2O</span> <span class="c1"># Data flow Orchestrator To Agent</span>
|
||||
<span class="kn">from</span> <span class="nn">.</span> <span class="kn">import</span> <span class="n">Processor</span> <span class="c1"># Processor Queue</span>
|
||||
<span class="kn">from</span> <span class="nn">subprocess</span> <span class="kn">import</span> <span class="n">CREATE_NEW_CONSOLE</span> <span class="c1"># Flag to create new process in another CMD</span>
|
||||
<span class="kn">import</span> <span class="nn">os</span>
|
||||
|
||||
<span class="n">gSettings</span> <span class="o">=</span> <span class="kc">None</span>
|
||||
|
||||
<span class="c1"># Create binary file by the base64 string (safe for JSON transmition)</span>
|
||||
<div class="viewcode-block" id="OSFileBinaryDataBase64StrCreate"><a class="viewcode-back" href="../../../Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSFileBinaryDataBase64StrCreate">[docs]</a><span class="k">def</span> <span class="nf">OSFileBinaryDataBase64StrCreate</span><span class="p">(</span><span class="n">inFilePathStr</span><span class="p">,</span> <span class="n">inFileDataBase64Str</span><span class="p">,</span><span class="n">inGSettings</span> <span class="o">=</span> <span class="kc">None</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Create binary file by the base64 string (safe for JSON transmition)</span>
|
||||
|
||||
<span class="sd"> """</span>
|
||||
<span class="n">lFile</span> <span class="o">=</span> <span class="nb">open</span><span class="p">(</span><span class="n">inFilePathStr</span><span class="p">,</span> <span class="s2">"wb"</span><span class="p">)</span>
|
||||
<span class="n">lFile</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">base64</span><span class="o">.</span><span class="n">b64decode</span><span class="p">(</span><span class="n">inFileDataBase64Str</span><span class="p">))</span>
|
||||
<span class="n">lFile</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
|
||||
<span class="n">lL</span> <span class="o">=</span> <span class="n">inGSettings</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"Logger"</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span> <span class="k">if</span> <span class="nb">type</span><span class="p">(</span><span class="n">inGSettings</span><span class="p">)</span> <span class="ow">is</span> <span class="nb">dict</span> <span class="k">else</span> <span class="kc">None</span>
|
||||
<span class="n">lMessageStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"AGENT Binary file </span><span class="si">{</span><span class="n">inFilePathStr</span><span class="si">}</span><span class="s2"> has been created."</span>
|
||||
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="n">lMessageStr</span><span class="p">)</span>
|
||||
<span class="n">A2O</span><span class="o">.</span><span class="n">LogListSend</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inLogList</span><span class="o">=</span><span class="p">[</span><span class="n">lMessageStr</span><span class="p">])</span></div>
|
||||
|
||||
<span class="c1"># Append binary file by the base64 string (safe for JSON transmition)</span>
|
||||
<div class="viewcode-block" id="OSFileBinaryDataBase64StrAppend"><a class="viewcode-back" href="../../../Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSFileBinaryDataBase64StrAppend">[docs]</a><span class="k">def</span> <span class="nf">OSFileBinaryDataBase64StrAppend</span><span class="p">(</span><span class="n">inFilePathStr</span><span class="p">,</span> <span class="n">inFileDataBase64Str</span><span class="p">,</span><span class="n">inGSettings</span> <span class="o">=</span> <span class="kc">None</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Create binary file by the base64 string (safe for JSON transmition)</span>
|
||||
|
||||
<span class="sd"> """</span>
|
||||
<span class="n">lFile</span> <span class="o">=</span> <span class="nb">open</span><span class="p">(</span><span class="n">inFilePathStr</span><span class="p">,</span> <span class="s2">"ab"</span><span class="p">)</span>
|
||||
<span class="n">lFile</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">base64</span><span class="o">.</span><span class="n">b64decode</span><span class="p">(</span><span class="n">inFileDataBase64Str</span><span class="p">))</span>
|
||||
<span class="n">lFile</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
|
||||
<span class="n">lL</span> <span class="o">=</span> <span class="n">inGSettings</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"Logger"</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span> <span class="k">if</span> <span class="nb">type</span><span class="p">(</span><span class="n">inGSettings</span><span class="p">)</span> <span class="ow">is</span> <span class="nb">dict</span> <span class="k">else</span> <span class="kc">None</span>
|
||||
<span class="n">lMessageStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"AGENT Binary file </span><span class="si">{</span><span class="n">inFilePathStr</span><span class="si">}</span><span class="s2"> has been appended."</span>
|
||||
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="n">lMessageStr</span><span class="p">)</span>
|
||||
<span class="n">A2O</span><span class="o">.</span><span class="n">LogListSend</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inLogList</span><span class="o">=</span><span class="p">[</span><span class="n">lMessageStr</span><span class="p">])</span></div>
|
||||
|
||||
<span class="c1"># Create text file by the string</span>
|
||||
<div class="viewcode-block" id="OSFileTextDataStrCreate"><a class="viewcode-back" href="../../../Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSFileTextDataStrCreate">[docs]</a><span class="k">def</span> <span class="nf">OSFileTextDataStrCreate</span><span class="p">(</span><span class="n">inFilePathStr</span><span class="p">,</span> <span class="n">inFileDataStr</span><span class="p">,</span> <span class="n">inEncodingStr</span> <span class="o">=</span> <span class="s2">"utf-8"</span><span class="p">,</span><span class="n">inGSettings</span> <span class="o">=</span> <span class="kc">None</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Create text file in the agent GUI session</span>
|
||||
|
||||
<span class="sd"> :param inFilePathStr: File abs path</span>
|
||||
<span class="sd"> :param inFileDataStr: File data text content</span>
|
||||
<span class="sd"> :param inEncodingStr: Write file encoding</span>
|
||||
<span class="sd"> :param inGSettings: global settings of the Agent (singleton)</span>
|
||||
<span class="sd"> :return:</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="n">lFile</span> <span class="o">=</span> <span class="nb">open</span><span class="p">(</span><span class="n">inFilePathStr</span><span class="p">,</span> <span class="s2">"w"</span><span class="p">,</span> <span class="n">encoding</span><span class="o">=</span><span class="n">inEncodingStr</span><span class="p">)</span>
|
||||
<span class="n">lFile</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">inFileDataStr</span><span class="p">)</span>
|
||||
<span class="n">lFile</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
|
||||
<span class="n">lL</span> <span class="o">=</span> <span class="n">inGSettings</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"Logger"</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span> <span class="k">if</span> <span class="nb">type</span><span class="p">(</span><span class="n">inGSettings</span><span class="p">)</span> <span class="ow">is</span> <span class="nb">dict</span> <span class="k">else</span> <span class="kc">None</span>
|
||||
<span class="n">lMessageStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"AGENT Text file </span><span class="si">{</span><span class="n">inFilePathStr</span><span class="si">}</span><span class="s2"> has been created."</span>
|
||||
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="n">lMessageStr</span><span class="p">)</span>
|
||||
<span class="n">A2O</span><span class="o">.</span><span class="n">LogListSend</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inLogList</span><span class="o">=</span><span class="p">[</span><span class="n">lMessageStr</span><span class="p">])</span></div>
|
||||
|
||||
<div class="viewcode-block" id="OSFileBinaryDataBase64StrReceive"><a class="viewcode-back" href="../../../Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSFileBinaryDataBase64StrReceive">[docs]</a><span class="k">def</span> <span class="nf">OSFileBinaryDataBase64StrReceive</span><span class="p">(</span><span class="n">inFilePathStr</span><span class="p">,</span> <span class="n">inGSettings</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Read binary file and encode in base64 to transmit (safe for JSON transmition)</span>
|
||||
|
||||
<span class="sd"> :param inFilePathStr: File path to read</span>
|
||||
<span class="sd"> :param inGSettings: global settings of the Agent (singleton)</span>
|
||||
<span class="sd"> :return: File content in string base64 format (use base64.b64decode to decode data). Return None if file is not exist</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="n">lL</span> <span class="o">=</span> <span class="n">inGSettings</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"Logger"</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span> <span class="k">if</span> <span class="nb">type</span><span class="p">(</span><span class="n">inGSettings</span><span class="p">)</span> <span class="ow">is</span> <span class="nb">dict</span> <span class="k">else</span> <span class="kc">None</span>
|
||||
<span class="n">lFileDataBase64Str</span> <span class="o">=</span> <span class="kc">None</span>
|
||||
<span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">inFilePathStr</span><span class="p">):</span>
|
||||
<span class="n">lFile</span> <span class="o">=</span> <span class="nb">open</span><span class="p">(</span><span class="n">inFilePathStr</span><span class="p">,</span> <span class="s2">"rb"</span><span class="p">)</span>
|
||||
<span class="n">lFileDataBytes</span> <span class="o">=</span> <span class="n">lFile</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>
|
||||
<span class="n">lFile</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
|
||||
<span class="n">lFileDataBase64Str</span> <span class="o">=</span> <span class="n">base64</span><span class="o">.</span><span class="n">b64encode</span><span class="p">(</span><span class="n">lFileDataBytes</span><span class="p">)</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s2">"utf-8"</span><span class="p">)</span>
|
||||
<span class="n">lMessageStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"OSFileBinaryDataBase64StrReceive: file </span><span class="si">{</span><span class="n">inFilePathStr</span><span class="si">}</span><span class="s2"> has been read"</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">debug</span><span class="p">(</span><span class="n">lMessageStr</span><span class="p">)</span>
|
||||
<span class="c1">#A2O.LogListSend(inGSettings=inGSettings, inLogList=[lMessageStr])</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">debug</span><span class="p">(</span><span class="sa">f</span><span class="s2">"OSFileBinaryDataBase64StrReceive: file </span><span class="si">{</span><span class="n">inFilePathStr</span><span class="si">}</span><span class="s2"> is not exists - return None"</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="n">lFileDataBase64Str</span></div>
|
||||
|
||||
<div class="viewcode-block" id="OSFileMTimeGet"><a class="viewcode-back" href="../../../Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSFileMTimeGet">[docs]</a><span class="k">def</span> <span class="nf">OSFileMTimeGet</span><span class="p">(</span><span class="n">inFilePathStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="nb">float</span> <span class="ow">or</span> <span class="kc">None</span><span class="p">:</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Read file modification time timestamp format (float)</span>
|
||||
|
||||
<span class="sd"> :param inFilePathStr: File path to read</span>
|
||||
<span class="sd"> :return: timestamp (float) Return None if file is not exist</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">global</span> <span class="n">gSettings</span>
|
||||
<span class="n">lL</span> <span class="o">=</span> <span class="n">gSettings</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"Logger"</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span> <span class="k">if</span> <span class="nb">type</span><span class="p">(</span><span class="n">gSettings</span><span class="p">)</span> <span class="ow">is</span> <span class="nb">dict</span> <span class="k">else</span> <span class="kc">None</span>
|
||||
<span class="n">lFileMTimeFloat</span> <span class="o">=</span> <span class="kc">None</span>
|
||||
<span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">inFilePathStr</span><span class="p">):</span>
|
||||
<span class="n">lFileMTimeFloat</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">getmtime</span><span class="p">(</span><span class="n">inFilePathStr</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">debug</span><span class="p">(</span><span class="sa">f</span><span class="s2">"OSFileMTimeGet: file </span><span class="si">{</span><span class="n">inFilePathStr</span><span class="si">}</span><span class="s2"> has been read"</span><span class="p">)</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">debug</span><span class="p">(</span><span class="sa">f</span><span class="s2">"OSFileMTimeGet: file </span><span class="si">{</span><span class="n">inFilePathStr</span><span class="si">}</span><span class="s2"> is not exists - return None"</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="n">lFileMTimeFloat</span></div>
|
||||
|
||||
<div class="viewcode-block" id="OSFileTextDataStrReceive"><a class="viewcode-back" href="../../../Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSFileTextDataStrReceive">[docs]</a><span class="k">def</span> <span class="nf">OSFileTextDataStrReceive</span><span class="p">(</span><span class="n">inFilePathStr</span><span class="p">,</span> <span class="n">inEncodingStr</span><span class="o">=</span><span class="s2">"utf-8"</span><span class="p">,</span> <span class="n">inGSettings</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Read text file in the agent GUI session</span>
|
||||
|
||||
<span class="sd"> :param inFilePathStr: File abs path</span>
|
||||
<span class="sd"> :param inEncodingStr: Read file encoding. Default utf-8</span>
|
||||
<span class="sd"> :param inGSettings: global settings of the Agent (singleton)</span>
|
||||
<span class="sd"> :return: File text content in string format (use base64.b64decode to decode data). Return None if file is not exist</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="n">lFileDataStr</span> <span class="o">=</span> <span class="kc">None</span>
|
||||
<span class="n">lL</span> <span class="o">=</span> <span class="n">inGSettings</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"Logger"</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span> <span class="k">if</span> <span class="nb">type</span><span class="p">(</span><span class="n">inGSettings</span><span class="p">)</span> <span class="ow">is</span> <span class="nb">dict</span> <span class="k">else</span> <span class="kc">None</span>
|
||||
<span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">inFilePathStr</span><span class="p">):</span>
|
||||
<span class="n">lFile</span> <span class="o">=</span> <span class="nb">open</span><span class="p">(</span><span class="n">inFilePathStr</span><span class="p">,</span> <span class="s2">"r"</span><span class="p">,</span> <span class="n">encoding</span><span class="o">=</span><span class="n">inEncodingStr</span><span class="p">)</span>
|
||||
<span class="n">lFileDataStr</span> <span class="o">=</span> <span class="n">lFile</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>
|
||||
<span class="n">lFile</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
|
||||
<span class="n">lMessageStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"OSFileTextDataStrReceive: file </span><span class="si">{</span><span class="n">inFilePathStr</span><span class="si">}</span><span class="s2"> has been read"</span>
|
||||
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="n">lMessageStr</span><span class="p">)</span>
|
||||
<span class="c1">#A2O.LogListSend(inGSettings=inGSettings, inLogList=[lMessageStr])</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">info</span><span class="p">(</span><span class="sa">f</span><span class="s2">"OSFileTextDataStrReceive: file </span><span class="si">{</span><span class="n">inFilePathStr</span><span class="si">}</span><span class="s2"> is not exists - return None"</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="n">lFileDataStr</span></div>
|
||||
|
||||
<span class="c1"># Send CMD to OS. Result return to log + Orchestrator by the A2O connection</span>
|
||||
<div class="viewcode-block" id="OSCMD"><a class="viewcode-back" href="../../../Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.OSCMD">[docs]</a><span class="k">def</span> <span class="nf">OSCMD</span><span class="p">(</span><span class="n">inCMDStr</span><span class="p">,</span> <span class="n">inRunAsyncBool</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">inGSettings</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="n">inSendOutputToOrchestratorLogsBool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">,</span> <span class="n">inCMDEncodingStr</span> <span class="o">=</span> <span class="s2">"cp1251"</span><span class="p">,</span> <span class="n">inCaptureBool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Execute CMD on the Agent daemonic process</span>
|
||||
|
||||
<span class="sd"> :param inCMDStr: command to execute on the Agent session</span>
|
||||
<span class="sd"> :param inRunAsyncBool: True - Agent processor don't wait execution; False - Agent processor wait cmd execution</span>
|
||||
<span class="sd"> :param inGSettings: Agent global settings dict</span>
|
||||
<span class="sd"> :param inSendOutputToOrchestratorLogsBool: True - catch cmd execution output and send it to the Orchestrator logs; Flase - else case; Default True</span>
|
||||
<span class="sd"> :param inCMDEncodingStr: Set the encoding of the DOS window on the Agent server session. Windows is beautiful :) . Default is "cp1251" early was "cp866" - need test</span>
|
||||
<span class="sd"> :param inCaptureBool: !ATTENTION! If you need to start absolutely encapsulated app - set this flag as False. If you set True - the app output will come to Agent</span>
|
||||
<span class="sd"> :return:</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="n">lResultStr</span> <span class="o">=</span> <span class="s2">""</span>
|
||||
<span class="c1"># New feature</span>
|
||||
<span class="k">if</span> <span class="n">inSendOutputToOrchestratorLogsBool</span> <span class="o">==</span> <span class="kc">False</span> <span class="ow">and</span> <span class="n">inCaptureBool</span> <span class="o">==</span> <span class="kc">False</span><span class="p">:</span>
|
||||
<span class="n">inCMDStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"start </span><span class="si">{</span><span class="n">inCMDStr</span><span class="si">}</span><span class="s2">"</span>
|
||||
<span class="c1"># Subdef to listen OS result</span>
|
||||
<span class="k">def</span> <span class="nf">_CMDRunAndListenLogs</span><span class="p">(</span><span class="n">inCMDStr</span><span class="p">,</span> <span class="n">inSendOutputToOrchestratorLogsBool</span><span class="p">,</span> <span class="n">inCMDEncodingStr</span><span class="p">,</span> <span class="n">inGSettings</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="n">inCaptureBool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">):</span>
|
||||
<span class="n">lL</span> <span class="o">=</span> <span class="n">inGSettings</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"Logger"</span><span class="p">,</span><span class="kc">None</span><span class="p">)</span> <span class="k">if</span> <span class="nb">type</span><span class="p">(</span><span class="n">inGSettings</span><span class="p">)</span> <span class="ow">is</span> <span class="nb">dict</span> <span class="k">else</span> <span class="kc">None</span>
|
||||
<span class="n">lResultStr</span> <span class="o">=</span> <span class="s2">""</span>
|
||||
<span class="n">lOSCMDKeyStr</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">uuid</span><span class="o">.</span><span class="n">uuid4</span><span class="p">())[</span><span class="mi">0</span><span class="p">:</span><span class="mi">4</span><span class="p">]</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span>
|
||||
<span class="n">lCMDProcess</span> <span class="o">=</span> <span class="kc">None</span>
|
||||
<span class="k">if</span> <span class="n">inCaptureBool</span> <span class="o">==</span> <span class="kc">True</span><span class="p">:</span>
|
||||
<span class="n">lCMDProcess</span> <span class="o">=</span> <span class="n">subprocess</span><span class="o">.</span><span class="n">Popen</span><span class="p">(</span><span class="sa">f</span><span class="s1">'cmd /c </span><span class="si">{</span><span class="n">inCMDStr</span><span class="si">}</span><span class="s1">'</span><span class="p">,</span> <span class="n">stdout</span><span class="o">=</span><span class="n">subprocess</span><span class="o">.</span><span class="n">PIPE</span><span class="p">,</span> <span class="n">stderr</span><span class="o">=</span><span class="n">subprocess</span><span class="o">.</span><span class="n">STDOUT</span><span class="p">)</span>
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
<span class="n">lCMDProcess</span> <span class="o">=</span> <span class="n">subprocess</span><span class="o">.</span><span class="n">Popen</span><span class="p">(</span><span class="sa">f</span><span class="s1">'cmd /c </span><span class="si">{</span><span class="n">inCMDStr</span><span class="si">}</span><span class="s1">'</span><span class="p">,</span> <span class="n">stdout</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">stderr</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
|
||||
<span class="n">creationflags</span><span class="o">=</span><span class="n">CREATE_NEW_CONSOLE</span><span class="p">)</span>
|
||||
<span class="n">lListenBool</span> <span class="o">=</span> <span class="kc">True</span>
|
||||
<span class="n">lMessageStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">lOSCMDKeyStr</span><span class="si">}</span><span class="s2">: # # # # AGENT CMD Process has been STARTED # # # # "</span>
|
||||
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="n">lMessageStr</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="n">inSendOutputToOrchestratorLogsBool</span> <span class="o">==</span> <span class="kc">True</span><span class="p">:</span> <span class="c1"># Capturing can be turned on!</span>
|
||||
<span class="n">A2O</span><span class="o">.</span><span class="n">LogListSend</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">inGSettings</span><span class="p">,</span><span class="n">inLogList</span><span class="o">=</span><span class="p">[</span><span class="n">lMessageStr</span><span class="p">])</span>
|
||||
<span class="n">lMessageStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">lOSCMDKeyStr</span><span class="si">}</span><span class="s2">: </span><span class="si">{</span><span class="n">inCMDStr</span><span class="si">}</span><span class="s2">"</span>
|
||||
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="n">lMessageStr</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="n">inSendOutputToOrchestratorLogsBool</span> <span class="o">==</span> <span class="kc">True</span><span class="p">:</span> <span class="c1"># Capturing can be turned on!</span>
|
||||
<span class="n">A2O</span><span class="o">.</span><span class="n">LogListSend</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inLogList</span><span class="o">=</span><span class="p">[</span><span class="n">lMessageStr</span><span class="p">])</span>
|
||||
<span class="k">while</span> <span class="n">lListenBool</span><span class="p">:</span>
|
||||
<span class="c1">#if inSendOutputToOrchestratorLogsBool == True: # Capturing can be turned on!</span>
|
||||
<span class="k">if</span> <span class="n">inCaptureBool</span> <span class="o">==</span> <span class="kc">True</span><span class="p">:</span> <span class="c1"># Capturing can be turned on!</span>
|
||||
<span class="n">lOutputLineBytes</span> <span class="o">=</span> <span class="n">lCMDProcess</span><span class="o">.</span><span class="n">stdout</span><span class="o">.</span><span class="n">readline</span><span class="p">()</span>
|
||||
<span class="k">if</span> <span class="n">lOutputLineBytes</span> <span class="o">==</span> <span class="sa">b</span><span class="s2">""</span><span class="p">:</span>
|
||||
<span class="n">lListenBool</span> <span class="o">=</span> <span class="kc">False</span>
|
||||
<span class="n">lStr</span> <span class="o">=</span> <span class="n">lOutputLineBytes</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="n">inCMDEncodingStr</span><span class="p">)</span> <span class="c1"># was cp866, on win server don't work properly - set cp1251</span>
|
||||
<span class="k">if</span> <span class="n">lStr</span><span class="o">.</span><span class="n">endswith</span><span class="p">(</span><span class="s2">"</span><span class="se">\n</span><span class="s2">"</span><span class="p">):</span> <span class="n">lStr</span> <span class="o">=</span> <span class="n">lStr</span><span class="p">[:</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span>
|
||||
<span class="n">lMessageStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">lOSCMDKeyStr</span><span class="si">}</span><span class="s2">: </span><span class="si">{</span><span class="n">lStr</span><span class="si">}</span><span class="s2">"</span>
|
||||
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="n">lMessageStr</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="n">inSendOutputToOrchestratorLogsBool</span> <span class="o">==</span> <span class="kc">True</span><span class="p">:</span> <span class="c1"># Capturing can be turned on!</span>
|
||||
<span class="n">A2O</span><span class="o">.</span><span class="n">LogListSend</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inLogList</span><span class="o">=</span><span class="p">[</span><span class="n">lMessageStr</span><span class="p">])</span>
|
||||
<span class="n">lResultStr</span><span class="o">+=</span><span class="n">lStr</span>
|
||||
<span class="k">else</span><span class="p">:</span> <span class="c1">#Capturing is not turned on - wait until process will be closed</span>
|
||||
<span class="n">lCMDProcessPoll</span> <span class="o">=</span> <span class="n">lCMDProcess</span><span class="o">.</span><span class="n">poll</span><span class="p">()</span>
|
||||
<span class="k">if</span> <span class="n">lCMDProcessPoll</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="c1"># Process is alive - wait</span>
|
||||
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
<span class="n">lListenBool</span> <span class="o">=</span> <span class="kc">False</span>
|
||||
<span class="n">lMessageStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">lOSCMDKeyStr</span><span class="si">}</span><span class="s2">: # # # # AGENT CMD Process has been FINISHED # # # # "</span>
|
||||
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="n">lMessageStr</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="n">inSendOutputToOrchestratorLogsBool</span> <span class="o">==</span> <span class="kc">True</span><span class="p">:</span> <span class="c1"># Capturing can be turned on!</span>
|
||||
<span class="n">A2O</span><span class="o">.</span><span class="n">LogListSend</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inLogList</span><span class="o">=</span><span class="p">[</span><span class="n">lMessageStr</span><span class="p">])</span>
|
||||
<span class="k">return</span> <span class="n">lResultStr</span>
|
||||
<span class="c1"># New call</span>
|
||||
<span class="k">if</span> <span class="n">inRunAsyncBool</span><span class="p">:</span>
|
||||
<span class="n">lThread</span> <span class="o">=</span> <span class="n">threading</span><span class="o">.</span><span class="n">Thread</span><span class="p">(</span><span class="n">target</span><span class="o">=</span><span class="n">_CMDRunAndListenLogs</span><span class="p">,</span> <span class="n">kwargs</span><span class="o">=</span><span class="p">{</span><span class="s2">"inCMDStr"</span><span class="p">:</span><span class="n">inCMDStr</span><span class="p">,</span> <span class="s2">"inGSettings"</span><span class="p">:</span><span class="n">inGSettings</span><span class="p">,</span> <span class="s2">"inSendOutputToOrchestratorLogsBool"</span><span class="p">:</span><span class="n">inSendOutputToOrchestratorLogsBool</span><span class="p">,</span> <span class="s2">"inCMDEncodingStr"</span><span class="p">:</span><span class="n">inCMDEncodingStr</span><span class="p">,</span> <span class="s2">"inCaptureBool"</span><span class="p">:</span> <span class="n">inCaptureBool</span> <span class="p">})</span>
|
||||
<span class="n">lThread</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
|
||||
<span class="n">lResultStr</span><span class="o">=</span><span class="s2">"ActivityList has been started in async mode - no output is available here."</span>
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
<span class="n">lResultStr</span> <span class="o">=</span> <span class="n">_CMDRunAndListenLogs</span><span class="p">(</span><span class="n">inCMDStr</span><span class="o">=</span><span class="n">inCMDStr</span><span class="p">,</span> <span class="n">inGSettings</span><span class="o">=</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inSendOutputToOrchestratorLogsBool</span> <span class="o">=</span> <span class="n">inSendOutputToOrchestratorLogsBool</span><span class="p">,</span> <span class="n">inCMDEncodingStr</span> <span class="o">=</span> <span class="n">inCMDEncodingStr</span><span class="p">,</span> <span class="n">inCaptureBool</span><span class="o">=</span><span class="n">inCaptureBool</span><span class="p">)</span>
|
||||
<span class="c1">#lCMDCode = "cmd /c " + inCMDStr</span>
|
||||
<span class="c1">#subprocess.Popen(lCMDCode)</span>
|
||||
<span class="c1">#lResultCMDRun = 1 # os.system(lCMDCode)</span>
|
||||
<span class="k">return</span> <span class="n">lResultStr</span></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="ProcessWOExeUpperUserListGet"><a class="viewcode-back" href="../../../Agent/02_Defs.html#pyOpenRPA.Agent.__Agent__.ProcessWOExeUpperUserListGet">[docs]</a><span class="k">def</span> <span class="nf">ProcessWOExeUpperUserListGet</span><span class="p">():</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Return the process list only for the current user (where Agent is running) without .EXE in upper case. Can use in ActivityItem from Orchestrator to Agent</span>
|
||||
|
||||
<span class="sd"> :param inProcessNameWOExeList:</span>
|
||||
<span class="sd"> :return: list of the agent user process in upper case without .EXE. Example ["NOTEPAD","..."],</span>
|
||||
|
||||
<span class="sd"> """</span>
|
||||
<span class="n">lUserNameStr</span> <span class="o">=</span> <span class="n">getpass</span><span class="o">.</span><span class="n">getuser</span><span class="p">()</span>
|
||||
<span class="n">lResult</span> <span class="o">=</span> <span class="p">[]</span>
|
||||
<span class="c1"># Create updated list for quick check</span>
|
||||
<span class="n">lProcessNameWOExeList</span> <span class="o">=</span> <span class="p">[]</span>
|
||||
<span class="c1"># Iterate over the list</span>
|
||||
<span class="k">for</span> <span class="n">proc</span> <span class="ow">in</span> <span class="n">psutil</span><span class="o">.</span><span class="n">process_iter</span><span class="p">():</span>
|
||||
<span class="k">try</span><span class="p">:</span>
|
||||
<span class="c1"># Fetch process details as dict</span>
|
||||
<span class="n">pinfo</span> <span class="o">=</span> <span class="n">proc</span><span class="o">.</span><span class="n">as_dict</span><span class="p">(</span><span class="n">attrs</span><span class="o">=</span><span class="p">[</span><span class="s1">'pid'</span><span class="p">,</span> <span class="s1">'name'</span><span class="p">,</span> <span class="s1">'username'</span><span class="p">])</span>
|
||||
<span class="c1"># Add if empty inProcessNameWOExeList or if process in inProcessNameWOExeList</span>
|
||||
<span class="n">lUserNameWODomainStr</span> <span class="o">=</span> <span class="n">proc</span><span class="o">.</span><span class="n">username</span><span class="p">()</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">'</span><span class="se">\\</span><span class="s1">'</span><span class="p">)[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span>
|
||||
<span class="k">if</span> <span class="n">lUserNameWODomainStr</span> <span class="o">==</span> <span class="n">lUserNameStr</span><span class="p">:</span>
|
||||
<span class="n">lResult</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">pinfo</span><span class="p">[</span><span class="s1">'name'</span><span class="p">][:</span><span class="o">-</span><span class="mi">4</span><span class="p">]</span><span class="o">.</span><span class="n">upper</span><span class="p">())</span>
|
||||
<span class="k">except</span> <span class="p">(</span><span class="n">psutil</span><span class="o">.</span><span class="n">NoSuchProcess</span><span class="p">,</span> <span class="n">psutil</span><span class="o">.</span><span class="n">AccessDenied</span><span class="p">,</span> <span class="n">psutil</span><span class="o">.</span><span class="n">ZombieProcess</span><span class="p">):</span>
|
||||
<span class="k">pass</span>
|
||||
<span class="k">return</span> <span class="n">lResult</span></div>
|
||||
|
||||
<span class="c1"># Main def</span>
|
||||
<span class="k">def</span> <span class="nf">Agent</span><span class="p">(</span><span class="n">inGSettings</span><span class="p">):</span>
|
||||
<span class="n">lL</span> <span class="o">=</span> <span class="n">inGSettings</span><span class="p">[</span><span class="s2">"Logger"</span><span class="p">]</span>
|
||||
<span class="k">global</span> <span class="n">gSettings</span>
|
||||
<span class="n">gSettings</span> <span class="o">=</span> <span class="n">inGSettings</span>
|
||||
<span class="c1"># Append Orchestrator def to ProcessorDictAlias</span>
|
||||
<span class="n">lModule</span> <span class="o">=</span> <span class="n">sys</span><span class="o">.</span><span class="n">modules</span><span class="p">[</span><span class="vm">__name__</span><span class="p">]</span>
|
||||
<span class="n">lModuleDefList</span> <span class="o">=</span> <span class="nb">dir</span><span class="p">(</span><span class="n">lModule</span><span class="p">)</span>
|
||||
<span class="k">for</span> <span class="n">lItemDefNameStr</span> <span class="ow">in</span> <span class="n">lModuleDefList</span><span class="p">:</span>
|
||||
<span class="c1"># Dont append alias for defs Agent</span>
|
||||
<span class="k">if</span> <span class="n">lItemDefNameStr</span> <span class="ow">not</span> <span class="ow">in</span> <span class="p">[</span><span class="s2">"Agent"</span><span class="p">]:</span>
|
||||
<span class="n">lItemDef</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">lModule</span><span class="p">,</span><span class="n">lItemDefNameStr</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="n">callable</span><span class="p">(</span><span class="n">lItemDef</span><span class="p">):</span> <span class="n">inGSettings</span><span class="p">[</span><span class="s2">"ProcessorDict"</span><span class="p">][</span><span class="s2">"AliasDefDict"</span><span class="p">][</span><span class="n">lItemDefNameStr</span><span class="p">]</span><span class="o">=</span><span class="n">lItemDef</span>
|
||||
|
||||
<span class="c1"># Detect Machine host name and username</span>
|
||||
<span class="n">inGSettings</span><span class="p">[</span><span class="s2">"AgentDict"</span><span class="p">][</span><span class="s2">"HostNameUpperStr"</span><span class="p">]</span> <span class="o">=</span> <span class="n">socket</span><span class="o">.</span><span class="n">gethostname</span><span class="p">()</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span>
|
||||
<span class="n">inGSettings</span><span class="p">[</span><span class="s2">"AgentDict"</span><span class="p">][</span><span class="s2">"UserUpperStr"</span><span class="p">]</span> <span class="o">=</span> <span class="n">getpass</span><span class="o">.</span><span class="n">getuser</span><span class="p">()</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span>
|
||||
|
||||
<span class="c1"># Processor thread</span>
|
||||
<span class="n">lProcessorThread</span> <span class="o">=</span> <span class="n">threading</span><span class="o">.</span><span class="n">Thread</span><span class="p">(</span><span class="n">target</span><span class="o">=</span> <span class="n">Processor</span><span class="o">.</span><span class="n">ProcessorRunSync</span><span class="p">,</span> <span class="n">kwargs</span><span class="o">=</span><span class="p">{</span><span class="s2">"inGSettings"</span><span class="p">:</span><span class="n">inGSettings</span><span class="p">})</span>
|
||||
<span class="n">lProcessorThread</span><span class="o">.</span><span class="n">daemon</span> <span class="o">=</span> <span class="kc">True</span> <span class="c1"># Run the thread in daemon mode.</span>
|
||||
<span class="n">lProcessorThread</span><span class="o">.</span><span class="n">start</span><span class="p">()</span> <span class="c1"># Start the thread execution.</span>
|
||||
<span class="k">if</span> <span class="n">lL</span><span class="p">:</span> <span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">"Processor has been started (ProcessorDict)"</span><span class="p">)</span> <span class="c1">#Logging</span>
|
||||
|
||||
<span class="c1"># Start thread to wait data from Orchestrator (O2A)</span>
|
||||
<span class="n">lO2AThread</span> <span class="o">=</span> <span class="n">threading</span><span class="o">.</span><span class="n">Thread</span><span class="p">(</span><span class="n">target</span><span class="o">=</span><span class="n">O2A</span><span class="o">.</span><span class="n">O2A_Loop</span><span class="p">,</span> <span class="n">kwargs</span><span class="o">=</span><span class="p">{</span><span class="s2">"inGSettings"</span><span class="p">:</span><span class="n">inGSettings</span><span class="p">})</span>
|
||||
<span class="n">lO2AThread</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
|
||||
|
||||
<span class="c1"># Send log that Agent has been started</span>
|
||||
<span class="n">A2O</span><span class="o">.</span><span class="n">LogListSend</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inLogList</span><span class="o">=</span><span class="p">[</span><span class="sa">f</span><span class="s1">'Host: </span><span class="si">{</span><span class="n">inGSettings</span><span class="p">[</span><span class="s2">"AgentDict"</span><span class="p">][</span><span class="s2">"HostNameUpperStr"</span><span class="p">]</span><span class="si">}</span><span class="s1">, User: </span><span class="si">{</span><span class="n">inGSettings</span><span class="p">[</span><span class="s2">"AgentDict"</span><span class="p">][</span><span class="s2">"UserUpperStr"</span><span class="p">]</span><span class="si">}</span><span class="s1">, Agent has been started.'</span><span class="p">])</span>
|
||||
</pre></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© 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>
|
@ -1,580 +0,0 @@
|
||||
|
||||
|
||||
<!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 — 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 & Contacts</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">ROBOT</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Robot/01_Robot.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Robot/02_Defs.html">2. Defs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Robot/03_HowToUse.html">3. How to use</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Robot/04_Dependencies.html">4. Dependencies</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">STUDIO</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Studio/01_Studio.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Studio/02_HowToUse.html">2. How to use</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">ORCHESTRATOR</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/01_Orchestrator.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/02_Defs.html">2. Defs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/03_gSettingsTemplate.html">3. gSettings Template</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/04_HowToUse.html">4. How to use</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/05_UAC.html">5. UAC - User Access Control</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">AGENT</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Agent/02_Defs.html">2. Defs</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">TOOLS</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Tools/02_Defs.html">2. Defs StopSafe</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="../../../../index.html">pyOpenRPA</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="../../../../index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li><a href="../../../index.html">Module code</a> »</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">"""</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="TestControlPanel",</span>
|
||||
<span class="sd"> inRefreshHTMLJinja2TemplatePathStr="ControlPanel\\test.html", inJinja2TemplateRefreshBool = True)</span>
|
||||
<span class="sd"> </span>
|
||||
<span class="sd"> </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"> You can modify jinja context by use the function:</span>
|
||||
<span class="sd"> Jinja2DataUpdateDictSet </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="notepad")</span>
|
||||
<span class="sd"> {{MathModule.pi}}</span>
|
||||
<span class="sd"> {% if UserInfoDict['UserNameUpperStr']=="ND" %}</span>
|
||||
<span class="sd"> YES - IT IS ND</span>
|
||||
<span class="sd"> {% endif %}</span>
|
||||
|
||||
<span class="sd"> """</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">"""</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"> """</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">"ServerDict"</span><span class="p">][</span><span class="s2">"ControlPanelDict"</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">"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"</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">"ServerDict"</span><span class="p">][</span><span class="s2">"ControlPanelDict"</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">"""</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"> """</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">"""</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"> """</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">"/"</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">"</span><span class="se">\\</span><span class="s2">"</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">"</span><span class="se">\\</span><span class="s2">"</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">"EXCEPTION WHEN INIT Jinja2"</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">"""</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"> """</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">"""</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"> """</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">"/"</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">"</span><span class="se">\\</span><span class="s2">"</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">"</span><span class="se">\\</span><span class="s2">"</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">"EXCEPTION WHEN INIT Jinja2"</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">"""</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"> """</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">"""</span>
|
||||
|
||||
<span class="sd"> :param inRequest: request handler (from http.server import BaseHTTPRequestHandler)</span>
|
||||
<span class="sd"> :return:</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="n">lData</span> <span class="o">=</span> <span class="p">{</span>
|
||||
<span class="s2">"StorageRobotDict"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
<span class="s2">"ControlPanelInstance"</span><span class="p">:</span><span class="bp">self</span><span class="p">,</span>
|
||||
<span class="s2">"OrchestratorModule"</span><span class="p">:</span><span class="n">Orchestrator</span><span class="p">,</span>
|
||||
<span class="s2">"RequestInstance"</span><span class="p">:</span> <span class="n">inRequest</span><span class="p">,</span>
|
||||
<span class="s2">"UserInfoDict"</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">"UserUACDict"</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">"UserUACCheckDef"</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">"EnumerateDef"</span><span class="p">:</span> <span class="nb">enumerate</span><span class="p">,</span>
|
||||
<span class="s2">"OperatorModule"</span><span class="p">:</span> <span class="n">operator</span><span class="p">,</span>
|
||||
<span class="s2">"MathModule"</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">"StorageRobotDict"</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">"""</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"> """</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">"""</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"> """</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">"""</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"> """</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">"""</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"> """</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">"""</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: ""</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="n">lJSStr</span> <span class="o">=</span> <span class="s2">""</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">"""</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"> """</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">""</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 "HTMLStr"</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">"HTMLStr"</span> <span class="ow">in</span> <span class="n">lHTMLResult</span> <span class="ow">or</span> <span class="s2">"JSONDict"</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">"HTMLStr"</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">"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"</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 "HTMLStr"</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">"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">"</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">"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"</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">""</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">""</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">"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">"</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">"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"</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>
|
||||
© 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>
|
@ -1,924 +0,0 @@
|
||||
|
||||
|
||||
<!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 — 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 & Contacts</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">ROBOT</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Robot/01_Robot.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Robot/02_Defs.html">2. Defs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Robot/03_HowToUse.html">3. How to use</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Robot/04_Dependencies.html">4. Dependencies</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">STUDIO</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Studio/01_Studio.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Studio/02_HowToUse.html">2. How to use</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">ORCHESTRATOR</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/01_Orchestrator.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/02_Defs.html">2. Defs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/03_gSettingsTemplate.html">3. gSettings Template</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/04_HowToUse.html">4. How to use</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/05_UAC.html">5. UAC - User Access Control</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">AGENT</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Agent/02_Defs.html">2. Defs</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">TOOLS</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Tools/02_Defs.html">2. Defs StopSafe</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="../../../../index.html">pyOpenRPA</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="../../../../index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li><a href="../../../index.html">Module code</a> »</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>
|
||||
<span class="kn">import</span> <span class="nn">time</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">pyOpenRPA</span> <span class="kn">import</span> <span class="n">Orchestrator</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">"""</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"> All defs in class are pickle safe! After orchestrator restart (if not the force stop of the orchestrator process) your instance with properties will be restored. But it not coverage the scheduler which is in __Orchestrator__ .</span>
|
||||
<span class="sd"> After orc restart you need to reinit all schedule rules: Orchestrator.OrchestratorScheduleGet</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"> .. code-block:: python</span>
|
||||
<span class="sd"> # For the safe init class use ProcessInitSafe</span>
|
||||
<span class="sd"> lProcess = Orchestrator.Managers.ProcessInitSafe(inAgentHostNameStr="PCNAME",inAgentUserNameStr="USER",</span>
|
||||
<span class="sd"> inProcessNameWOExeStr="notepad",inStartCMDStr="notepad",inStopSafeTimeoutSecFloat=3)</span>
|
||||
<span class="sd"> # Async way to run job</span>
|
||||
<span class="sd"> lProcess.ScheduleStatusCheckEverySeconds(inIntervalSecondsInt=5)</span>
|
||||
<span class="sd"> Orchestrator.OrchestratorScheduleGet().every(5).seconds.do(Orchestrator.OrchestratorThreadStart,</span>
|
||||
<span class="sd"> lProcess.StartCheck)</span>
|
||||
<span class="sd"> # OR (sync mode)</span>
|
||||
<span class="sd"> Orchestrator.OrchestratorScheduleGet().every(5).seconds.do(lProcess.StartCheck)</span>
|
||||
|
||||
<span class="sd"> How to use StopSafe on the robot side</span>
|
||||
|
||||
<span class="sd"> .. code-block:: python</span>
|
||||
<span class="sd"> from pyOpenRPA.Tools import StopSafe</span>
|
||||
<span class="sd"> StopSafe.Init(inLogger=None)</span>
|
||||
<span class="sd"> StopSafe.IsSafeStop() # True - WM_CLOSE SIGNAL has come. taskkill /im someprocess.exe</span>
|
||||
<span class="sd"> """</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">mStartArgDict</span> <span class="o">=</span> <span class="kc">None</span>
|
||||
<span class="n">mStatusCheckIntervalSecFloat</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="c1"># MST - Manual Stop Trigger</span>
|
||||
<span class="n">mMSTdTSecFloat</span><span class="p">:</span> <span class="nb">float</span> <span class="o">=</span> <span class="kc">None</span>
|
||||
<span class="n">mMSTdNInt</span> <span class="o">=</span> <span class="kc">None</span>
|
||||
<span class="n">mMSTStartTimeList</span> <span class="o">=</span> <span class="p">[]</span>
|
||||
|
||||
<span class="n">mAgentMuteBool</span> <span class="o">=</span> <span class="kc">False</span> <span class="c1"># Mute any sends to agent while some action is perfomed</span>
|
||||
|
||||
<span class="n">mStatusSavedStr</span> <span class="o">=</span> <span class="kc">None</span> <span class="c1"># Saved status to the further restore</span>
|
||||
|
||||
<div class="viewcode-block" id="Process.MuteWait"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.MuteWait">[docs]</a> <span class="k">def</span> <span class="nf">MuteWait</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Internal def. Wait when class is apply to send new activities to the agent</span>
|
||||
|
||||
<span class="sd"> :return:</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="n">lIntervalSecFloat</span> <span class="o">=</span> <span class="mf">0.3</span>
|
||||
<span class="k">while</span> <span class="bp">self</span><span class="o">.</span><span class="n">mAgentMuteBool</span> <span class="o">==</span> <span class="kc">True</span><span class="p">:</span>
|
||||
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="n">lIntervalSecFloat</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="kc">None</span></div>
|
||||
|
||||
<div class="viewcode-block" id="Process.KeyTurpleGet"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.KeyTurpleGet">[docs]</a> <span class="k">def</span> <span class="nf">KeyTurpleGet</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Get the key turple of the current process</span>
|
||||
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">return</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">upper</span><span class="p">(),</span> <span class="bp">self</span><span class="o">.</span><span class="n">mAgentUserNameStr</span><span class="o">.</span><span class="n">upper</span><span class="p">(),</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></div>
|
||||
|
||||
|
||||
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inAgentHostNameStr</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="p">,</span> <span class="n">inProcessNameWOExeStr</span><span class="p">,</span> <span class="n">inStartPathStr</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inStartCMDStr</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="n">inStopSafeTimeoutSecFloat</span><span class="o">=</span><span class="mi">300</span><span class="p">,</span> <span class="n">inStartArgDict</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inStatusCheckIntervalSecFloat</span><span class="o">=</span><span class="mi">30</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Init the class instance.</span>
|
||||
<span class="sd"> !ATTENTION! Function can raise exception if process with the same (inAgentHostNameStr, inAgentUserNameStr, inProcessNameWOExeStr) is already exists in GSettings (can be restored from previous Orchestrator session). See ProcessInitSafe to sefaty init the instance or restore previous</span>
|
||||
<span class="sd"> !ATTENTION! Schedule options you must</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 inStartPathStr: Path to start process (.cmd/ .exe or something else). Path can be relative (from orc working directory) or absolute</span>
|
||||
<span class="sd"> :param inStartCMDStr: CMD script to start program (if no start file is exists)</span>
|
||||
<span class="sd"> :param inStopSafeTimeoutSecFloat: Time to wait for stop safe. After that do the stop force (if process is not stopped)</span>
|
||||
<span class="sd"> """</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="c1"># Check if Process is not exists in GSettings</span>
|
||||
<span class="k">if</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="ow">not</span> <span class="ow">in</span> <span class="n">lGS</span><span class="p">[</span><span class="s2">"ManagersProcessDict"</span><span class="p">]:</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">mStartArgDict</span> <span class="o">=</span> <span class="n">inStartArgDict</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">lGS</span><span class="p">[</span><span class="s2">"ManagersProcessDict"</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">inThreadBool</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
|
||||
<span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">ProcessorActivityItemAppend</span><span class="p">(</span><span class="n">inActivityItemDict</span><span class="o">=</span><span class="n">lActivityDict</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="n">inStatusCheckIntervalSecFloat</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">OrchestratorScheduleGet</span><span class="p">()</span><span class="o">.</span><span class="n">every</span><span class="p">(</span><span class="n">inStatusCheckIntervalSecFloat</span><span class="p">)</span><span class="o">.</span><span class="n">seconds</span><span class="o">.</span><span class="n">do</span><span class="p">(</span><span class="n">Orchestrator</span><span class="o">.</span><span class="n">OrchestratorThreadStart</span><span class="p">,</span><span class="bp">self</span><span class="o">.</span><span class="n">StatusCheck</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">mStatusCheckIntervalSecFloat</span> <span class="o">=</span> <span class="n">inStatusCheckIntervalSecFloat</span>
|
||||
<span class="k">else</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">"Managers.Process (</span><span class="si">{</span><span class="n">inAgentHostNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="n">inAgentUserNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="n">inProcessNameWOExeStr</span><span class="si">}</span><span class="s2">): Can't init the Process instance because it already inited in early (see ProcessInitSafe)"</span><span class="p">)</span>
|
||||
|
||||
<div class="viewcode-block" id="Process.ManualStopTriggerSet"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.ManualStopTriggerSet">[docs]</a> <span class="k">def</span> <span class="nf">ManualStopTriggerSet</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inMSTdTSecFloat</span><span class="p">:</span> <span class="nb">float</span><span class="p">,</span> <span class="n">inMSTdNInt</span><span class="p">:</span> <span class="nb">int</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Set ManualStopTrigger (MST) to switch to STOPPED MANUAL if specified count of start fails will be catched in specified time period</span>
|
||||
|
||||
<span class="sd"> :param inMSTdTSecFloat: Time perios in seconds</span>
|
||||
<span class="sd"> :param inMSTdNInt: Counts of the start tries</span>
|
||||
<span class="sd"> :return: None</span>
|
||||
<span class="sd"> """</span>
|
||||
|
||||
<span class="c1"># MST - Manual Stop Trigger</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">mMSTdTSecFloat</span> <span class="o">=</span> <span class="n">inMSTdTSecFloat</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">mMSTdNInt</span> <span class="o">=</span> <span class="n">inMSTdNInt</span></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="Process.ManualStopTriggerNewStart"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.ManualStopTriggerNewStart">[docs]</a> <span class="k">def</span> <span class="nf">ManualStopTriggerNewStart</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Log new start event. Check if it is applicable. Change status if ManualStop trigger criteria is applied</span>
|
||||
|
||||
<span class="sd"> :return: # 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mMSTdTSecFloat</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">mMSTdNInt</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
|
||||
<span class="n">lTimeNowSecFloat</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">mMSTStartTimeList</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">lTimeNowSecFloat</span><span class="p">)</span> <span class="c1"># Append current time to MST list</span>
|
||||
<span class="c1"># Remove old items from list</span>
|
||||
<span class="n">lMSTStartTimeList</span> <span class="o">=</span> <span class="p">[]</span>
|
||||
<span class="k">for</span> <span class="n">lTimeItemSecFloat</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">mMSTStartTimeList</span><span class="p">:</span>
|
||||
<span class="n">ldTSecFloat</span> <span class="o">=</span> <span class="n">lTimeNowSecFloat</span> <span class="o">-</span> <span class="n">lTimeItemSecFloat</span>
|
||||
<span class="c1"># Move to the new list if dT less</span>
|
||||
<span class="k">if</span> <span class="n">ldTSecFloat</span> <span class="o"><</span> <span class="bp">self</span><span class="o">.</span><span class="n">mMSTdTSecFloat</span><span class="p">:</span> <span class="n">lMSTStartTimeList</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">lTimeItemSecFloat</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">mMSTStartTimeList</span> <span class="o">=</span> <span class="n">lMSTStartTimeList</span> <span class="c1"># Set new list</span>
|
||||
<span class="c1"># Check count in list</span>
|
||||
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">lMSTStartTimeList</span><span class="p">)</span> <span class="o">></span> <span class="bp">self</span><span class="o">.</span><span class="n">mMSTdNInt</span><span class="p">:</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">=</span> <span class="s2">"1_STOPPED_MANUAL"</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">"Managers.Process (</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentHostNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentUserNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mProcessNameWOExeStr</span><span class="si">}</span><span class="s2">): ManualStopTrigger is activated. </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mMSTdNInt</span><span class="si">}</span><span class="s2"> start tries in </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mMSTdTSecFloat</span><span class="si">}</span><span class="s2"> sec."</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
|
||||
|
||||
<div class="viewcode-block" id="Process.ManualStopListClear"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.ManualStopListClear">[docs]</a> <span class="k">def</span> <span class="nf">ManualStopListClear</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Clear the last start tries list.</span>
|
||||
|
||||
<span class="sd"> :return: None</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">mMSTStartTimeList</span><span class="o">=</span><span class="p">[]</span></div>
|
||||
|
||||
<div class="viewcode-block" id="Process.Manual2Auto"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.Manual2Auto">[docs]</a> <span class="k">def</span> <span class="nf">Manual2Auto</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span>
|
||||
<span class="sd">"""</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"> """</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">"1_STOPPED_MANUAL"</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">"0_STOPPED"</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">"3_STOP_SAFE_MANUAL"</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">"2_STOP_SAFE"</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">"5_STARTED_MANUAL"</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">"4_STARTED"</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="n">inStartArgDict</span><span class="o">=</span><span class="kc">None</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Manual/Auto start. Manual start will block scheduling execution. To return schedule execution use def Manual2Auto.</span>
|
||||
<span class="sd"> Will not start if STOP SAFE is now and don't start auto is stopped manual now</span>
|
||||
|
||||
<span class="sd"> :param inIsManualBool: Default is True - Mark this operation as manual - StatusCheckStart/Stop will be blocked - only StatusCheck will be working. False - Auto operation</span>
|
||||
<span class="sd"> :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"> """</span>
|
||||
<span class="k">if</span> <span class="n">inIsManualBool</span> <span class="o">==</span> <span class="kc">False</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">ManualStopTriggerNewStart</span><span class="p">()</span> <span class="c1"># Set the time</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="ow">and</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">"1_STOPPED_MANUAL"</span> <span class="ow">or</span> <span class="s2">"STOP_SAFE"</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span><span class="p">)</span> <span class="ow">and</span> <span class="n">inIsManualBool</span> <span class="o">==</span> <span class="kc">False</span><span class="p">:</span>
|
||||
<span class="n">lStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"Managers.Process (</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentHostNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentUserNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mProcessNameWOExeStr</span><span class="si">}</span><span class="s2">): Process will not start because of stopped manual or stop safe is now."</span>
|
||||
<span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">OrchestratorLoggerGet</span><span class="p">()</span><span class="o">.</span><span class="n">warning</span><span class="p">(</span><span class="n">lStr</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span>
|
||||
<span class="c1"># Send activity item to agent - wait result</span>
|
||||
<span class="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="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="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="bp">self</span><span class="o">.</span><span class="n">mStartCMDStr</span>
|
||||
<span class="c1"># Append args</span>
|
||||
<span class="k">if</span> <span class="n">inStartArgDict</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStartArgDict</span> <span class="o">=</span> <span class="n">inStartArgDict</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStartArgDict</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
|
||||
<span class="k">for</span> <span class="n">lItemKeyStr</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStartArgDict</span><span class="p">:</span>
|
||||
<span class="n">lItemValueStr</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStartArgDict</span><span class="p">[</span><span class="n">lItemKeyStr</span><span class="p">]</span>
|
||||
<span class="n">lCMDStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">lCMDStr</span><span class="si">}</span><span class="s2"> </span><span class="si">{</span><span class="n">lItemKeyStr</span><span class="si">}</span><span class="s2"> </span><span class="si">{</span><span class="n">lItemValueStr</span><span class="si">}</span><span class="s2">"</span>
|
||||
<span class="c1">#import pdb</span>
|
||||
<span class="c1">#pdb.set_trace()</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">MuteWait</span><span class="p">()</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">mAgentMuteBool</span><span class="o">=</span><span class="kc">True</span>
|
||||
<span class="n">lActivityItemStart</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">ProcessorActivityItemCreate</span><span class="p">(</span><span class="n">inDef</span><span class="o">=</span><span class="s2">"OSCMD"</span><span class="p">,</span>
|
||||
<span class="n">inArgDict</span><span class="o">=</span><span class="p">{</span><span class="s2">"inCMDStr"</span><span class="p">:</span><span class="n">lCMDStr</span><span class="p">,</span><span class="s2">"inSendOutputToOrchestratorLogsBool"</span><span class="p">:</span><span class="kc">False</span><span class="p">,</span> <span class="s2">"inCaptureBool"</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">"inGSettings"</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">"5_STARTED_MANUAL"</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">"4_STARTED"</span>
|
||||
<span class="c1"># Log info about process</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">StatusChangeLog</span><span class="p">()</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">mAgentMuteBool</span> <span class="o">=</span> <span class="kc">False</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
|
||||
|
||||
<div class="viewcode-block" id="Process.StartCheck"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StartCheck">[docs]</a> <span class="k">def</span> <span class="nf">StartCheck</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Start program if auto stopped (0_STOPPED).</span>
|
||||
|
||||
<span class="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">MuteWait</span><span class="p">()</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">==</span> <span class="s2">"0_STOPPED"</span><span class="p">:</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">Start</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
|
||||
|
||||
<div class="viewcode-block" id="Process.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="n">inStopSafeTimeoutSecFloat</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span>
|
||||
<span class="sd">"""</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"> :param inStopSafeTimeoutSecFloat: Default value goes from the instance. You can specify time is second to wait while safe stop. After that program will stop force</span>
|
||||
<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"> """</span>
|
||||
<span class="k">if</span> <span class="n">inStopSafeTimeoutSecFloat</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="n">inStopSafeTimeoutSecFloat</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStopSafeTimeoutSecFloat</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">MuteWait</span><span class="p">()</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">mAgentMuteBool</span><span class="o">=</span><span class="kc">True</span>
|
||||
<span class="c1"># Send activity item to agent - wait result</span>
|
||||
<span class="n">lCMDStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s1">'taskkill /im "</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" /fi "username eq %USERNAME%"'</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">"OSCMD"</span><span class="p">,</span><span class="n">inArgDict</span><span class="o">=</span><span class="p">{</span><span class="s2">"inCMDStr"</span><span class="p">:</span> <span class="n">lCMDStr</span><span class="p">,</span><span class="s2">"inSendOutputToOrchestratorLogsBool"</span><span class="p">:</span><span class="kc">False</span><span class="p">,</span> <span class="s2">"inCaptureBool"</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">"inGSettings"</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">"3_STOP_SAFE_MANUAL"</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">"2_STOP_SAFE"</span>
|
||||
<span class="c1"># Log info about process</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">StatusChangeLog</span><span class="p">()</span>
|
||||
<span class="c1"># Interval check is stopped</span>
|
||||
<span class="n">lTimeStartFloat</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span>
|
||||
<span class="n">lIntervalCheckSafeStatusFLoat</span> <span class="o">=</span> <span class="mf">15.0</span>
|
||||
<span class="k">while</span> <span class="s2">"SAFE"</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="ow">and</span> <span class="p">(</span><span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span> <span class="o">-</span> <span class="n">lTimeStartFloat</span><span class="p">)</span> <span class="o"><</span> <span class="n">inStopSafeTimeoutSecFloat</span><span class="p">:</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">StatusCheck</span><span class="p">()</span>
|
||||
<span class="k">if</span> <span class="s2">"SAFE"</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span><span class="p">:</span> <span class="k">break</span>
|
||||
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="n">lIntervalCheckSafeStatusFLoat</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="s2">"SAFE"</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span><span class="p">:</span>
|
||||
<span class="c1"># Log info about process</span>
|
||||
<span class="n">lL</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">OrchestratorLoggerGet</span><span class="p">()</span>
|
||||
<span class="n">lL</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Managers.Process (</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentHostNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentUserNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mProcessNameWOExeStr</span><span class="si">}</span><span class="s2">): Safe stop has been wait for </span><span class="si">{</span><span class="n">inStopSafeTimeoutSecFloat</span><span class="si">}</span><span class="s2"> sec. Now do the force stop."</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">StopForce</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="n">inIsManualBool</span><span class="p">,</span><span class="n">inMuteIgnoreBool</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
|
||||
<span class="c1"># Log info about process</span>
|
||||
<span class="c1"># self.StatusChangeLog() status check has already log status (see above)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">mAgentMuteBool</span> <span class="o">=</span> <span class="kc">False</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
|
||||
|
||||
<div class="viewcode-block" id="Process.StopSafeCheck"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StopSafeCheck">[docs]</a> <span class="k">def</span> <span class="nf">StopSafeCheck</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inStopSafeTimeoutSecFloat</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Stop safe program if auto started (4_STARTED).</span>
|
||||
|
||||
<span class="sd"> :param inStopSafeTimeoutSecFloat: Default value goes from the instance. You can specify time is second to wait while safe stop. After that program will stop force</span>
|
||||
<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"> """</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">MuteWait</span><span class="p">()</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">==</span> <span class="s2">"4_STARTED"</span><span class="p">:</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">StopSafe</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">inStopSafeTimeoutSecFloat</span> <span class="o">=</span> <span class="n">inStopSafeTimeoutSecFloat</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
|
||||
|
||||
<div class="viewcode-block" id="Process.StopForce"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StopForce">[docs]</a> <span class="k">def</span> <span class="nf">StopForce</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inIsManualBool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">,</span> <span class="n">inMuteIgnoreBool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Manual/Auto stop force. Force stop don't wait process termination - it just terminate process now.</span>
|
||||
<span class="sd"> Manual stop safe will block scheduling execution. To return schedule execution use def Manual2Auto</span>
|
||||
|
||||
<span class="sd"> :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"> """</span>
|
||||
<span class="k">if</span> <span class="n">inMuteIgnoreBool</span> <span class="o">==</span> <span class="kc">False</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">MuteWait</span><span class="p">()</span>
|
||||
<span class="n">lMuteWorkBool</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">mAgentMuteBool</span><span class="o">==</span><span class="kc">False</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mAgentMuteBool</span><span class="o">=</span><span class="kc">True</span><span class="p">;</span> <span class="n">lMuteWorkBool</span><span class="o">=</span><span class="kc">True</span>
|
||||
<span class="c1"># Send activity item to agent - wait result</span>
|
||||
<span class="n">lCMDStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s1">'taskkill /F /im "</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" /fi "username eq %USERNAME%"'</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">"OSCMD"</span><span class="p">,</span><span class="n">inArgDict</span><span class="o">=</span><span class="p">{</span><span class="s2">"inCMDStr"</span><span class="p">:</span> <span class="n">lCMDStr</span><span class="p">,</span><span class="s2">"inSendOutputToOrchestratorLogsBool"</span><span class="p">:</span><span class="kc">False</span><span class="p">,</span> <span class="s2">"inCaptureBool"</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">"inGSettings"</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">"1_STOPPED_MANUAL"</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">"0_STOPPED"</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">if</span> <span class="n">lMuteWorkBool</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">mAgentMuteBool</span><span class="o">=</span><span class="kc">False</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
|
||||
|
||||
<div class="viewcode-block" id="Process.StopForceCheck"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StopForceCheck">[docs]</a> <span class="k">def</span> <span class="nf">StopForceCheck</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Stop force program if auto started (4_STARTED).</span>
|
||||
|
||||
<span class="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">MuteWait</span><span class="p">()</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">==</span> <span class="s2">"4_STARTED"</span><span class="p">:</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">StopForce</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
|
||||
|
||||
<div class="viewcode-block" id="Process.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">"""</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: 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"> """</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">StopSafe</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="n">inIsManualBool</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">Start</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="n">inIsManualBool</span><span class="p">)</span></div>
|
||||
|
||||
<div class="viewcode-block" id="Process.RestartForce"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.RestartForce">[docs]</a> <span class="k">def</span> <span class="nf">RestartForce</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inIsManualBool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">):</span>
|
||||
<span class="sd">"""</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: 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"> """</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">StopForce</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="n">inIsManualBool</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">Start</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="n">inIsManualBool</span><span class="p">)</span></div>
|
||||
|
||||
<div class="viewcode-block" id="Process.StatusSave"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusSave">[docs]</a> <span class="k">def</span> <span class="nf">StatusSave</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Save current status of the process. After that you can restore process activity. Work when orchestrator is restarted. Don't save "STOP_SAFE" status > "STOPPED"</span>
|
||||
|
||||
<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"> """</span>
|
||||
<span class="n">lWarnSafeBool</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">"2_STOP_SAFE"</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusSavedStr</span> <span class="o">=</span> <span class="s2">"0_STOPPED"</span>
|
||||
<span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="o">==</span> <span class="s2">"3_STOP_SAFE_MANUAL"</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusSavedStr</span> <span class="o">=</span> <span class="s2">"1_STOPPED_MANUAL"</span>
|
||||
<span class="k">else</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusSavedStr</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span><span class="p">;</span> <span class="n">lWarnSafeBool</span> <span class="o">=</span> <span class="kc">False</span>
|
||||
<span class="k">if</span> <span class="n">lWarnSafeBool</span><span class="o">==</span><span class="kc">True</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">warning</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Managers.Process (</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentHostNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentUserNameStr</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mProcessNameWOExeStr</span><span class="si">}</span><span class="s2">): Safe status has been catched when safe > change saved status to stopped."</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.StatusCheckIntervalRestore"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusCheckIntervalRestore">[docs]</a> <span class="k">def</span> <span class="nf">StatusCheckIntervalRestore</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""Call from orchestrator when init</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusCheckIntervalSecFloat</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</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">info</span><span class="p">(</span><span class="sa">f</span><span class="s2">"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">): Restore schedule to StatusCheck in interval of </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mStatusCheckIntervalSecFloat</span><span class="si">}</span><span class="s2"> sec."</span><span class="p">)</span>
|
||||
<span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">OrchestratorScheduleGet</span><span class="p">()</span><span class="o">.</span><span class="n">every</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mStatusCheckIntervalSecFloat</span><span class="p">)</span><span class="o">.</span><span class="n">seconds</span><span class="o">.</span><span class="n">do</span><span class="p">(</span><span class="n">Orchestrator</span><span class="o">.</span><span class="n">OrchestratorThreadStart</span><span class="p">,</span><span class="bp">self</span><span class="o">.</span><span class="n">StatusCheck</span><span class="p">)</span></div>
|
||||
|
||||
<div class="viewcode-block" id="Process.StatusRestore"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusRestore">[docs]</a> <span class="k">def</span> <span class="nf">StatusRestore</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Execute the StatusCheck, after that restore status to the saved state (see StatusSave). Work when orchestrator is restarted.</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"> """</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">StatusCheck</span><span class="p">()</span> <span class="c1"># check current status</span>
|
||||
<span class="c1"># Do some action</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusSavedStr</span> <span class="o">!=</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusSavedStr</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
|
||||
<span class="c1">#lManualBool = False</span>
|
||||
<span class="c1">#if "MANUAL" in self.mStatusSavedStr:</span>
|
||||
<span class="c1"># lManualBool = True</span>
|
||||
<span class="k">if</span> <span class="s2">"STOPPED"</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusSavedStr</span> <span class="ow">and</span> <span class="s2">"STOPPED"</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span><span class="p">:</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">StopSafe</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="s2">"STARTED"</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusSavedStr</span> <span class="ow">and</span> <span class="s2">"STARTED"</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span><span class="p">:</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">Start</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="kc">True</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">info</span><span class="p">(</span><span class="sa">f</span><span class="s2">"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 restored to </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mStatusSavedStr</span><span class="si">}</span><span class="s2">"</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="bp">self</span><span class="o">.</span><span class="n">mStatusSavedStr</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">mStatusSavedStr</span> <span class="o">=</span> <span class="kc">None</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.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">"""</span>
|
||||
<span class="sd"> Lof information about status change</span>
|
||||
|
||||
<span class="sd"> :return:</span>
|
||||
<span class="sd"> """</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">"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">)"</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">"""</span>
|
||||
<span class="sd"> Check if process is alive. The def will save the manual flag is exists. Don't wait mute but set mute if it is not set.</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"> """</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">"ProcessWOExeUpperUserListGet"</span><span class="p">)</span>
|
||||
<span class="c1">#self.MuteWait()</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">mAgentMuteBool</span><span class="o">=</span><span class="kc">True</span>
|
||||
<span class="n">lGUIDStr</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">AgentActivityItemAdd</span><span class="p">(</span><span class="n">inHostNameStr</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentHostNameStr</span><span class="p">,</span><span class="n">inUserStr</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">mAgentUserNameStr</span><span class="p">,</span><span class="n">inActivityItemDict</span><span class="o">=</span><span class="n">lActivityItemUserProcessList</span><span class="p">)</span>
|
||||
<span class="n">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">"1_STOPPED_MANUAL"</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">"5_STARTED_MANUAL"</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">"0_STOPPED"</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">"4_STARTED"</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">"4_STARTED"</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">"2_STOP_SAFE"</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">"0_STOPPED"</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">"3_STOP_SAFE_MANUAL"</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">"1_STOPPED_MANUAL"</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">"5_STARTED_MANUAL"</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">"1_STOPPED_MANUAL"</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">"4_STARTED"</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">"0_STOPPED"</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">"0_STOPPED"</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="bp">self</span><span class="o">.</span><span class="n">mAgentMuteBool</span> <span class="o">=</span> <span class="kc">False</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
|
||||
<div class="viewcode-block" id="Process.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">"""</span>
|
||||
<span class="sd"> Check process status and run it if auto stopped self.mStatusStr is "0_STOPPED"</span>
|
||||
|
||||
<span class="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="n">lStatusStr</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">StatusCheck</span><span class="p">()</span>
|
||||
<span class="k">if</span> <span class="n">lStatusStr</span> <span class="o">==</span> <span class="s2">"0_STOPPED"</span><span class="p">:</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">Start</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
|
||||
<div class="viewcode-block" id="Process.StatusCheckStopForce"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusCheckStopForce">[docs]</a> <span class="k">def</span> <span class="nf">StatusCheckStopForce</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Check process status and auto stop force it if self.mStatusStr is 4_STARTED</span>
|
||||
|
||||
<span class="sd"> :return: Process status. See self.mStatusStr. 0_STOPPED 1_STOPPED_MANUAL 2_STOP_SAFE 3_STOP_SAFE_MANUAL 4_STARTED 5_STARTED_MANUAL</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="n">lStatusStr</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">StatusCheck</span><span class="p">()</span>
|
||||
<span class="k">if</span> <span class="n">lStatusStr</span> <span class="o">==</span> <span class="s2">"4_STARTED"</span><span class="p">:</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">StopForce</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div>
|
||||
|
||||
<div class="viewcode-block" id="Process.StatusCheckStopSafe"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.Process.StatusCheckStopSafe">[docs]</a> <span class="k">def</span> <span class="nf">StatusCheckStopSafe</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""</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"> """</span>
|
||||
<span class="n">lStatusStr</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">StatusCheck</span><span class="p">()</span>
|
||||
<span class="k">if</span> <span class="n">lStatusStr</span> <span class="o">==</span> <span class="s2">"4_STARTED"</span><span class="p">:</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">StopSafe</span><span class="p">(</span><span class="n">inIsManualBool</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mStatusStr</span></div></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="ProcessInitSafe"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessInitSafe">[docs]</a><span class="k">def</span> <span class="nf">ProcessInitSafe</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">300</span><span class="p">)</span> <span class="o">-></span> <span class="n">Process</span><span class="p">:</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Exception safe function. Check if process instance is not exists in GSettings (it can be after restart because Orchestrator restore objects from dump of the previous Orchestrator session)</span>
|
||||
<span class="sd"> Return existing instance (if exists) or create new instance and return it.</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 inStartPathStr: Path to start process (.cmd/ .exe or something else). Path can be relative (from orc working directory) or absolute</span>
|
||||
<span class="sd"> :param inStartCMDStr: CMD script to start program (if no start file is exists)</span>
|
||||
<span class="sd"> :param inStopSafeTimeoutSecFloat: Time to wait for stop safe. After that do the stop force (if process is not stopped)</span>
|
||||
<span class="sd"> :return: Process instance</span>
|
||||
<span class="sd"> """</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="k">else</span><span class="p">:</span> <span class="k">return</span> <span class="n">Process</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="o">=</span><span class="n">inAgentHostNameStr</span><span class="p">,</span><span class="n">inAgentUserNameStr</span><span class="o">=</span><span class="n">inAgentUserNameStr</span><span class="p">,</span><span class="n">inProcessNameWOExeStr</span><span class="o">=</span><span class="n">inProcessNameWOExeStr</span><span class="p">,</span>
|
||||
<span class="n">inStartPathStr</span><span class="o">=</span><span class="n">inStartPathStr</span><span class="p">,</span><span class="n">inStartCMDStr</span><span class="o">=</span><span class="n">inStartCMDStr</span><span class="p">,</span><span class="n">inStopSafeTimeoutSecFloat</span><span class="o">=</span><span class="n">inStopSafeTimeoutSecFloat</span><span class="p">)</span></div>
|
||||
|
||||
<div class="viewcode-block" id="ProcessExists"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessExists">[docs]</a><span class="k">def</span> <span class="nf">ProcessExists</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">-></span> <span class="nb">bool</span><span class="p">:</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Check if the Process instance is exists in GSettings by the (inAgentHostNameStr: str, inAgentUserNameStr: str, inProcessNameWOExeStr: str)</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: True - process exists in gsettings; False - else</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">return</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="ow">in</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">GSettingsGet</span><span class="p">()[</span><span class="s2">"ManagersProcessDict"</span><span class="p">]</span></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">-></span> <span class="n">Process</span><span class="p">:</span>
|
||||
<span class="sd">"""</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"> """</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">"ManagersProcessDict"</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">-></span> <span class="nb">str</span><span class="p">:</span>
|
||||
<span class="sd">"""</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"> """</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">-></span> <span class="nb">str</span><span class="p">:</span>
|
||||
<span class="sd">"""</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"> """</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="n">inStopSafeTimeoutSecFloat</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span>
|
||||
<span class="sd">"""</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"> :param inStopSafeTimeoutSecFloat: Default value goes from the instance. You can specify time is second to wait while safe stop. After that program will stop force</span>
|
||||
<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"> """</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">-></span> <span class="nb">str</span><span class="p">:</span>
|
||||
<span class="sd">"""</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"> """</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="ProcessStatusSave"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStatusSave">[docs]</a><span class="k">def</span> <span class="nf">ProcessStatusSave</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="sd">"""</span>
|
||||
<span class="sd"> Save current status of the process. After that you can restore process activity. Work when orchestrator is restarted. Don't save "STOP_SAFE" status > "STOPPED"</span>
|
||||
|
||||
<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"> """</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">StatusSave</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="ProcessStatusRestore"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessStatusRestore">[docs]</a><span class="k">def</span> <span class="nf">ProcessStatusRestore</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="sd">"""</span>
|
||||
<span class="sd"> Execute the StatusCheck, after that restore status to the saved state (see StatusSave). Work when orchestrator is restarted.</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"> """</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">StatusRestore</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="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">-></span> <span class="nb">str</span><span class="p">:</span>
|
||||
<span class="sd">"""</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"> """</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">-></span> <span class="nb">str</span><span class="p">:</span>
|
||||
<span class="sd">"""</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"> """</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>
|
||||
|
||||
<div class="viewcode-block" id="ProcessManualStopTriggerSet"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessManualStopTriggerSet">[docs]</a><span class="k">def</span> <span class="nf">ProcessManualStopTriggerSet</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inProcessNameWOExeStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inMSTdTSecFloat</span><span class="p">:</span> <span class="nb">float</span><span class="p">,</span> <span class="n">inMSTdNInt</span><span class="p">:</span> <span class="nb">int</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self):</span>
|
||||
|
||||
<span class="sd"> :param inAgentHostNameStr: Agent hostname in any case. Required to identify Process</span>
|
||||
<span class="sd"> :param inAgentUserNameStr: Agent user name in any case. Required to identify Process</span>
|
||||
<span class="sd"> :param inProcessNameWOExeStr: The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case</span>
|
||||
<span class="sd"> :param inMSTdTSecFloat: Time periods in seconds</span>
|
||||
<span class="sd"> :param inMSTdNInt: Counts of the start tries</span>
|
||||
<span class="sd"> :return: None</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="n">lProcess</span> <span class="o">=</span> <span class="n">ProcessGet</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="o">=</span><span class="n">inAgentHostNameStr</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="o">=</span><span class="n">inAgentUserNameStr</span><span class="p">,</span>
|
||||
<span class="n">inProcessNameWOExeStr</span><span class="o">=</span><span class="n">inProcessNameWOExeStr</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="n">lProcess</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="n">lProcess</span><span class="o">.</span><span class="n">ManualStopTriggerSet</span><span class="p">(</span><span class="n">inMSTdTSecFloat</span> <span class="o">=</span> <span class="n">inMSTdTSecFloat</span><span class="p">,</span> <span class="n">inMSTdNInt</span> <span class="o">=</span> <span class="n">inMSTdNInt</span><span class="p">)</span></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="ProcessManualStopListClear"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessManualStopListClear">[docs]</a><span class="k">def</span> <span class="nf">ProcessManualStopListClear</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">inProcessNameWOExeStr</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Clear the last start tries list.</span>
|
||||
|
||||
<span class="sd"> :param inAgentHostNameStr: Agent hostname in any case. Required to identify Process</span>
|
||||
<span class="sd"> :param inAgentUserNameStr: Agent user name in any case. Required to identify Process</span>
|
||||
<span class="sd"> :param inProcessNameWOExeStr: The process name without extension .exe (the key of the Process instance). Any case - will be processed to the upper case</span>
|
||||
<span class="sd"> :return: None</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="n">lProcess</span> <span class="o">=</span> <span class="n">ProcessGet</span><span class="p">(</span><span class="n">inAgentHostNameStr</span><span class="o">=</span><span class="n">inAgentHostNameStr</span><span class="p">,</span> <span class="n">inAgentUserNameStr</span><span class="o">=</span><span class="n">inAgentUserNameStr</span><span class="p">,</span>
|
||||
<span class="n">inProcessNameWOExeStr</span><span class="o">=</span><span class="n">inProcessNameWOExeStr</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="n">lProcess</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="n">lProcess</span><span class="o">.</span><span class="n">ManualStopListClear</span><span class="p">()</span></div>
|
||||
|
||||
<div class="viewcode-block" id="ProcessScheduleStatusCheckEverySeconds"><a class="viewcode-back" href="../../../../Orchestrator/06_Defs%20Managers.html#pyOpenRPA.Orchestrator.Managers.Process.ProcessScheduleStatusCheckEverySeconds">[docs]</a><span class="k">def</span> <span class="nf">ProcessScheduleStatusCheckEverySeconds</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">inIntervalSecondsInt</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">120</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Run status check every interval in second you specify.</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 inIntervalSecondsInt: Interval in seconds. Default is 120</span>
|
||||
<span class="sd"> :return: None</span>
|
||||
<span class="sd"> """</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="c1"># Check job in threaded way</span>
|
||||
<span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">OrchestratorScheduleGet</span><span class="p">()</span><span class="o">.</span><span class="n">every</span><span class="p">(</span><span class="n">inIntervalSecondsInt</span><span class="p">)</span><span class="o">.</span><span class="n">seconds</span><span class="o">.</span><span class="n">do</span><span class="p">(</span><span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">OrchestratorThreadStart</span><span class="p">,</span><span class="n">lProcess</span><span class="o">.</span><span class="n">StatusCheck</span><span class="p">)</span></div>
|
||||
</pre></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© 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>
|
@ -1,374 +0,0 @@
|
||||
|
||||
|
||||
<!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.Web.Basic — 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 & Contacts</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">ROBOT</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Robot/01_Robot.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Robot/02_Defs.html">2. Defs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Robot/03_HowToUse.html">3. How to use</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Robot/04_Dependencies.html">4. Dependencies</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">STUDIO</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Studio/01_Studio.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Studio/02_HowToUse.html">2. How to use</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">ORCHESTRATOR</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/01_Orchestrator.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/02_Defs.html">2. Defs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/03_gSettingsTemplate.html">3. gSettings Template</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/04_HowToUse.html">4. How to use</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/05_UAC.html">5. UAC - User Access Control</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">AGENT</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Agent/02_Defs.html">2. Defs</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">TOOLS</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../../Tools/02_Defs.html">2. Defs StopSafe</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="../../../../index.html">pyOpenRPA</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="../../../../index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li><a href="../../../index.html">Module code</a> »</li>
|
||||
|
||||
<li>pyOpenRPA.Orchestrator.Web.Basic</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.Web.Basic</h1><div class="highlight"><pre>
|
||||
<span></span><span class="kn">import</span> <span class="nn">json</span><span class="o">,</span> <span class="nn">copy</span>
|
||||
<span class="kn">from</span> <span class="nn">..</span> <span class="kn">import</span> <span class="n">__Orchestrator__</span>
|
||||
<span class="kn">from</span> <span class="nn">..</span> <span class="kn">import</span> <span class="n">Processor</span>
|
||||
<span class="c1"># Escape JS to the safe JS for the inline JS in HTML tags ATTENTION! Use it only if want to paste JS into HTML tag - not in <script></span>
|
||||
<span class="c1"># USAGE: JSEscapeForHTMLInline(inJSStr="lTest=\"Hello World\"; alert(\"lTest\")")</span>
|
||||
<span class="k">def</span> <span class="nf">JSEscapeForHTMLInline</span><span class="p">(</span><span class="n">inJSStr</span><span class="p">):</span>
|
||||
<span class="n">lResult</span> <span class="o">=</span> <span class="n">inJSStr</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s2">"</span><span class="se">\"</span><span class="s2">"</span><span class="p">,</span><span class="s2">"&quot;"</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="n">lResult</span>
|
||||
|
||||
<div class="viewcode-block" id="JSProcessorActivityListAdd"><a class="viewcode-back" href="../../../../Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.Web.Basic.JSProcessorActivityListAdd">[docs]</a><span class="k">def</span> <span class="nf">JSProcessorActivityListAdd</span><span class="p">(</span><span class="n">inActivityList</span><span class="p">,</span> <span class="n">inGUIDRemoveBool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> # Create JS for send activity list/ activity to the processor</span>
|
||||
<span class="sd"> # USAGE: Orchestrator.Web.Basic.JSProcessorActivityListAdd(inActivityList)</span>
|
||||
|
||||
<span class="sd"> :param inActivityList: List of the activities (See __Orchestrator__.ProcessorActivityItemCreate)</span>
|
||||
<span class="sd"> :param inGUIDRemoveBool: True - remove GUID before generate JS (if GUID is not important)</span>
|
||||
<span class="sd"> :return: JavaScript string for the front end</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="n">Processor</span><span class="o">.</span><span class="n">__ActivityListVerify__</span><span class="p">(</span><span class="n">inActivityList</span><span class="o">=</span><span class="n">inActivityList</span><span class="p">)</span> <span class="c1"># DO VERIFICATION FOR THE inActivityList</span>
|
||||
<span class="n">inActivityList</span> <span class="o">=</span> <span class="n">copy</span><span class="o">.</span><span class="n">deepcopy</span><span class="p">(</span><span class="n">inActivityList</span><span class="p">)</span>
|
||||
<span class="c1"># Check if no def function is here - if exist - replace to alias</span>
|
||||
<span class="k">for</span> <span class="n">lActivityItem</span> <span class="ow">in</span> <span class="n">inActivityList</span><span class="p">:</span>
|
||||
<span class="k">if</span> <span class="s2">"GUIDStr"</span> <span class="ow">in</span> <span class="n">lActivityItem</span> <span class="ow">and</span> <span class="n">inGUIDRemoveBool</span> <span class="o">==</span> <span class="kc">True</span><span class="p">:</span> <span class="k">del</span> <span class="n">lActivityItem</span><span class="p">[</span><span class="s2">"GUIDStr"</span><span class="p">]</span> <span class="c1"># Remove GUID from activity items if exists</span>
|
||||
<span class="n">lDef</span> <span class="o">=</span> <span class="n">lActivityItem</span><span class="p">[</span><span class="s2">"Def"</span><span class="p">]</span>
|
||||
<span class="k">if</span> <span class="n">callable</span><span class="p">(</span><span class="n">lDef</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">"pyOpenRPA Exception: You can't send ActivityList with def to JS. Use Def Alias (see Orchestrator.ProcessorAliasDefUpdate)"</span><span class="p">)</span>
|
||||
<span class="n">lJSStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"""mGlobal.pyOpenRPA.ProcessorQueueAdd(</span><span class="si">{</span><span class="n">json</span><span class="o">.</span><span class="n">dumps</span><span class="p">(</span><span class="n">inActivityList</span><span class="p">)</span><span class="si">}</span><span class="s2">);"""</span>
|
||||
<span class="k">return</span> <span class="n">lJSStr</span></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="JSActivityListExecute"><a class="viewcode-back" href="../../../../Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.Web.Basic.JSActivityListExecute">[docs]</a><span class="k">def</span> <span class="nf">JSActivityListExecute</span><span class="p">(</span><span class="n">inActivityList</span><span class="p">,</span> <span class="n">inGUIDRemoveBool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Create JS for execute activity list/ activity permanent</span>
|
||||
<span class="sd"> USAGE: Orchestrator.Web.Basic.JSActivityListExecute(inActivityList, inGUIDRemoveBool = True)</span>
|
||||
|
||||
<span class="sd"> :param inActivityList: List of the activities (See __Orchestrator__.ProcessorActivityItemCreate)</span>
|
||||
<span class="sd"> :param inGUIDRemoveBool: True - remove GUID before generate JS (if GUID is not important)</span>
|
||||
<span class="sd"> :return: JavaScript string for the front end</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="n">Processor</span><span class="o">.</span><span class="n">__ActivityListVerify__</span><span class="p">(</span><span class="n">inActivityList</span><span class="o">=</span><span class="n">inActivityList</span><span class="p">)</span> <span class="c1"># DO VERIFICATION FOR THE inActivityList</span>
|
||||
<span class="n">inActivityList</span> <span class="o">=</span> <span class="n">copy</span><span class="o">.</span><span class="n">deepcopy</span><span class="p">(</span><span class="n">inActivityList</span><span class="p">)</span>
|
||||
<span class="c1"># Check if no def function is here - if exist - replace to alias</span>
|
||||
<span class="k">for</span> <span class="n">lActivityItem</span> <span class="ow">in</span> <span class="n">inActivityList</span><span class="p">:</span>
|
||||
<span class="k">if</span> <span class="s2">"GUIDStr"</span> <span class="ow">in</span> <span class="n">lActivityItem</span> <span class="ow">and</span> <span class="n">inGUIDRemoveBool</span> <span class="o">==</span> <span class="kc">True</span><span class="p">:</span> <span class="k">del</span> <span class="n">lActivityItem</span><span class="p">[</span><span class="s2">"GUIDStr"</span><span class="p">]</span> <span class="c1"># Remove GUID from activity items if exists</span>
|
||||
<span class="n">lDef</span> <span class="o">=</span> <span class="n">lActivityItem</span><span class="p">[</span><span class="s2">"Def"</span><span class="p">]</span>
|
||||
<span class="k">if</span> <span class="n">callable</span><span class="p">(</span><span class="n">lDef</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">"pyOpenRPA Exception: You can't send ActivityList with def to JS. Use Def Alias (see Orchestrator.ProcessorAliasDefUpdate)"</span><span class="p">)</span>
|
||||
<span class="n">lJSStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"""mGlobal.pyOpenRPA.ActivityListExecute(</span><span class="si">{</span><span class="n">json</span><span class="o">.</span><span class="n">dumps</span><span class="p">(</span><span class="n">inActivityList</span><span class="p">)</span><span class="si">}</span><span class="s2">);"""</span>
|
||||
<span class="k">return</span> <span class="n">lJSStr</span></div>
|
||||
|
||||
<span class="c1"># Generate HTML code of the simple URL link by the URL</span>
|
||||
<span class="c1"># USAGE: Orchestrator.Web.Basic.HTMLLinkURL(inURLStr="test",inColorStr="orange")</span>
|
||||
<span class="c1"># USAGE: Basic.HTMLLinkURL(inURLStr="test",inColorStr="orange")</span>
|
||||
<span class="k">def</span> <span class="nf">HTMLLinkURL</span><span class="p">(</span><span class="n">inURLStr</span><span class="p">,</span> <span class="n">inTitleStr</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inColorStr</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
|
||||
<span class="n">lCSSStyleStr</span> <span class="o">=</span> <span class="s2">""</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="n">inTitleStr</span><span class="p">:</span> <span class="n">inTitleStr</span> <span class="o">=</span> <span class="n">inURLStr</span>
|
||||
<span class="k">if</span> <span class="n">inColorStr</span><span class="p">:</span> <span class="n">lCSSStyleStr</span><span class="o">=</span><span class="sa">f</span><span class="s2">"style=</span><span class="se">\"</span><span class="s2">color:</span><span class="si">{</span><span class="n">inColorStr</span><span class="si">}</span><span class="se">\"</span><span class="s2">"</span>
|
||||
<span class="n">lResult</span><span class="o">=</span><span class="sa">f</span><span class="s2">"<a </span><span class="si">{</span><span class="n">lCSSStyleStr</span><span class="si">}</span><span class="s2"> href=</span><span class="se">\"</span><span class="si">{</span><span class="n">inURLStr</span><span class="si">}</span><span class="se">\"</span><span class="s2">></span><span class="si">{</span><span class="n">inTitleStr</span><span class="si">}</span><span class="s2"></a>"</span>
|
||||
<span class="k">return</span> <span class="n">lResult</span>
|
||||
|
||||
<span class="c1"># Generate HTML code of the simple URL link by the JS when onclick</span>
|
||||
<span class="c1"># USAGE: Orchestrator.Web.Basic.HTMLLinkJSOnClick(inJSOnClickStr="",inColorStr="orange")</span>
|
||||
<span class="c1"># USAGE: Basic.HTMLLinkJSOnClick(inJSOnClickStr="test",inColorStr="orange")</span>
|
||||
<span class="k">def</span> <span class="nf">HTMLLinkJSOnClick</span><span class="p">(</span><span class="n">inJSOnClickStr</span><span class="p">,</span> <span class="n">inTitleStr</span><span class="p">,</span> <span class="n">inColorStr</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
|
||||
<span class="n">lCSSStyleStr</span> <span class="o">=</span> <span class="s2">""</span>
|
||||
<span class="k">if</span> <span class="n">inColorStr</span><span class="p">:</span> <span class="n">lCSSStyleStr</span><span class="o">=</span><span class="sa">f</span><span class="s2">"style=</span><span class="se">\"</span><span class="s2">color:</span><span class="si">{</span><span class="n">inColorStr</span><span class="si">}</span><span class="se">\"</span><span class="s2">"</span>
|
||||
<span class="n">inJSOnClickStr</span><span class="o">=</span> <span class="n">JSEscapeForHTMLInline</span><span class="p">(</span><span class="n">inJSStr</span><span class="o">=</span><span class="n">inJSOnClickStr</span><span class="p">)</span> <span class="c1"># Escape some symbols for the inline JS</span>
|
||||
<span class="n">lResult</span><span class="o">=</span><span class="sa">f</span><span class="s2">"<a </span><span class="si">{</span><span class="n">lCSSStyleStr</span><span class="si">}</span><span class="s2"> onclick=</span><span class="se">\"</span><span class="si">{</span><span class="n">inJSOnClickStr</span><span class="si">}</span><span class="se">\"</span><span class="s2">></span><span class="si">{</span><span class="n">inTitleStr</span><span class="si">}</span><span class="s2"></a>"</span>
|
||||
<span class="k">return</span> <span class="n">lResult</span>
|
||||
|
||||
<span class="c1"># Create HTMLLink by the def, argdict, arglist, gsettingsStr, logger Str titleStr, color, (add in processor queue)</span>
|
||||
<span class="k">def</span> <span class="nf">HTMLLinkDefProcessor</span><span class="p">(</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inDef</span><span class="p">,</span> <span class="n">inArgDict</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inArgList</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inArgGSettingsStr</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inArgLoggerStr</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inLinkTitleStr</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inLinkColorStr</span><span class="o">=</span><span class="s2">""</span><span class="p">):</span>
|
||||
<span class="n">lDefAliasStr</span> <span class="o">=</span> <span class="n">inDef</span>
|
||||
<span class="k">if</span> <span class="n">callable</span><span class="p">(</span><span class="n">inDef</span><span class="p">):</span>
|
||||
<span class="n">lDefAliasStr</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">inDef</span><span class="p">)</span>
|
||||
<span class="n">lDefAliasStr</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">ProcessorAliasDefUpdate</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inDef</span><span class="o">=</span><span class="n">inDef</span><span class="p">,</span> <span class="n">inAliasStr</span><span class="o">=</span><span class="n">lDefAliasStr</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="n">inLinkTitleStr</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="n">inLinkTitleStr</span> <span class="o">=</span> <span class="n">lDefAliasStr</span>
|
||||
<span class="n">lActivityList</span> <span class="o">=</span> <span class="p">[</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="n">lDefAliasStr</span><span class="p">,</span><span class="n">inArgList</span><span class="o">=</span><span class="n">inArgList</span><span class="p">,</span><span class="n">inArgDict</span><span class="o">=</span><span class="n">inArgDict</span><span class="p">,</span><span class="n">inArgGSettingsStr</span><span class="o">=</span><span class="n">inArgGSettingsStr</span><span class="p">,</span><span class="n">inArgLoggerStr</span><span class="o">=</span><span class="n">inArgLoggerStr</span><span class="p">)]</span>
|
||||
<span class="n">lJSStr</span> <span class="o">=</span> <span class="n">JSProcessorActivityListAdd</span><span class="p">(</span><span class="n">lActivityList</span><span class="p">)</span>
|
||||
<span class="n">lHTMLStr</span> <span class="o">=</span> <span class="n">HTMLLinkJSOnClick</span><span class="p">(</span><span class="n">inJSOnClickStr</span><span class="o">=</span><span class="n">lJSStr</span><span class="p">,</span><span class="n">inTitleStr</span><span class="o">=</span><span class="n">inLinkTitleStr</span><span class="p">,</span> <span class="n">inColorStr</span><span class="o">=</span><span class="n">inLinkColorStr</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="n">lHTMLStr</span>
|
||||
|
||||
<span class="c1"># Create HTMLLink by the def, argdict, arglist, gsettingsStr, logger Str titleStr, color, (execute permanently)</span>
|
||||
<span class="k">def</span> <span class="nf">HTMLLinkDefExecute</span><span class="p">(</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inDef</span><span class="p">,</span> <span class="n">inArgDict</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inArgList</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inArgGSettingsStr</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inArgLoggerStr</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inLinkTitleStr</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inLinkColorStr</span><span class="o">=</span><span class="s2">""</span><span class="p">):</span>
|
||||
<span class="n">lDefAliasStr</span> <span class="o">=</span> <span class="n">inDef</span>
|
||||
<span class="k">if</span> <span class="n">callable</span><span class="p">(</span><span class="n">inDef</span><span class="p">):</span>
|
||||
<span class="n">lDefAliasStr</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">inDef</span><span class="p">)</span>
|
||||
<span class="n">lDefAliasStr</span> <span class="o">=</span> <span class="n">__Orchestrator__</span><span class="o">.</span><span class="n">ProcessorAliasDefUpdate</span><span class="p">(</span><span class="n">inGSettings</span><span class="o">=</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inDef</span><span class="o">=</span><span class="n">inDef</span><span class="p">,</span> <span class="n">inAliasStr</span><span class="o">=</span><span class="n">lDefAliasStr</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="n">inLinkTitleStr</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="n">inLinkTitleStr</span> <span class="o">=</span> <span class="n">lDefAliasStr</span>
|
||||
<span class="n">lActivityList</span> <span class="o">=</span> <span class="p">[</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="n">lDefAliasStr</span><span class="p">,</span><span class="n">inArgList</span><span class="o">=</span><span class="n">inArgList</span><span class="p">,</span><span class="n">inArgDict</span><span class="o">=</span><span class="n">inArgDict</span><span class="p">,</span><span class="n">inArgGSettingsStr</span><span class="o">=</span><span class="n">inArgGSettingsStr</span><span class="p">,</span><span class="n">inArgLoggerStr</span><span class="o">=</span><span class="n">inArgLoggerStr</span><span class="p">)]</span>
|
||||
<span class="n">lJSStr</span> <span class="o">=</span> <span class="n">JSActivityListExecute</span><span class="p">(</span><span class="n">lActivityList</span><span class="p">)</span>
|
||||
<span class="n">lHTMLStr</span> <span class="o">=</span> <span class="n">HTMLLinkJSOnClick</span><span class="p">(</span><span class="n">inJSOnClickStr</span><span class="o">=</span><span class="n">lJSStr</span><span class="p">,</span><span class="n">inTitleStr</span><span class="o">=</span><span class="n">inLinkTitleStr</span><span class="p">,</span> <span class="n">inColorStr</span><span class="o">=</span><span class="n">inLinkColorStr</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="n">lHTMLStr</span>
|
||||
|
||||
<span class="c1"># HTML Generator for the CP up to v.1.2.0</span>
|
||||
<span class="k">def</span> <span class="nf">HTMLControlPanelBC</span><span class="p">(</span><span class="n">inCPDict</span><span class="p">):</span>
|
||||
<span class="c1"># FooterButtonX2List generation</span>
|
||||
<span class="n">lFooterButtonX2Str</span> <span class="o">=</span> <span class="s2">""</span>
|
||||
<span class="k">for</span> <span class="n">lItem</span> <span class="ow">in</span> <span class="n">inCPDict</span><span class="p">[</span><span class="s2">"FooterButtonX2List"</span><span class="p">]:</span>
|
||||
<span class="n">lFooterButtonX2Str</span><span class="o">+=</span><span class="sa">f</span><span class="s1">'<div class="ui basic </span><span class="si">{</span><span class="n">lItem</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"Color"</span><span class="p">,</span><span class="s2">""</span><span class="p">)</span><span class="si">}</span><span class="s1"> button" onclick="</span><span class="si">{</span><span class="n">JSEscapeForHTMLInline</span><span class="p">(</span><span class="n">lItem</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"OnClick"</span><span class="p">,</span><span class="s2">""</span><span class="p">))</span><span class="si">}</span><span class="s1">"></span><span class="si">{</span><span class="n">lItem</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"Text"</span><span class="p">,</span><span class="s2">""</span><span class="p">)</span><span class="si">}</span><span class="s1"></div>'</span>
|
||||
<span class="c1"># FooterButtonX1List generation</span>
|
||||
<span class="n">lFooterButtonX1Str</span> <span class="o">=</span> <span class="s2">""</span>
|
||||
<span class="k">for</span> <span class="n">lItem</span> <span class="ow">in</span> <span class="n">inCPDict</span><span class="p">[</span><span class="s2">"FooterButtonX1List"</span><span class="p">]:</span>
|
||||
<span class="n">lFooterButtonX1Str</span><span class="o">+=</span><span class="sa">f</span><span class="s1">'<div class="ui basic </span><span class="si">{</span><span class="n">lItem</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"Color"</span><span class="p">,</span><span class="s2">""</span><span class="p">)</span><span class="si">}</span><span class="s1"> button" onclick="</span><span class="si">{</span><span class="n">JSEscapeForHTMLInline</span><span class="p">(</span><span class="n">lItem</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"OnClick"</span><span class="p">,</span><span class="s2">""</span><span class="p">))</span><span class="si">}</span><span class="s1">"></span><span class="si">{</span><span class="n">lItem</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"Text"</span><span class="p">,</span><span class="s2">""</span><span class="p">)</span><span class="si">}</span><span class="s1"></div>'</span>
|
||||
<span class="c1"># BodyKeyValue generation</span>
|
||||
<span class="n">lBodyKeyValueStr</span> <span class="o">=</span> <span class="s2">""</span>
|
||||
<span class="k">for</span> <span class="n">lItem</span> <span class="ow">in</span> <span class="n">inCPDict</span><span class="p">[</span><span class="s2">"BodyKeyValueList"</span><span class="p">]:</span>
|
||||
<span class="n">lBodyKeyValueStr</span><span class="o">+=</span><span class="sa">f</span><span class="s2">"<li></span><span class="si">{</span><span class="n">lItem</span><span class="p">[</span><span class="s1">'Key'</span><span class="p">]</span><span class="si">}</span><span class="s2">: </span><span class="si">{</span><span class="n">lItem</span><span class="p">[</span><span class="s1">'Value'</span><span class="p">]</span><span class="si">}</span><span class="s2"></li>"</span>
|
||||
<span class="c1"># Generate consolidated string</span>
|
||||
<span class="n">lResultHTMLStr</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"""</span>
|
||||
<span class="s2"> <div class="card"></span>
|
||||
<span class="s2"> <div class="content"></span>
|
||||
<span class="s2"> <div class="right floated mini ui "></span>
|
||||
<span class="s2"> </span><span class="si">{</span><span class="n">inCPDict</span><span class="p">[</span><span class="s1">'HeaderRightText'</span><span class="p">]</span><span class="si">}</span><span class="s2"></span>
|
||||
<span class="s2"> </div></span>
|
||||
<span class="s2"> <div class="header"></span>
|
||||
<span class="s2"> </span><span class="si">{</span><span class="n">inCPDict</span><span class="p">[</span><span class="s1">'HeaderLeftText'</span><span class="p">]</span><span class="si">}</span><span class="s2"></span>
|
||||
|
||||
<span class="s2"> </div></span>
|
||||
<span class="s2"> <div class="meta"></span>
|
||||
<span class="s2"> </span><span class="si">{</span><span class="n">inCPDict</span><span class="p">[</span><span class="s1">'SubheaderText'</span><span class="p">]</span><span class="si">}</span><span class="s2"></span>
|
||||
<span class="s2"> </div></span>
|
||||
<span class="s2"> <div class="description"></span>
|
||||
<span class="s2"> <ul style="padding-inline-start:16px;margin:0px"></span>
|
||||
<span class="s2"> </span><span class="si">{</span><span class="n">lBodyKeyValueStr</span><span class="si">}</span><span class="s2"></span>
|
||||
<span class="s2"> </ul></span>
|
||||
<span class="s2"> </div></span>
|
||||
<span class="s2"> </div></span>
|
||||
<span class="s2"> <div class="extra content"></span>
|
||||
<span class="s2"> </span><span class="si">{</span><span class="n">inCPDict</span><span class="p">[</span><span class="s1">'FooterText'</span><span class="p">]</span><span class="si">}</span><span class="s2"></span>
|
||||
<span class="s2"> </div></span>
|
||||
<span class="s2"> <div class="extra content"></span>
|
||||
<span class="s2"> <div class="ui two buttons"></span>
|
||||
<span class="s2"> </span><span class="si">{</span><span class="n">lFooterButtonX2Str</span><span class="si">}</span><span class="s2"></span>
|
||||
<span class="s2"> </div></span>
|
||||
<span class="s2"> <div class="ui horizontal divider">Add. controls</div></span>
|
||||
<span class="s2"> <div class="ui one buttons"></span>
|
||||
<span class="s2"> </span><span class="si">{</span><span class="n">lFooterButtonX1Str</span><span class="si">}</span><span class="s2"></span>
|
||||
<span class="s2"> </div></span>
|
||||
<span class="s2"> </div></span>
|
||||
<span class="s2"> </div></span>
|
||||
<span class="s2"> """</span>
|
||||
|
||||
<span class="k">return</span> <span class="n">lResultHTMLStr</span>
|
||||
</pre></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© 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>
|
@ -1,298 +0,0 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>pyOpenRPA.Tools.StopSafe — 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 & Contacts</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">ROBOT</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../Robot/01_Robot.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../Robot/02_Defs.html">2. Defs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../Robot/03_HowToUse.html">3. How to use</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../Robot/04_Dependencies.html">4. Dependencies</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">STUDIO</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../Studio/01_Studio.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../Studio/02_HowToUse.html">2. How to use</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">ORCHESTRATOR</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/01_Orchestrator.html">1. Description</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/02_Defs.html">2. Defs</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/03_gSettingsTemplate.html">3. gSettings Template</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/04_HowToUse.html">4. How to use</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/05_UAC.html">5. UAC - User Access Control</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../Orchestrator/06_Defs%20Managers.html">6. Defs Managers</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">AGENT</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../Agent/02_Defs.html">2. Defs</a></li>
|
||||
</ul>
|
||||
<p class="caption"><span class="caption-text">TOOLS</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../../Tools/02_Defs.html">2. Defs StopSafe</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="../../../index.html">pyOpenRPA</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="../../../index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li><a href="../../index.html">Module code</a> »</li>
|
||||
|
||||
<li>pyOpenRPA.Tools.StopSafe</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<h1>Source code for pyOpenRPA.Tools.StopSafe</h1><div class="highlight"><pre>
|
||||
<span></span><span class="sd">"""</span>
|
||||
<span class="sd"># How to use</span>
|
||||
<span class="sd"># from pyOpenRPA.Tools import StopSafe</span>
|
||||
<span class="sd"># StopSafe.Init(inLogger=None)</span>
|
||||
<span class="sd"># StopSafe.IsSafeStop() # True - WM_CLOSE SIGNAL has come. taskkill /im someprocess.exe</span>
|
||||
<span class="sd">"""</span>
|
||||
|
||||
|
||||
<span class="kn">import</span> <span class="nn">win32con</span>
|
||||
<span class="kn">import</span> <span class="nn">win32gui</span>
|
||||
<span class="kn">import</span> <span class="nn">os</span>
|
||||
<span class="n">gIsSignalCloseBool</span> <span class="o">=</span> <span class="kc">False</span>
|
||||
<span class="n">gLogger</span> <span class="o">=</span> <span class="kc">None</span>
|
||||
<span class="n">gWindowTitleStr</span> <span class="o">=</span> <span class="s2">"PythonTerminator"</span> <span class="c1"># Title of the phantom window</span>
|
||||
<span class="n">gWindowDescriptionStr</span> <span class="o">=</span> <span class="s2">"pyOpenRPA library for safe turn off the program (by send the WM_CLOSE signal from task kill)"</span> <span class="c1"># Description of the phantom window</span>
|
||||
|
||||
<div class="viewcode-block" id="Init"><a class="viewcode-back" href="../../../Tools/02_Defs.html#pyOpenRPA.Tools.StopSafe.Init">[docs]</a><span class="k">def</span> <span class="nf">Init</span><span class="p">(</span><span class="n">inLogger</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Init the StopSafe module. After that you can use def IsStopSafe() to check if close signal has come.</span>
|
||||
|
||||
<span class="sd"> :param inLogger: Logger to log messages about StopSafe</span>
|
||||
<span class="sd"> :return:</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">global</span> <span class="n">gLogger</span>
|
||||
<span class="k">global</span> <span class="n">gIsSignalCloseBool</span>
|
||||
<span class="n">gIsSignalCloseBool</span> <span class="o">=</span> <span class="kc">False</span> <span class="c1"># Init default</span>
|
||||
<span class="n">gLogger</span> <span class="o">=</span> <span class="n">inLogger</span>
|
||||
<span class="kn">import</span> <span class="nn">threading</span>
|
||||
<span class="k">if</span> <span class="n">gLogger</span><span class="p">:</span> <span class="n">gLogger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="sa">f</span><span class="s2">"StopSafe: Init termination catch thread"</span><span class="p">)</span>
|
||||
<span class="n">shutdown_thread</span> <span class="o">=</span> <span class="n">threading</span><span class="o">.</span><span class="n">Thread</span><span class="p">(</span><span class="n">target</span><span class="o">=</span><span class="n">_shutdown_monitor</span><span class="p">)</span>
|
||||
<span class="n">shutdown_thread</span><span class="o">.</span><span class="n">start</span><span class="p">()</span></div>
|
||||
<span class="c1">#shutdown_thread.join()</span>
|
||||
<span class="c1">#shutdown_monitor()</span>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="IsStopSafe"><a class="viewcode-back" href="../../../Tools/02_Defs.html#pyOpenRPA.Tools.StopSafe.IsStopSafe">[docs]</a><span class="k">def</span> <span class="nf">IsStopSafe</span><span class="p">():</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Check if stop signal has come.</span>
|
||||
|
||||
<span class="sd"> :return:</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">global</span> <span class="n">gIsSignalCloseBool</span> <span class="c1"># Init the global variable</span>
|
||||
<span class="k">return</span> <span class="n">gIsSignalCloseBool</span> <span class="c1"># Return the result</span></div>
|
||||
|
||||
<span class="k">def</span> <span class="nf">_shutdown_monitor</span><span class="p">():</span>
|
||||
<span class="k">global</span> <span class="n">gIsSignalCloseBool</span> <span class="c1"># Init the global variable</span>
|
||||
<span class="k">global</span> <span class="n">gLogger</span>
|
||||
<span class="k">def</span> <span class="nf">wndproc</span><span class="p">(</span><span class="n">hwnd</span><span class="p">,</span> <span class="n">msg</span><span class="p">,</span> <span class="n">wparam</span><span class="p">,</span> <span class="n">lparam</span><span class="p">):</span>
|
||||
<span class="k">if</span> <span class="n">msg</span> <span class="o">==</span> <span class="n">win32con</span><span class="o">.</span><span class="n">WM_CLOSE</span><span class="p">:</span>
|
||||
<span class="n">win32gui</span><span class="o">.</span><span class="n">DestroyWindow</span><span class="p">(</span><span class="n">hwnd</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="mi">0</span>
|
||||
<span class="k">elif</span> <span class="n">msg</span> <span class="o">==</span> <span class="n">win32con</span><span class="o">.</span><span class="n">WM_DESTROY</span><span class="p">:</span>
|
||||
<span class="n">win32gui</span><span class="o">.</span><span class="n">PostQuitMessage</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="mi">0</span>
|
||||
<span class="k">return</span> <span class="n">win32gui</span><span class="o">.</span><span class="n">DefWindowProc</span><span class="p">(</span><span class="n">hwnd</span><span class="p">,</span> <span class="n">msg</span><span class="p">,</span> <span class="n">wparam</span><span class="p">,</span> <span class="n">lparam</span><span class="p">)</span>
|
||||
<span class="n">wc</span> <span class="o">=</span> <span class="n">win32gui</span><span class="o">.</span><span class="n">WNDCLASS</span><span class="p">()</span>
|
||||
<span class="n">wc</span><span class="o">.</span><span class="n">lpszClassName</span> <span class="o">=</span> <span class="n">gWindowTitleStr</span>
|
||||
<span class="n">wc</span><span class="o">.</span><span class="n">lpfnWndProc</span> <span class="o">=</span> <span class="n">wndproc</span>
|
||||
<span class="n">win32gui</span><span class="o">.</span><span class="n">RegisterClass</span><span class="p">(</span><span class="n">wc</span><span class="p">)</span>
|
||||
<span class="n">hwnd</span> <span class="o">=</span> <span class="n">win32gui</span><span class="o">.</span><span class="n">CreateWindow</span><span class="p">(</span><span class="n">gWindowTitleStr</span><span class="p">,</span> <span class="n">gWindowDescriptionStr</span><span class="p">,</span>
|
||||
<span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
|
||||
<span class="n">win32gui</span><span class="o">.</span><span class="n">PumpMessages</span><span class="p">()</span>
|
||||
<span class="n">gIsSignalCloseBool</span> <span class="o">=</span> <span class="kc">True</span> <span class="c1"># WM_CLOSE message has come</span>
|
||||
<span class="k">if</span> <span class="n">gLogger</span><span class="p">:</span>
|
||||
<span class="n">gLogger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="sa">f</span><span class="s2">"StopSafe: Program has catch VM_CLOSE signal - do safe exit"</span><span class="p">)</span>
|
||||
|
||||
</pre></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© 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>
|
@ -1,32 +0,0 @@
|
||||
####################################
|
||||
1. How to install
|
||||
####################################
|
||||
|
||||
Are you ready to install the pyOpenRPA solution on your machine?
|
||||
|
||||
Ok, we start.
|
||||
**Do the following operations:**
|
||||
|
||||
- Download the pyOpenRPA package from master branch on GitLab [Download ZIP](https://gitlab.com/UnicodeLabs/OpenRPA/-/archive/master/OpenRPA-master.zip)
|
||||
- Unzip the package
|
||||
|
||||
**Installation has been completed :)**
|
||||
|
||||
**************************************************
|
||||
How to check installation
|
||||
**************************************************
|
||||
- Run portable python (built in the pyOpenRPA)
|
||||
|
||||
- x32 python (GIT\\Resources\\WPy32-3720\\python-3.7.2\\python.exe)
|
||||
- x64 python (GIT\\Resources\\WPy64-3720\\python-3.7.2.amd64\\python.exe)
|
||||
|
||||
**The pyOpenRPA has been successfully installed if the portable python 3.7.2 was started without any exceptions (see screenshot).**
|
||||
|
||||
.. image:: /img/cb5dec8cecafa7d64f6cd14b2672acce.png
|
||||
:alt: cb5dec8cecafa7d64f6cd14b2672acce.png
|
||||
|
||||
**************************************************
|
||||
System requirements
|
||||
**************************************************
|
||||
- OS Windows 7+. *Need Windows package KB2999226 if use windows Vista/7/8/8.1/Server 2008/Server 2012 (https://support.microsoft.com/ru-ru/help/2999226)*
|
||||
- For OpenCV: OS Windows 7/8/8/10 only (no Windows Server)
|
@ -1,22 +0,0 @@
|
||||
####################################
|
||||
2. Roadmap
|
||||
####################################
|
||||
|
||||
- Guide
|
||||
- ENG - done 2021.03.11
|
||||
- HTML `|OPEN GITLAB| <https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/ENG_Guide/html/index.html>`_
|
||||
- MarkDown `|OPEN GITLAB| <https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/ENG_Guide/markdown/index.md>`_
|
||||
- PDF `[|OPEN GITLAB|] <https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/ENG_Guide/pdf/pyOpenRPA_Guide_ENG.pdf>`_
|
||||
- RUS - queue
|
||||
|
||||
- Tutorial
|
||||
- ENG - queue
|
||||
- RUS - in progress
|
||||
- Article: Less cost - no paid RPA `|OPEN HABR| <https://habr.com/ru/post/506766/>`_
|
||||
- Tutorial Desktop UI `|OPEN HABR| <https://habr.com/ru/post/509644/>`_; `|OPEN GITLAB| <https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/RUS_Tutorial/DesktopGUI_Habr/index.md>`_
|
||||
- Tutorial Web UI `|OPEN HABR| <https://habr.com/ru/post/515310/>`_; `|OPEN GITLAB| <https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/RUS_Tutorial/WebGUI_Habr/readme.md>`_
|
||||
- Article: RPA as a core of the IT automation - soon
|
||||
- Leaflet
|
||||
- ENG queue
|
||||
- RUS done 2021.02.23
|
||||
- RUS Leaflet pyOpenRPA v4.pdf `|OPEN GITLAB| <https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/RUS_Leaflet/RUS%20Leaflet%20pyOpenRPA%20v4.pdf>`_
|
@ -1,44 +0,0 @@
|
||||
.. _3.-Copyrights-&-Contacts:
|
||||
|
||||
####################################
|
||||
3. Copyrights & Contacts
|
||||
####################################
|
||||
|
||||
pyOpenRPA is created by Ivan Maslov (Russia).
|
||||
Hosted by PYOPENRPA LLC (Russia)
|
||||
|
||||
My purpose is to create #IT4Business models in the companies.
|
||||
I can help you to create the new #IT4Business in your company.
|
||||
#IT4Business homepage - https://www.facebook.com/RU.IT4Business
|
||||
#IT4Busines is the methodology which is created for build compact fast and reliable IT function in company.
|
||||
If you has many IT specialists, very long deadlines for the IT tasks, many bugs in IT software - #IT4Business is for you :)
|
||||
|
||||
If you need some IT help - feel free to contact me (prefer e-mail or skype).
|
||||
If you will find some issue in pyOpenRPA - write about it to me via e-mail/skype/gitlab issue.
|
||||
|
||||
Thank you!
|
||||
|
||||
**************************************************
|
||||
Ivan Maslov (founder)
|
||||
**************************************************
|
||||
- E-mail: Ivan.Maslov@UnicodeLabs.ru
|
||||
|
||||
- Skype: MegaFinder
|
||||
|
||||
- Facebook: https://www.facebook.com/RU.IT4Business
|
||||
|
||||
- LinkedIn: https://www.linkedin.com/in/RU-IvanMaslov/
|
||||
|
||||
- WhatsApp | Telegram: +7 906 722 39 25
|
||||
|
||||
|
||||
**************************************************
|
||||
3-rd party components license dependencies
|
||||
**************************************************
|
||||
- WinPython 3.7.1 32-bit & 64-bit, license MIT (https://github.com/winpython/winpython)
|
||||
- Selenium v..., license Apache 2.0
|
||||
- pywinauto 0.6.5, license BSD 3-Clause (https://github.com/pywinauto/pywinauto)
|
||||
- Semantic UI ..., license MIT (https://github.com/Semantic-Org/Semantic-UI)
|
||||
- PyAutoGUI ..., license BSD 3-Clause (https://github.com/asweigart/pyautogui)
|
||||
- keyboard ..., license MIT (https://github.com/boppreh/keyboard)
|
||||
- pywin32
|
@ -1,23 +0,0 @@
|
||||
####################################
|
||||
2. Defs
|
||||
####################################
|
||||
|
||||
**************************************************
|
||||
pyOpenRPA.Agent.__Agent__
|
||||
**************************************************
|
||||
|
||||
|
||||
|
||||
.. automodule:: pyOpenRPA.Agent.__Agent__
|
||||
:members:
|
||||
:autosummary:
|
||||
|
||||
|
||||
**********
|
||||
References
|
||||
**********
|
||||
|
||||
`reStructuredText`_
|
||||
|
||||
.. target-notes::
|
||||
.. _`reStructuredText`: http://docutils.sourceforge.net/rst.html
|
@ -1,90 +0,0 @@
|
||||
####################################
|
||||
1. Description
|
||||
####################################
|
||||
|
||||
pyOpenRPA Orchestrator is the executable process.
|
||||
|
||||
The features of the orchestrator is:
|
||||
- Centralized/decentralized user control interface (applicable and for business users and for technical users). Web based, support desktop, tablet, phone.
|
||||
- Automatized robots control (customized algorithms, robots scheduling)
|
||||
- Source code mega flexibility: Light Orchestrator architecture is good for own customization
|
||||
|
||||
************************************
|
||||
Global settings dict concept
|
||||
************************************
|
||||
pyOpenRPA project is complex tool which consist of several executable modules such as Robot, Orchestrator, Studio,
|
||||
|
||||
Because of module compexity, we use 1 init arg - inGSettings
|
||||
inGSettings is a complex dictionary which has all reqired parameters for the module execution.
|
||||
|
||||
The description of the GSettings you can find in executable module details.
|
||||
|
||||
************************************
|
||||
Orchestrator how to configure
|
||||
************************************
|
||||
|
||||
|
||||
To init pyOpenRPA Orchestrator instance use script:
|
||||
|
||||
from pyOpenRPA import Orchestrator # Import orchestrator main
|
||||
gSettings = SettingsTemplate.Create(inModeStr="BASIC") # Create GSettings with basic configuration
|
||||
Orchestrator.Orchestrator(inGSettings=gSettings) # Call the orchestrator def
|
||||
|
||||
gSettings structure
|
||||
|
||||
|
||||
************************************
|
||||
Orchestrator architecture
|
||||
************************************
|
||||
Orchestrator has several source code components:
|
||||
- User/robot activity consolidated queue single thread (Processor)
|
||||
- User/robot activity asynchonus many threads (Processor)
|
||||
- Scheduler single thread (main)
|
||||
- RDP keep active many thread
|
||||
- Autocleaner single thread
|
||||
- GUI keep active single thread
|
||||
- HTTP web server single thread (create user socket threads)
|
||||
-
|
||||
|
||||
Below you can find more information about all of the component.
|
||||
|
||||
***************************
|
||||
Component Processor
|
||||
***************************
|
||||
Sync - Append activity list to consolidated processor queue. Execution goes sequency by the activity list order
|
||||
|
||||
Async - Create New thread to execute the activity list
|
||||
|
||||
- Activity list
|
||||
|
||||
List of the activity item
|
||||
|
||||
- Activity item
|
||||
|
||||
Activity item is universal mechanism to execute different algorythms from any sources.
|
||||
The core feature of the Activity is to call python defs with args and kwargs.
|
||||
If you need to init do some activity you can write some python def, then create Activity item with current def.
|
||||
ATTENTION: In some cases (such as web transmition), when you can't transmit python def as object you can use symbolic names for python defs. It is apply you to init all of you want from the web UI.
|
||||
|
||||
?Why i cant transmit python def from the web
|
||||
Because the WEB space is not the Python executable space. Interaction between it spaces create by JSON protocol. So, we know than JSON apply int, float, str, bool, None, list, dict - that is all.
|
||||
|
||||
.. note::
|
||||
Example
|
||||
{
|
||||
"Def":"DefAliasTest", # def link or def alias (look gSettings["Processor"]["AliasDefDict"])
|
||||
"ArgList":[1,2,3], # Args list
|
||||
"ArgDict":{"ttt":1,"222":2,"dsd":3}, # Args dictionary
|
||||
"ArgGSettings": None # Name of GSettings attribute: str (ArgDict) or index (for ArgList)
|
||||
"ArgLogger": None # Name of GSettings attribute: str (ArgDict) or index (for ArgList)
|
||||
}# Pay attention! Do not left comma symbol after the end of the dict - it can be interpretated like a turple..
|
||||
|
||||
|
||||
**********
|
||||
References
|
||||
**********
|
||||
|
||||
`Python-sphinx`_
|
||||
|
||||
.. target-notes::
|
||||
.. _`reStructuredText`: http://docutils.sourceforge.net/rst.html
|
@ -1,88 +0,0 @@
|
||||
####################################
|
||||
2. Defs
|
||||
####################################
|
||||
|
||||
**************************************************
|
||||
pyOpenRPA.Orchestrator.__Orchestrator__
|
||||
**************************************************
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# EXAMPLE 1
|
||||
from pyOpenRPA import Orchestrator
|
||||
Orchestrator.OSCMD(inCMDStr = "git status", inRunAsyncBool=True)
|
||||
|
||||
# EXAMPLE 2
|
||||
from pyOpenRPA.Orchestrator import __Orchestrator__
|
||||
__Orchestrator__.OSCMD(inCMDStr = "git status", inRunAsyncBool=True)
|
||||
|
||||
|
||||
|
||||
Group Agent...
|
||||
######################
|
||||
Interaction between Orchestrator and pyOpenRPA.Agent daemon process, which can be deployed in another user session.
|
||||
|
||||
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.
|
||||
|
||||
Group Process...
|
||||
######################
|
||||
Interaction with some process on the Orchestrator user session.
|
||||
|
||||
Group Processor...
|
||||
######################
|
||||
Work with Processor queue (see ...).
|
||||
|
||||
Group Python...
|
||||
######################
|
||||
Work with extra python modules.
|
||||
|
||||
Group RDPSession...
|
||||
######################
|
||||
Interaction with RDP session, where you can manage some robots.
|
||||
|
||||
Group Web...
|
||||
######################
|
||||
Manipulate the Orchestrator WEB side.
|
||||
|
||||
Group UAC...
|
||||
######################
|
||||
Manipulate the User Access Controls (actual for the Orchestrator WEB access for the business users)
|
||||
|
||||
Group Scheduler...
|
||||
######################
|
||||
Work with activity scheduling.
|
||||
|
||||
|
||||
.. automodule:: pyOpenRPA.Orchestrator.__Orchestrator__
|
||||
:members:
|
||||
:autosummary:
|
||||
|
||||
|
||||
**************************************************
|
||||
pyOpenRPA.Orchestrator.Web.Basic
|
||||
**************************************************
|
||||
|
||||
.. automodule:: pyOpenRPA.Orchestrator.Web.Basic
|
||||
:members:
|
||||
:autosummary:
|
||||
|
||||
|
||||
|
||||
**********
|
||||
References
|
||||
**********
|
||||
|
||||
`reStructuredText`_
|
||||
|
||||
.. target-notes::
|
||||
.. _`reStructuredText`: http://docutils.sourceforge.net/rst.html
|
@ -1,9 +0,0 @@
|
||||
.. _gSettingsTemplate:
|
||||
************************
|
||||
3. gSettings Template
|
||||
************************
|
||||
|
||||
gSettings structure
|
||||
|
||||
.. include:: ../../pyOpenRPA/Orchestrator/SettingsTemplate.py
|
||||
:literal:
|
@ -1,19 +0,0 @@
|
||||
************************
|
||||
4. How to use
|
||||
************************
|
||||
|
||||
You need to run orchestrator process?
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
if __name__ == "__main__": # New init way - allow run as module -m PyOpenRPA.Orchestrator
|
||||
from pyOpenRPA import Orchestrator # Import orchestrator main
|
||||
gSettings = SettingsTemplate.Create(inModeStr="BASIC") # Create GSettings with basic configuration - no more config is available from the box - you can create own
|
||||
# Call the orchestrator main def
|
||||
Orchestrator.Orchestrator(inGSettings=gSettings)
|
||||
|
||||
|
||||
If you need more configurations - so you can see here:
|
||||
|
||||
.. include:: ../../../Orchestrator/OrchestratorSettings.py
|
||||
:literal:
|
@ -1,58 +0,0 @@
|
||||
####################################
|
||||
5. UAC - User Access Control
|
||||
####################################
|
||||
|
||||
*****************
|
||||
About
|
||||
*****************
|
||||
Orchestrator has mega feature - user access control (UAC). This feature allow you to manipulate access of the web UI for the all users!
|
||||
|
||||
If you need to give admin rights - you don't customize UAC dict.
|
||||
|
||||
If you need to give some little rights for user only for one robot in orchestrator web panel - you can set the following properties in UAC dict.
|
||||
|
||||
To work with UAC you can use defs ``Orchestrator.UAC`` group.
|
||||
|
||||
!!!ATTENTION!!!
|
||||
|
||||
Need practice example to work with UAC! - too hard to understand
|
||||
|
||||
***************************************************
|
||||
UAC Dict for Orchestrator WEB UI rights
|
||||
***************************************************
|
||||
|
||||
UAC Dict for pyOpenRPA Orchestrator WEB UI rights.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
"pyOpenRPADict":{
|
||||
"CPKeyDict":{ # Empty dict - all access
|
||||
# "CPKeyStr"{
|
||||
# }
|
||||
},
|
||||
"RDPKeyDict":{ # Empty dict - all access
|
||||
#"RDPKeyStr"{
|
||||
# "FullscreenBool": True,
|
||||
# "IgnoreBool":True,
|
||||
# "ReconnectBool": True
|
||||
# "NothingBool": True # USe option if you dont want to give some access to the RDP controls
|
||||
# }
|
||||
},
|
||||
"AgentKeyDict": { # Empty dict - all access
|
||||
# "AgentKeyStr"{
|
||||
# }
|
||||
},
|
||||
"AdminDict":{ # Empty dict - all access
|
||||
"LogViewerBool":True, # Show log viewer on the web page
|
||||
"CMDInputBool":True, # Execute CMD on the server side and result to the logs
|
||||
"ScreenshotViewerBool":True, # Show button to look screenshots
|
||||
"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
|
||||
},
|
||||
"ActivityDict": { # Empty dict - all access
|
||||
"ActivityListExecuteBool": True, # Execute activity at the current thread
|
||||
"ActivityListAppendProcessorQueueBool": True # Append activity to the processor queue
|
||||
}
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
####################################
|
||||
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:
|
@ -1,22 +0,0 @@
|
||||
************************
|
||||
1. Description
|
||||
************************
|
||||
|
||||
pyOpenRPA Robot is the python package which allow you to create best RPA program.
|
||||
|
||||
The description of the functions you can find page 'Defs' (see menu)
|
||||
|
||||
Here is the example of the pyOpenRPA usage.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# EXAMPLE 1
|
||||
from pyOpenRPA.Robot import UIDesktop
|
||||
|
||||
lNotepadOKButton = UIDesktop.UIOSelector_Get_UIO(
|
||||
inSpecificationList=[
|
||||
{"title":"notepad.exe"},{"title":"OK"}],
|
||||
inElement=None,
|
||||
inFlagRaiseException=True)
|
||||
|
||||
lNotepadOKButton.click()
|
@ -1,36 +0,0 @@
|
||||
####################################
|
||||
2. Defs
|
||||
####################################
|
||||
|
||||
Here you can find the functions description for interaction with desktop GUI applications
|
||||
|
||||
How to use both x32 and x64 python processes (it can be helpfully, if another app GUI is on another bitness than your app)
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from pyOpenRPA.Robot import UIDesktop
|
||||
#Section for robot init
|
||||
lPyOpenRPA_SettingsDict = {
|
||||
"Python32FullPath": "..\\Resources\\WPy32-3720\\python-3.7.2\\python.exe", #Set from user: "..\\Resources\\WPy32-3720\\python-3.7.2\\OpenRPARobotGUIx32.exe"
|
||||
"Python64FullPath": "..\\Resources\\WPy64-3720\\python-3.7.2.amd64\\python.exe", #Set from user
|
||||
"Python32ProcessName": "pyOpenRPA_UIDesktopX32.exe", #Config set once
|
||||
"Python64ProcessName": "pyOpenRPA_UIDesktopX64.exe" #Config set once
|
||||
}
|
||||
# Init the pyOpenRPA configuration
|
||||
UIDesktop.Utils.ProcessBitness.SettingsInit(lPyOpenRPA_SettingsDict)
|
||||
# Now you can use pyOpenRPA with both bitness.
|
||||
|
||||
|
||||
.. automodule:: pyOpenRPA.Robot.UIDesktop
|
||||
:members:
|
||||
:autosummary:
|
||||
|
||||
|
||||
**********
|
||||
References
|
||||
**********
|
||||
|
||||
`reStructuredText`_
|
||||
|
||||
.. target-notes::
|
||||
.. _`reStructuredText`: http://docutils.sourceforge.net/rst.html
|
@ -1,226 +0,0 @@
|
||||
####################################
|
||||
3. How to use
|
||||
####################################
|
||||
|
||||
The Robot tool is the main module for production process automation. It has no graphic/console interface. All low-level actions to OS are perfoming by the Robot tool in pyOpenRPA.
|
||||
|
||||
**************************************************
|
||||
How to execute RPA script
|
||||
**************************************************
|
||||
You can use the robot by the several ways:
|
||||
|
||||
- In Python script
|
||||
- In Studio script (n/a)
|
||||
|
||||
|
||||
Create python script
|
||||
############################################
|
||||
In order to use robot just add Robot tool folder in work directory and add line "import GUI" in your script.
|
||||
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import sys
|
||||
sys.path.append('../../')
|
||||
import selenium # [Web app access](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.1.-Theory-&-practice:-Web-app-access-(Chrome,-Firefox,-Opera))<br>
|
||||
import GUI # [Win32 & UI Automation access](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.2.-Theory-&-practice:-Desktop-app-UI-access-(win32-and-UI-automation-dlls)) <br>
|
||||
import pyautogui #[Screen capture/recognition](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.4.-Theory-&-practice:-Screen-capture-&-image-recognition) [#Mouse manipulation](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.3.-Theory-&-practice:-Keyboard-&-mouse-manipulation)<br>
|
||||
import cv2 # [Computer vision](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.4.-Theory-&-practice:-Screen-capture-&-image-recognition)<br>
|
||||
import keyboard #[Keyboard manipulation](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.3.-Theory-&-practice:-Keyboard-&-mouse-manipulation)<br>
|
||||
|
||||
Execute python script
|
||||
############################################
|
||||
|
||||
The pyOpenRPA is fully portable solution. It contains own python enviroment both 32 and 64 bit versions. So, you can execute your python script in several ways:
|
||||
- Execute in python x32 (\OpenRPA\Resources\WPy32-3720\python-3.7.2)
|
||||
- Execute in python x64 (\OpenRPA\Resources\WPy64-3720\python-3.7.2.amd64)
|
||||
- Execute from .cmd file
|
||||
|
||||
Execute in the Python x32
|
||||
############################################
|
||||
|
||||
To execute your python script in x32 bit version just write in command line from x32 python directory:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
cd "\OpenRPA\Resources\WPy32-3720\python-3.7.2"
|
||||
python.exe "path to your python script.py"
|
||||
|
||||
Execute in the Python x64
|
||||
############################################
|
||||
|
||||
To execute your python script in x32 bit version just write in command line from x32 python directory:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
cd "\OpenRPA\Resources\WPy64-3720\python-3.7.2.amd64"
|
||||
python.exe "path to your python script.py"
|
||||
|
||||
Execute from .cmd file
|
||||
############################################
|
||||
|
||||
In order to simplify the execution process you can write several code lines in file with the .cmd extension:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
cd %~dp0
|
||||
copy /Y ..\Resources\WPy32-3720\python-3.7.2\python.exe ..\Resources\WPy32-3720\python-3.7.2\OpenRPAOrchestrator.exe
|
||||
.\..\Resources\WPy32-3720\python-3.7.2\OpenRPAOrchestrator.exe orchestratorMain.py
|
||||
pause >nul
|
||||
|
||||
|
||||
Use in studio script (n/a)
|
||||
############################################
|
||||
.. code-block:: python
|
||||
|
||||
import sys
|
||||
sys.path.append('../../')
|
||||
import GUI
|
||||
import keyboard
|
||||
import subprocess
|
||||
import time
|
||||
|
||||
#Highlight the UI Object in Folder explorer
|
||||
GUI.UIOSelector_FocusHighlight([{"class_name":"CabinetWClass","backend":"uia"},{"ctrl_index":2},{"ctrl_index":0},{"ctrl_index":2},{"ctrl_index":0}])
|
||||
|
||||
#Wait 2 seconds
|
||||
time.sleep(3)
|
||||
|
||||
#Loop: get child element of UI List
|
||||
for lItem in GUI.UIOSelector_Get_UIO([{"class_name":"CabinetWClass","backend":"uia"},{"ctrl_index":2},{"ctrl_index":0},{"ctrl_index":2},{"ctrl_index":0}]).children():
|
||||
print(str(lItem))
|
||||
|
||||
|
||||
|
||||
Here you can find the docs and examples of the OpenRPA desktop (GUI) app access.
|
||||
|
||||
****************************************************************************************************
|
||||
Desktop app UI access (win32 and UI automation dlls)
|
||||
****************************************************************************************************
|
||||
|
||||
Definitions
|
||||
############################################
|
||||
|
||||
- **UIO** - UI Object (class of pywinauto UI object) [pywinauto.base_wrapper]
|
||||
- **UIOSelector** - List of dict (key attributes)
|
||||
- **PWA** - PyWinAuto
|
||||
- **PWASpecification** - List of dict (key attributes in pywinauto.find_window notation)
|
||||
- **UIOTree** - Recursive Dict of Dict ... (UI Parent -> Child hierarchy)
|
||||
- **UIOInfo** - Dict of UIO attributes
|
||||
- **UIOActivity** - Activity of the UIO (UI object) from the Pywinauto module
|
||||
- **UIOEI** - UI Object info object
|
||||
|
||||
|
||||
What is UIO?
|
||||
############################################
|
||||
UIO is a User Interface Object (pyOpenRPA terminology). For maximum compatibility, this instance is inherited from the object model developed in the [pywinauto library (click to get a list of available class functions)](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.base_wrapper.html).
|
||||
|
||||
This approach allows us to implement useful functionality that has already been successfully developed in other libraries, and Supplement it with the missing functionality. In our case, the missing functionality is the ability to dynamically access UIO objects using UIO selectors.
|
||||
|
||||
|
||||
UIOSelector structure & example
|
||||
############################################
|
||||
UIOSelector is the list of condition items for the UIO in GUI. Each item has condition attributes for detect applicable UIO. Here is the description of the available condition attributes in item.
|
||||
|
||||
**Desciption**
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
[
|
||||
{
|
||||
"depth_start" :: [int, start from 1] :: the depth index, where to start check the condition list (default 1),
|
||||
"depth_end" :: [int, start from 1] :: the depth index, where to stop check the condition list (default 1),
|
||||
"ctrl_index" || "index" :: [int, starts from 0] :: the index of the UIO in parent UIO child list,
|
||||
"title" :: [str] :: the condition for the UIO attribute *title*,
|
||||
"title_re" :: [str] :: regular expression (python ver) for the condition for the UIO attribute *title*,
|
||||
"rich_text" :: [str] :: the condition for the UIO attribute *rich_text*,
|
||||
"rich_text_re" :: [str] :: regular expression (python ver) for the condition for the UIO attribute *rich_text*,
|
||||
"class_name" :: [str] :: the condition for the UIO attribute *class_name*,
|
||||
"class_name_re" :: [str] :: regular expression (python ver) for the condition for the UIO attribute *class_name*,
|
||||
"friendly_class_name" :: [str] :: the condition for the UIO attribute *friendly_class_name*,
|
||||
"friendly_class_name_re" :: [str] :: regular expression (python ver) for the condition for the UIO attribute *friendly_class_name*,
|
||||
"control_type" :: [str] :: the condition for the UIO attribute *control_type*,
|
||||
"control_type_re" :: [str] :: regular expression (python ver) for the condition for the UIO attribute *control_type*,
|
||||
"is_enabled" :: [bool] :: the condition for the UIO attribute *is_enabled*. If UI object is enabled on GUI,
|
||||
"is_visible" :: [bool] :: the condition for the UIO attribute *is_visible*. If UI object is visible on GUI,
|
||||
"backend" :: [str, "win32" || "uia"] :: the method of UIO extraction (default "win32"). ATTENTION! Current option can be only for the first item of the UIO selector. For the next items this option will be implemented from the first item.
|
||||
},
|
||||
{ ... specification next level UIO }
|
||||
]
|
||||
**The UIO selector example**
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
[
|
||||
{"class_name":"CalcFrame", "backend":"win32"}, # 1-st level UIO specification
|
||||
{"title":"Hex", "depth_start":3, "depth_end": 3} # 3-rd level specification (because of attribute depth_start|depth_stop)
|
||||
]
|
||||
|
||||
The UIDesktop module (OpenRPA/Robot/UIDesktop.py)
|
||||
########################################################################################
|
||||
The UIDesktop is extension of the pywinauto module which provide access to the desktop apps by the **win32** and **ui automation** dll frameworks (big thx to the Microsoft :) ).
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# EXAMPLE 1
|
||||
from pyOpenRPA.Robot import UIDesktop
|
||||
|
||||
UIDesktop.UIOSelector_Get_UIO(
|
||||
inSpecificationList=[
|
||||
{"title":"notepad.exe"},{"title":"OK"}],
|
||||
inElement=None,
|
||||
inFlagRaiseException=True)
|
||||
|
||||
|
||||
The UIDesktop module (OpenRPA/Robot/UIDesktop.py)
|
||||
########################################################################################
|
||||
The UIDesktop is extension of the pywinauto module which provide access to the desktop apps by the **win32** and **ui automation** dll frameworks (big thx to the Microsoft :) ).
|
||||
|
||||
*Naming convention: \<InArgument\>\_\<ActivityName\>\_\<OutArgument - if exist>*<br>
|
||||
|
||||
|
||||
****************************************************************************************************
|
||||
Theory & practice. WEB app UI access (selenium)
|
||||
****************************************************************************************************
|
||||
|
||||
About
|
||||
###############################################
|
||||
The pyOpenRPA support web app manipulation (by the Selenium lib).
|
||||
More docs about selenium you can find here (https://selenium-python.readthedocs.io/)
|
||||
|
||||
How to use
|
||||
###############################################
|
||||
To start use selenium just import selenium modules in the robot tool. Here is the example of the usage.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from selenium import webdriver
|
||||
from selenium.webdriver.common.keys import Keys
|
||||
|
||||
driver = webdriver.Chrome()
|
||||
driver.get("http://www.python.org")
|
||||
assert "Python" in driver.title
|
||||
elem = driver.find_element_by_name("q")
|
||||
elem.clear()
|
||||
elem.send_keys("pycon")
|
||||
elem.send_keys(Keys.RETURN)
|
||||
assert "No results found." not in driver.page_source
|
||||
driver.close()
|
||||
|
||||
****************************************************************************************************
|
||||
Theory & practice. Keyboard & mouse manipulation
|
||||
****************************************************************************************************
|
||||
|
||||
|
||||
****************************************************************************************************
|
||||
Theory & practice. Screen capture & image recognition
|
||||
****************************************************************************************************
|
||||
|
||||
How to automate image recognition on PC
|
||||
###########################################
|
||||
|
||||
Here you can find any ways you need to use in your business case:
|
||||
- Find the exact match on the screen with the other image
|
||||
- Use text recognition module (OCR)
|
||||
- Use computer vision (CV) to identify the objects on screen/image/video
|
||||
- Use artificial intelligence (AI) to make custom identification/classification/text recognition
|
@ -1,10 +0,0 @@
|
||||
####################################
|
||||
4. Dependencies
|
||||
####################################
|
||||
|
||||
Python 3 x32 [psutil, pywinauto, wmi, PIL, keyboard, pyautogui, win32api (pywin32), selenium, openCV, tesseract, requests, lxml, PyMuPDF]
|
||||
Python 3 x64 [psutil, pywinauto, wmi, PIL, keyboard, pyautogui, win32api (pywin32), selenium, openCV, tesseract, requests, lxml, PyMuPDF]
|
||||
pywinauto (Windows GUI automation)
|
||||
Semantic UI CSS framework
|
||||
JsRender by https://www.jsviews.com (switch to Handlebars)
|
||||
Handlebars
|
@ -1,5 +0,0 @@
|
||||
************************
|
||||
1. Description
|
||||
************************
|
||||
|
||||
pyOpenRPA Studio is the executable process.
|
@ -1,126 +0,0 @@
|
||||
####################################
|
||||
2. How to use
|
||||
####################################
|
||||
|
||||
Content
|
||||
=======
|
||||
|
||||
- `How to run <#how-to-run>`__
|
||||
- `UI Description <#ui-description>`__
|
||||
- `How to extract UI tree <#how-to-extract-ui-tree>`__
|
||||
- `How to search UI object by mouse
|
||||
hover <#how-to-search-ui-object-by-mouse-hover>`__
|
||||
- `How to extract UI object
|
||||
properties <#how-to-extract-ui-object-properties>`__
|
||||
|
||||
How to run
|
||||
==========
|
||||
|
||||
- For OS x32
|
||||
- Run (double click): OpenRPA\_32.cmd (for OS x32)
|
||||
- For OS x64
|
||||
- Run (double click): OpenRPA\_64.cmd (for OS x64)
|
||||
- Wait text "running server" in console. Default browser will be open
|
||||
automatically
|
||||
- **Attention!** The studio tool does not support the Internet explorer
|
||||
(any version) for GUI rendering (lol)
|
||||
|
||||
.. image:: /img/504b98f76747f63900a2943532a946bb.png
|
||||
:alt: 504b98f76747f63900a2943532a946bb.png
|
||||
|
||||
|
||||
UI Description
|
||||
==============
|
||||
|
||||
**The studio tool GUI contains of:**
|
||||
|
||||
1. UI tree viewer
|
||||
2. Selected UI object hierarchy list
|
||||
3. Selected UI object property list
|
||||
4. UIO selector editor
|
||||
5. UIO action panel
|
||||
6. Another Python activity panel
|
||||
7. Action/activity list
|
||||
|
||||
*Look it on the GUI screenshots are listed below*
|
||||
|
||||
GUI Screenshot 1
|
||||
----------------
|
||||
|
||||
.. image:: /img/d3d6ad14a7e50843bd89d2b14a092fee.png
|
||||
:alt: 504b98f76747f63900a2943532a946bb.png
|
||||
|
||||
|
||||
GUI Screenshot 2
|
||||
----------------
|
||||
|
||||
.. image:: /img/65b7d51c0a5b21e6b27dc23d4062d3ca.png
|
||||
:alt: 65b7d51c0a5b21e6b27dc23d4062d3ca.png
|
||||
|
||||
|
||||
How to extract UI tree
|
||||
======================
|
||||
|
||||
In order to extract the UI tree do the following: in ``UI tree viewer``
|
||||
choose the object you are interested and click the button "Expand". ##
|
||||
|
||||
Action: Click the button "Expand"
|
||||
---------------------------------------
|
||||
|
||||
.. image:: /img/6effc376ff6ea928840674bd744caced.png
|
||||
:alt: 6effc376ff6ea928840674bd744caced.png
|
||||
|
||||
Result
|
||||
---------------------------------------
|
||||
|
||||
.. image:: /img/18b9ab36126c8c32168bf5bbb9330701.png
|
||||
:alt: 18b9ab36126c8c32168bf5bbb9330701.png
|
||||
|
||||
How to search UI object by mouse hover
|
||||
---------------------------------------
|
||||
In order to search UI object do the
|
||||
following: in ``UI tree viewer`` choose the parent object, where you are
|
||||
want to search UI object, and click the button "Mouse search". The mouse
|
||||
search mode will start. Turn mouse on the UI object you are interested
|
||||
and wait when the studio will highlight the UI object. After the
|
||||
hightlight hold the "Ctrl" key and wait 3 seconds. The interested UI
|
||||
object will be shown in ``UI tree viewer``.
|
||||
|
||||
Action: Click the button "Mouse search"
|
||||
---------------------------------------
|
||||
|
||||
.. image:: /img/84d7e4de0c840631f87cf7b325b53ad8.png
|
||||
:alt: 84d7e4de0c840631f87cf7b325b53ad8.png
|
||||
|
||||
Action: Turn mouse on the UI object you are interested and hold the "Ctrl" key for 3 seconds
|
||||
--------------------------------------------------------------------------------------------
|
||||
|
||||
.. image:: /img/b7c38d622bf5b7afa5b26d1686d7302a.png
|
||||
:alt: b7c38d622bf5b7afa5b26d1686d7302a.png
|
||||
|
||||
Result: The interested UI object will be shown in ``UI tree viewer``
|
||||
--------------------------------------------------------------------
|
||||
|
||||
.. image:: /img/629bbf4db2c01b9c640194230949fcd2.png
|
||||
:alt: 629bbf4db2c01b9c640194230949fcd2.png
|
||||
|
||||
How to extract UI object properties
|
||||
===================================
|
||||
|
||||
In order to extract UI object properties do the following: in
|
||||
``Selected UI object hierarchy list`` choose the UI object you are
|
||||
interested and click it. The UI object property list will be shown in
|
||||
``Selected UI object property list``
|
||||
|
||||
Action: Choose the UI object you are interested and click it
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
.. image:: /img/2c27be5bdde20b5d062cbb40e74eaec5.png
|
||||
:alt: 2c27be5bdde20b5d062cbb40e74eaec5.png
|
||||
|
||||
Result: The UI object property list will be shown in ``Selected UI object property list``
|
||||
-----------------------------------------------------------------------------------------
|
||||
|
||||
.. image:: /img/f235ae29099a713e0246cd574ac3a17c.png
|
||||
:alt: f235ae29099a713e0246cd574ac3a17c.png
|
||||
|
@ -1,25 +0,0 @@
|
||||
####################################
|
||||
2. Defs StopSafe
|
||||
####################################
|
||||
|
||||
How to use StopSafe on the robot side
|
||||
|
||||
.. code-block:: python
|
||||
from pyOpenRPA.Tools import StopSafe
|
||||
StopSafe.Init(inLogger=None)
|
||||
StopSafe.IsSafeStop() # True - WM_CLOSE SIGNAL has come. taskkill /im someprocess.exe
|
||||
|
||||
|
||||
.. automodule:: pyOpenRPA.Tools.StopSafe
|
||||
:members:
|
||||
:autosummary:
|
||||
|
||||
|
||||
**********
|
||||
References
|
||||
**********
|
||||
|
||||
`reStructuredText`_
|
||||
|
||||
.. target-notes::
|
||||
.. _`reStructuredText`: http://docutils.sourceforge.net/rst.html
|
@ -1,165 +0,0 @@
|
||||
.. pyOpenRPA documentation master file, created by
|
||||
sphinx-quickstart on Sat Dec 19 23:59:00 2020.
|
||||
You can adapt this file completely to your liking, but it should at least
|
||||
contain the root `toctree` directive.
|
||||
|
||||
####################################
|
||||
Welcome to pyOpenRPA's wiki
|
||||
####################################
|
||||
|
||||
.. image:: /img/ModalGuide.png
|
||||
:alt: ModalGuide.png
|
||||
|
||||
*by Ivan Maslov (Russia)* - see :ref:`3.-Copyrights-&-Contacts`.
|
||||
|
||||
! ATTENTION ! pyOpenRPA works only on MS Windows 7+/Server 2008+. Guys from Unix/Mac - sorry. We will come to you soon :)
|
||||
|
||||
|
||||
**************************************************
|
||||
About
|
||||
**************************************************
|
||||
Dear RPA-tors. Let me congratulate you with great change in the RPA world. Since 2019 the first enterprise level open source RPA platform is here!
|
||||
|
||||
pyOpenRPA is absolutely open source commercial project. Hosted by LLC PYOPENRPA (RUSSIA)
|
||||
|
||||
The pyOpenRPA - free, fast and reliable
|
||||
Powerful OpenSource RPA tool for business (based on python 3). Best performance and absolutely free!
|
||||
|
||||
The pyOpenRPA is based on Python and using well known OpenSource solutions such as Selenium, OpenCV, Win32, UI automation and others. Thanks to it we were able to create consolidated platform with all possible features.
|
||||
The pyOpenRPA is distributed under the PYOPENRPA license.
|
||||
At the time of this writing the pyOpenRPA is successfully using in several big Russian companies. Companies in which it was decided to develop own RPA division with no dependencies on expensive licenses.
|
||||
|
||||
**************************************************
|
||||
Repo structure
|
||||
**************************************************
|
||||
|
||||
The description of the each folder in GitLab repo is going below:
|
||||
|
||||
- **Agent**: template build for the pyOpenRPA.Agent component
|
||||
- **Orchestrator**: template build for the pyOpenRPA.Orchestrator component
|
||||
- **Resources**: 3rd party resources which is needed to provide pyOpenRPA encapsulation from the Operating System (OS) dependencies.
|
||||
- **Robot**: template build for the robot
|
||||
- **Sources**: pyOpenRPA python package sources + sphinx sources
|
||||
- **Studio**: build for the pyOpenRPA.Studio which support Desktop UI (support x32 and x64 desktop UI apps)
|
||||
- **Utils**: many additional good tools for the python developer
|
||||
- **Wiki**: compiled wiki documentation
|
||||
|
||||
**************************************************
|
||||
The pyOpenRPA structure
|
||||
**************************************************
|
||||
|
||||
The pyOpenRPA has 4 main tools:
|
||||
############################################
|
||||
- Studio
|
||||
- Robot
|
||||
- Orchestrator
|
||||
- Agent
|
||||
|
||||
Studio
|
||||
######################
|
||||
The pyOpenRPA.Studio tool has been developed to help RPA-tors to create the robot algorythms.
|
||||
|
||||
**Features**
|
||||
|
||||
- Run actions
|
||||
- Create visual algorythms of the robot
|
||||
- Desktop app: Analyze desktop app ui tree
|
||||
- Desktop app: Search desktop app ui by mouse
|
||||
- Desktop app: Generate & edit the UIO Selector
|
||||
|
||||
Robot
|
||||
######################
|
||||
The pyOpenRPA.Robot package is the core of any action execution in the pyOpenRPA. All action from algorythms are perfoming by the Robot tool. It looks like a console process without graphic user interface.
|
||||
|
||||
**Features**
|
||||
|
||||
- Based on Python (killer feature)
|
||||
- Support Win32 GUI framework (desktop app)
|
||||
- Support UI automation framework (desktop app)
|
||||
- Support Selenium (web app)
|
||||
- Support PyAutoGUI (screen capture & mouse)
|
||||
- Support OpenCV (computer vision)
|
||||
|
||||
Orchestrator
|
||||
######################
|
||||
|
||||
The pyOpenRPA.Orchestrator package has been developed to maintain robot infrastructure (2+ robots algorythm).
|
||||
|
||||
**Features**
|
||||
|
||||
- Start/Stop robot algorithm
|
||||
- Robot scheduler
|
||||
- Remote machine screenshot viewer
|
||||
- Remote machine cmd shell
|
||||
- Remote machine logs storage
|
||||
|
||||
Agent
|
||||
######################
|
||||
|
||||
The pyOpenRPA.Agent tool has been developed to maintain robot infrastructure (2+ robots algorythm).
|
||||
|
||||
**Features**
|
||||
|
||||
- Send CMD to the RPA GUI session (start/safe stop/force stop/logout)
|
||||
- Get screenshots from the RPA GUI session
|
||||
- Get the list of the running processes
|
||||
|
||||
**************************************************
|
||||
Wiki structure
|
||||
**************************************************
|
||||
In wiki you can use the following docs:
|
||||
|
||||
- ENG Guide HTML `[|OPEN GITLAB|] <https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/ENG_Guide/html/index.html>`_
|
||||
- ENG Guide MarkDown `[|OPEN GITLAB|] <https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/ENG_Guide/markdown/index.md>`_
|
||||
- ENG Guide PDF `[|OPEN GITLAB|] <https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/ENG_Guide/pdf/pyOpenRPA_Guide_ENG.pdf>`_
|
||||
|
||||
- RUS Article: Less cost - no paid RPA `[|OPEN HABR|] <https://habr.com/ru/post/506766/>`_
|
||||
- RUS Tutorial Desktop UI `[|OPEN HABR|] <https://habr.com/ru/post/509644/>`_; `[|OPEN GITLAB|] <https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/RUS_Tutorial/DesktopGUI_Habr/index.md>`_
|
||||
- RUS Tutorial Web UI `[|OPEN HABR|] <https://habr.com/ru/post/515310/>`_; `[|OPEN GITLAB|] <https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/RUS_Tutorial/WebGUI_Habr/readme.md>`_
|
||||
- RUS Leaflet pyOpenRPA v4.pdf `[|OPEN GITLAB|] <https://gitlab.com/UnicodeLabs/OpenRPA/-/tree/master/Wiki/RUS_Leaflet/RUS%20Leaflet%20pyOpenRPA%20v4.pdf>`_
|
||||
|
||||
**************************************************
|
||||
Guide content
|
||||
**************************************************
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: GENERAL
|
||||
:glob:
|
||||
|
||||
*
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: ROBOT
|
||||
:glob:
|
||||
|
||||
Robot/*
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: STUDIO
|
||||
:glob:
|
||||
|
||||
Studio/*
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 3
|
||||
:caption: ORCHESTRATOR
|
||||
:glob:
|
||||
|
||||
Orchestrator/*
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 3
|
||||
:caption: AGENT
|
||||
:glob:
|
||||
|
||||
Agent/*
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: TOOLS
|
||||
:glob:
|
||||
|
||||
Tools/*
|
@ -1,856 +0,0 @@
|
||||
/*
|
||||
* basic.css
|
||||
* ~~~~~~~~~
|
||||
*
|
||||
* Sphinx stylesheet -- basic theme.
|
||||
*
|
||||
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
|
||||
/* -- main layout ----------------------------------------------------------- */
|
||||
|
||||
div.clearer {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
div.section::after {
|
||||
display: block;
|
||||
content: '';
|
||||
clear: left;
|
||||
}
|
||||
|
||||
/* -- relbar ---------------------------------------------------------------- */
|
||||
|
||||
div.related {
|
||||
width: 100%;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
div.related h3 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
div.related ul {
|
||||
margin: 0;
|
||||
padding: 0 0 0 10px;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
div.related li {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
div.related li.right {
|
||||
float: right;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
/* -- sidebar --------------------------------------------------------------- */
|
||||
|
||||
div.sphinxsidebarwrapper {
|
||||
padding: 10px 5px 0 10px;
|
||||
}
|
||||
|
||||
div.sphinxsidebar {
|
||||
float: left;
|
||||
width: 230px;
|
||||
margin-left: -100%;
|
||||
font-size: 90%;
|
||||
word-wrap: break-word;
|
||||
overflow-wrap : break-word;
|
||||
}
|
||||
|
||||
div.sphinxsidebar ul {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
div.sphinxsidebar ul ul,
|
||||
div.sphinxsidebar ul.want-points {
|
||||
margin-left: 20px;
|
||||
list-style: square;
|
||||
}
|
||||
|
||||
div.sphinxsidebar ul ul {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
div.sphinxsidebar form {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
div.sphinxsidebar input {
|
||||
border: 1px solid #98dbcc;
|
||||
font-family: sans-serif;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
div.sphinxsidebar #searchbox form.search {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div.sphinxsidebar #searchbox input[type="text"] {
|
||||
float: left;
|
||||
width: 80%;
|
||||
padding: 0.25em;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
div.sphinxsidebar #searchbox input[type="submit"] {
|
||||
float: left;
|
||||
width: 20%;
|
||||
border-left: none;
|
||||
padding: 0.25em;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* -- search page ----------------------------------------------------------- */
|
||||
|
||||
ul.search {
|
||||
margin: 10px 0 0 20px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ul.search li {
|
||||
padding: 5px 0 5px 20px;
|
||||
background-image: url(file.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 0 7px;
|
||||
}
|
||||
|
||||
ul.search li a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
ul.search li div.context {
|
||||
color: #888;
|
||||
margin: 2px 0 0 30px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
ul.keywordmatches li.goodmatch a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* -- index page ------------------------------------------------------------ */
|
||||
|
||||
table.contentstable {
|
||||
width: 90%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
table.contentstable p.biglink {
|
||||
line-height: 150%;
|
||||
}
|
||||
|
||||
a.biglink {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
span.linkdescr {
|
||||
font-style: italic;
|
||||
padding-top: 5px;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
/* -- general index --------------------------------------------------------- */
|
||||
|
||||
table.indextable {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table.indextable td {
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
table.indextable ul {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
table.indextable > tbody > tr > td > ul {
|
||||
padding-left: 0em;
|
||||
}
|
||||
|
||||
table.indextable tr.pcap {
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
table.indextable tr.cap {
|
||||
margin-top: 10px;
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
img.toggler {
|
||||
margin-right: 3px;
|
||||
margin-top: 3px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div.modindex-jumpbox {
|
||||
border-top: 1px solid #ddd;
|
||||
border-bottom: 1px solid #ddd;
|
||||
margin: 1em 0 1em 0;
|
||||
padding: 0.4em;
|
||||
}
|
||||
|
||||
div.genindex-jumpbox {
|
||||
border-top: 1px solid #ddd;
|
||||
border-bottom: 1px solid #ddd;
|
||||
margin: 1em 0 1em 0;
|
||||
padding: 0.4em;
|
||||
}
|
||||
|
||||
/* -- domain module index --------------------------------------------------- */
|
||||
|
||||
table.modindextable td {
|
||||
padding: 2px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
/* -- general body styles --------------------------------------------------- */
|
||||
|
||||
div.body {
|
||||
min-width: 450px;
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
div.body p, div.body dd, div.body li, div.body blockquote {
|
||||
-moz-hyphens: auto;
|
||||
-ms-hyphens: auto;
|
||||
-webkit-hyphens: auto;
|
||||
hyphens: auto;
|
||||
}
|
||||
|
||||
a.headerlink {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
a.brackets:before,
|
||||
span.brackets > a:before{
|
||||
content: "[";
|
||||
}
|
||||
|
||||
a.brackets:after,
|
||||
span.brackets > a:after {
|
||||
content: "]";
|
||||
}
|
||||
|
||||
h1:hover > a.headerlink,
|
||||
h2:hover > a.headerlink,
|
||||
h3:hover > a.headerlink,
|
||||
h4:hover > a.headerlink,
|
||||
h5:hover > a.headerlink,
|
||||
h6:hover > a.headerlink,
|
||||
dt:hover > a.headerlink,
|
||||
caption:hover > a.headerlink,
|
||||
p.caption:hover > a.headerlink,
|
||||
div.code-block-caption:hover > a.headerlink {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
div.body p.caption {
|
||||
text-align: inherit;
|
||||
}
|
||||
|
||||
div.body td {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.first {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
p.rubric {
|
||||
margin-top: 30px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
img.align-left, .figure.align-left, object.align-left {
|
||||
clear: left;
|
||||
float: left;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
img.align-right, .figure.align-right, object.align-right {
|
||||
clear: right;
|
||||
float: right;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
img.align-center, .figure.align-center, object.align-center {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
img.align-default, .figure.align-default {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.align-left {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.align-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.align-default {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.align-right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* -- sidebars -------------------------------------------------------------- */
|
||||
|
||||
div.sidebar {
|
||||
margin: 0 0 0.5em 1em;
|
||||
border: 1px solid #ddb;
|
||||
padding: 7px;
|
||||
background-color: #ffe;
|
||||
width: 40%;
|
||||
float: right;
|
||||
clear: right;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
p.sidebar-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.admonition, div.topic, blockquote {
|
||||
clear: left;
|
||||
}
|
||||
|
||||
/* -- topics ---------------------------------------------------------------- */
|
||||
|
||||
div.topic {
|
||||
border: 1px solid #ccc;
|
||||
padding: 7px;
|
||||
margin: 10px 0 10px 0;
|
||||
}
|
||||
|
||||
p.topic-title {
|
||||
font-size: 1.1em;
|
||||
font-weight: bold;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
/* -- admonitions ----------------------------------------------------------- */
|
||||
|
||||
div.admonition {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
padding: 7px;
|
||||
}
|
||||
|
||||
div.admonition dt {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
p.admonition-title {
|
||||
margin: 0px 10px 5px 0px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.body p.centered {
|
||||
text-align: center;
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
/* -- content of sidebars/topics/admonitions -------------------------------- */
|
||||
|
||||
div.sidebar > :last-child,
|
||||
div.topic > :last-child,
|
||||
div.admonition > :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
div.sidebar::after,
|
||||
div.topic::after,
|
||||
div.admonition::after,
|
||||
blockquote::after {
|
||||
display: block;
|
||||
content: '';
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* -- tables ---------------------------------------------------------------- */
|
||||
|
||||
table.docutils {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
border: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
table.align-center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
table.align-default {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
table caption span.caption-number {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
table caption span.caption-text {
|
||||
}
|
||||
|
||||
table.docutils td, table.docutils th {
|
||||
padding: 1px 8px 1px 5px;
|
||||
border-top: 0;
|
||||
border-left: 0;
|
||||
border-right: 0;
|
||||
border-bottom: 1px solid #aaa;
|
||||
}
|
||||
|
||||
table.footnote td, table.footnote th {
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: left;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
table.citation {
|
||||
border-left: solid 1px gray;
|
||||
margin-left: 1px;
|
||||
}
|
||||
|
||||
table.citation td {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
th > :first-child,
|
||||
td > :first-child {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
th > :last-child,
|
||||
td > :last-child {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
/* -- figures --------------------------------------------------------------- */
|
||||
|
||||
div.figure {
|
||||
margin: 0.5em;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
div.figure p.caption {
|
||||
padding: 0.3em;
|
||||
}
|
||||
|
||||
div.figure p.caption span.caption-number {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
div.figure p.caption span.caption-text {
|
||||
}
|
||||
|
||||
/* -- field list styles ----------------------------------------------------- */
|
||||
|
||||
table.field-list td, table.field-list th {
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
.field-list ul {
|
||||
margin: 0;
|
||||
padding-left: 1em;
|
||||
}
|
||||
|
||||
.field-list p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.field-name {
|
||||
-moz-hyphens: manual;
|
||||
-ms-hyphens: manual;
|
||||
-webkit-hyphens: manual;
|
||||
hyphens: manual;
|
||||
}
|
||||
|
||||
/* -- hlist styles ---------------------------------------------------------- */
|
||||
|
||||
table.hlist {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
table.hlist td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
|
||||
/* -- other body styles ----------------------------------------------------- */
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal;
|
||||
}
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha;
|
||||
}
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha;
|
||||
}
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman;
|
||||
}
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman;
|
||||
}
|
||||
|
||||
:not(li) > ol > li:first-child > :first-child,
|
||||
:not(li) > ul > li:first-child > :first-child {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
:not(li) > ol > li:last-child > :last-child,
|
||||
:not(li) > ul > li:last-child > :last-child {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
ol.simple ol p,
|
||||
ol.simple ul p,
|
||||
ul.simple ol p,
|
||||
ul.simple ul p {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
ol.simple > li:not(:first-child) > p,
|
||||
ul.simple > li:not(:first-child) > p {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
ol.simple p,
|
||||
ul.simple p {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dl.footnote > dt,
|
||||
dl.citation > dt {
|
||||
float: left;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
dl.footnote > dd,
|
||||
dl.citation > dd {
|
||||
margin-bottom: 0em;
|
||||
}
|
||||
|
||||
dl.footnote > dd:after,
|
||||
dl.citation > dd:after {
|
||||
content: "";
|
||||
clear: both;
|
||||
}
|
||||
|
||||
dl.field-list {
|
||||
display: grid;
|
||||
grid-template-columns: fit-content(30%) auto;
|
||||
}
|
||||
|
||||
dl.field-list > dt {
|
||||
font-weight: bold;
|
||||
word-break: break-word;
|
||||
padding-left: 0.5em;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
dl.field-list > dt:after {
|
||||
content: ":";
|
||||
}
|
||||
|
||||
dl.field-list > dd {
|
||||
padding-left: 0.5em;
|
||||
margin-top: 0em;
|
||||
margin-left: 0em;
|
||||
margin-bottom: 0em;
|
||||
}
|
||||
|
||||
dl {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
dd > :first-child {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
dd ul, dd table {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin-top: 3px;
|
||||
margin-bottom: 10px;
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
dl > dd:last-child,
|
||||
dl > dd:last-child > :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dt:target, span.highlighted {
|
||||
background-color: #fbe54e;
|
||||
}
|
||||
|
||||
rect.highlighted {
|
||||
fill: #fbe54e;
|
||||
}
|
||||
|
||||
dl.glossary dt {
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.optional {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
.sig-paren {
|
||||
font-size: larger;
|
||||
}
|
||||
|
||||
.versionmodified {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.system-message {
|
||||
background-color: #fda;
|
||||
padding: 5px;
|
||||
border: 3px solid red;
|
||||
}
|
||||
|
||||
.footnote:target {
|
||||
background-color: #ffa;
|
||||
}
|
||||
|
||||
.line-block {
|
||||
display: block;
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.line-block .line-block {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
margin-left: 1.5em;
|
||||
}
|
||||
|
||||
.guilabel, .menuselection {
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
.accelerator {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.classifier {
|
||||
font-style: oblique;
|
||||
}
|
||||
|
||||
.classifier:before {
|
||||
font-style: normal;
|
||||
margin: 0.5em;
|
||||
content: ":";
|
||||
}
|
||||
|
||||
abbr, acronym {
|
||||
border-bottom: dotted 1px;
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
/* -- code displays --------------------------------------------------------- */
|
||||
|
||||
pre {
|
||||
overflow: auto;
|
||||
overflow-y: hidden; /* fixes display issues on Chrome browsers */
|
||||
}
|
||||
|
||||
pre, div[class*="highlight-"] {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
span.pre {
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
-webkit-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
div[class*="highlight-"] {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
td.linenos pre {
|
||||
border: 0;
|
||||
background-color: transparent;
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
table.highlighttable {
|
||||
display: block;
|
||||
}
|
||||
|
||||
table.highlighttable tbody {
|
||||
display: block;
|
||||
}
|
||||
|
||||
table.highlighttable tr {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
table.highlighttable td {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
table.highlighttable td.linenos {
|
||||
padding-right: 0.5em;
|
||||
}
|
||||
|
||||
table.highlighttable td.code {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.highlight .hll {
|
||||
display: block;
|
||||
}
|
||||
|
||||
div.highlight pre,
|
||||
table.highlighttable pre {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
div.code-block-caption + div {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
div.code-block-caption {
|
||||
margin-top: 1em;
|
||||
padding: 2px 5px;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
div.code-block-caption code {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
table.highlighttable td.linenos,
|
||||
span.linenos,
|
||||
div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
div.code-block-caption span.caption-number {
|
||||
padding: 0.1em 0.3em;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
div.code-block-caption span.caption-text {
|
||||
}
|
||||
|
||||
div.literal-block-wrapper {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
code.descname {
|
||||
background-color: transparent;
|
||||
font-weight: bold;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
code.descclassname {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
code.xref, a code {
|
||||
background-color: transparent;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.viewcode-link {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.viewcode-back {
|
||||
float: right;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
div.viewcode-block:target {
|
||||
margin: -1px -10px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
/* -- math display ---------------------------------------------------------- */
|
||||
|
||||
img.math {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
div.body div.math p {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
span.eqno {
|
||||
float: right;
|
||||
}
|
||||
|
||||
span.eqno a.headerlink {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
div.math:hover a.headerlink {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
/* -- printout stylesheet --------------------------------------------------- */
|
||||
|
||||
@media print {
|
||||
div.document,
|
||||
div.documentwrapper,
|
||||
div.bodywrapper {
|
||||
margin: 0 !important;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
div.sphinxsidebar,
|
||||
div.related,
|
||||
div.footer,
|
||||
#top-link {
|
||||
display: none;
|
||||
}
|
||||
}
|
@ -1 +0,0 @@
|
||||
.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}
|
Before Width: | Height: | Size: 434 KiB |