Update sphinx doc in Orchestrator the theme

dev-linux
Ivan Maslov 4 years ago
parent faabbbc191
commit 9b5f69289a

@ -27,7 +27,7 @@ pyOpenRPA.Orchestrator.__Orchestrator__
References References
********** **********
`Python-sphinx`_ `reStructuredText`_
.. target-notes:: .. target-notes::
.. _`reStructuredText`: http://docutils.sourceforge.net/rst.html .. _`reStructuredText`: http://docutils.sourceforge.net/rst.html

@ -1,5 +1,5 @@
************************ ************************
Description 1. Description
************************ ************************
pyOpenRPA Robot is the python package. pyOpenRPA Robot is the python package.

@ -31,6 +31,7 @@ if errorlevel 9009 (
%SPHINXBUILD% -M html %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% %SPHINXBUILD% -M html %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
%SPHINXBUILD% -M markdown %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% %SPHINXBUILD% -M markdown %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
..\..\Wiki\ENG_Guide\html\index.html
goto end goto end
:help :help

@ -624,7 +624,7 @@ def ProcessorAliasDefUpdate(inGSettings, inDef, inAliasStr):
def ProcessorActivityItemCreate(inDef, inArgList=None, inArgDict=None, inArgGSettingsStr=None, inArgLoggerStr=None): def ProcessorActivityItemCreate(inDef, inArgList=None, inArgDict=None, inArgGSettingsStr=None, inArgLoggerStr=None):
""" """
Create ActivityItem Create activity item. Activity item can be used as list item in ProcessorActivityItemAppend or in Processor.ActivityListExecute.
.. code-block:: python .. code-block:: python
@ -689,28 +689,68 @@ def ProcessorActivityItemCreate(inDef, inArgList=None, inArgDict=None, inArgGSet
} }
return lActivityItemDict return lActivityItemDict
def ProcessorActivityItemAppend(inGSettings, inDef, inArgList=None, inArgDict=None, inArgGSettingsStr=None, inArgLoggerStr=None): def ProcessorActivityItemAppend(inGSettings, inDef=None, inArgList=None, inArgDict=None, inArgGSettingsStr=None, inArgLoggerStr=None, inActivityItemDict=None):
""" """
Add Activity item in Processor list Create and add activity item in processor queue.
.. code-block:: python
# USAGE
from pyOpenRPA import Orchestrator
# EXAMPLE 1
def TestDef(inArg1Str, inGSettings, inLogger):
pass
lActivityItem = Orchestrator.ProcessorActivityItemAppend(
inGSettings = gSettingsDict,
inDef = TestDef,
inArgList=[],
inArgDict={"inArg1Str": "ArgValueStr"},
inArgGSettingsStr = "inGSettings",
inArgLoggerStr = "inLogger")
# Activity have been already append in the processor queue
# EXAMPLE 2
def TestDef(inArg1Str):
pass
Orchestrator.ProcessorAliasDefUpdate(
inGSettings = gSettings,
inDef = TestDef,
inAliasStr="TestDefAlias")
lActivityItem = Orchestrator.ProcessorActivityItemCreate(
inDef = "TestDefAlias",
inArgList=[],
inArgDict={"inArg1Str": "ArgValueStr"},
inArgGSettingsStr = None,
inArgLoggerStr = None)
Orchestrator.ProcessorActivityItemAppend(
inGSettings = gSettingsDict,
inActivityItemDict = lActivityItem)
# Activity have been already append in the processor queue
:param inGSettings: Global settings dict (singleton) :param inGSettings: Global settings dict (singleton)
:param inDef: :param inDef: def link or def alias (look gSettings["Processor"]["AliasDefDict"])
:param inArgList: :param inArgList: Args list for the Def
:param inArgDict: :param inArgDict: Args dict for the Def
:param inArgGSettingsStr: :param inArgGSettingsStr: Name of def argument of the GSettings dict
:param inArgLoggerStr: :param inArgLoggerStr: Name of def argument of the logging object
""" :param inActivityItemDict: Fill if you already have ActivityItemDict (don't fill inDef, inArgList, inArgDict, inArgGSettingsStr, inArgLoggerStr)
if inArgList is None: inArgList=[] """
if inArgDict is None: inArgDict={} if inActivityItemDict is None:
lActivityList=[ if inArgList is None: inArgList=[]
{ if inArgDict is None: inArgDict={}
"Def":inDef, # def link or def alias (look gSettings["Processor"]["AliasDefDict"]) if inDef is None: raise Exception(f"pyOpenRPA Exception: ProcessorActivityItemAppend need inDef arg if you dont use inActivityItemDict")
"ArgList":inArgList, # Args list lActivityList=[
"ArgDict":inArgDict, # Args dictionary {
"ArgGSettings": inArgGSettingsStr, # Name of GSettings attribute: str (ArgDict) or index (for ArgList) "Def":inDef, # def link or def alias (look gSettings["Processor"]["AliasDefDict"])
"ArgLogger": inArgLoggerStr # Name of GSettings attribute: str (ArgDict) or index (for ArgList) "ArgList":inArgList, # Args list
} "ArgDict":inArgDict, # Args dictionary
] "ArgGSettings": inArgGSettingsStr, # Name of GSettings attribute: str (ArgDict) or index (for ArgList)
"ArgLogger": inArgLoggerStr # Name of GSettings attribute: str (ArgDict) or index (for ArgList)
}
]
else:
lActivityList = [inActivityItemDict]
inGSettings["ProcessorDict"]["ActivityList"]+=lActivityList inGSettings["ProcessorDict"]["ActivityList"]+=lActivityList
## Process defs ## Process defs
@ -718,8 +758,16 @@ def ProcessIsStarted(inProcessNameWOExeStr): # Check if process is started
""" """
Check if there is any running process that contains the given name processName. Check if there is any running process that contains the given name processName.
:param inProcessNameWOExeStr: .. code-block:: python
:return: True - process is running; False - process is not running
# USAGE
from pyOpenRPA import Orchestrator
lProcessIsStartedBool = Orchestrator.ProcessIsStarted(inProcessNameWOExeStr = "notepad")
# lProcessIsStartedBool is True - notepad.exe is running on the Orchestrator machine
:param inProcessNameWOExeStr: Process name WithOut (WO) '.exe' postfix. Example: "notepad" (not "notepad.exe")
:return: True - process is running on the orchestrator machine; False - process is not running on the orchestrator machine
""" """
#Iterate over the all the running process #Iterate over the all the running process
for proc in psutil.process_iter(): for proc in psutil.process_iter():
@ -733,11 +781,23 @@ def ProcessIsStarted(inProcessNameWOExeStr): # Check if process is started
def ProcessStart(inPathStr, inArgList, inStopProcessNameWOExeStr=None): def ProcessStart(inPathStr, inArgList, inStopProcessNameWOExeStr=None):
""" """
Start process locally [optional: if task name is not started] Start process locally. Extra feature: Use inStopProcessNameWOExeStr to stop the execution if current process is running.
:param inPathStr: .. code-block:: python
:param inArgList:
:param inStopProcessNameWOExeStr: # USAGE
from pyOpenRPA import Orchestrator
Orchestrator.ProcessStart(
inPathStr = "notepad"
inArgList = []
inStopProcessNameWOExeStr = "notepad")
# notepad.exe will be started if no notepad.exe is active on the machine
:param inPathStr: Command to send in CMD
:param inArgList: List of the arguments for the CMD command. Example: ["test.txt"]
:param inStopProcessNameWOExeStr: Trigger: stop execution if process is running. Process name WithOut (WO) '.exe' postfix. Example: "notepad" (not "notepad.exe")
:return: None - nothing is returned. If process will not start -exception will be raised
""" """
lStartProcessBool = True lStartProcessBool = True
if inStopProcessNameWOExeStr is not None: #Check if process running if inStopProcessNameWOExeStr is not None: #Check if process running
@ -752,17 +812,29 @@ def ProcessStart(inPathStr, inArgList, inStopProcessNameWOExeStr=None):
if lStartProcessBool == True: # Start if flag is true if lStartProcessBool == True: # Start if flag is true
lItemArgs=[inPathStr] lItemArgs=[inPathStr]
if inArgList is None: inArgList = [] # 2021 02 22 Minor fix default value
lItemArgs.extend(inArgList) lItemArgs.extend(inArgList)
subprocess.Popen(lItemArgs,shell=True) subprocess.Popen(lItemArgs,shell=True)
def ProcessStop(inProcessNameWOExeStr, inCloseForceBool, inUserNameStr = "%username%"): def ProcessStop(inProcessNameWOExeStr, inCloseForceBool, inUserNameStr = "%username%"):
""" """
Stop process Stop process on the orchestrator machine. You can set user session on the machine and set flag about to force close process.
:param inProcessNameWOExeStr: .. code-block:: python
:param inCloseForceBool:
:param inUserNameStr: # USAGE
:return: from pyOpenRPA import Orchestrator
Orchestrator.ProcessStop(
inProcessNameWOExeStr = "notepad"
inCloseForceBool = True
inUserNameStr = "USER_99")
# Will close process "notepad.exe" on the user session "USER_99" (!ATTENTION! if process not exists no exceptions will be raised)
:param inProcessNameWOExeStr: Process name WithOut (WO) '.exe' postfix. Example: "notepad" (not "notepad.exe")
:param inCloseForceBool: True - do force close. False - send signal to safe close (!ATTENTION! - Safe close works only in orchestrator session. Win OS doens't allow to send safe close signal between GUI sessions)
:param inUserNameStr: User name which is has current process to close. Default value is close process on the Orchestrator session
:return: None
""" """
# Support input arg if with .exe # Support input arg if with .exe
lProcessNameWExeStr = inProcessNameWOExeStr lProcessNameWExeStr = inProcessNameWOExeStr
@ -783,15 +855,35 @@ def ProcessStop(inProcessNameWOExeStr, inCloseForceBool, inUserNameStr = "%usern
def ProcessListGet(inProcessNameWOExeList=None): def ProcessListGet(inProcessNameWOExeList=None):
""" """
Check activity of the list of processes Return process list on the orchestrator machine. You can determine the list of the processes you are interested - def will return the list about it.
.. code-block:: python
# USAGE
from pyOpenRPA import Orchestrator
lProcessList = Orchestrator.ProcessListGet()
# Return the list of the process on the machine. !ATTENTION! RUn orchestrator as administrator to get all process list on the machine.
:param inProcessNameWOExeList: :param inProcessNameWOExeList:
:return: TODO FILL THE RESULT DICT :return: {
"ProcessWOExeList": ["notepad","..."],
"ProcessWOExeUpperList": ["NOTEPAD","..."],
"ProcessDetailList": [
{
'pid': 412,
'username': "DESKTOP\\USER",
'name': 'notepad.exe',
'vms': 13.77767775,
'NameWOExeUpperStr': 'NOTEPAD',
'NameWOExeStr': "'notepad'"},
{...}]
""" """
if inProcessNameWOExeList is None: inProcessNameWOExeList = [] if inProcessNameWOExeList is None: inProcessNameWOExeList = []
'''Get list of running process sorted by Memory Usage and filtered by inProcessNameWOExeList''' '''Get list of running process sorted by Memory Usage and filtered by inProcessNameWOExeList'''
lMapUPPERInput = {} # Mapping for processes WO exe lMapUPPERInput = {} # Mapping for processes WO exe
lResult = {"ProcessWOExeList":[],"ProcessDetailList":[]} lResult = {"ProcessWOExeList":[], "ProcessWOExeUpperList":[],"ProcessDetailList":[]}
# Create updated list for quick check # Create updated list for quick check
lProcessNameWOExeList = [] lProcessNameWOExeList = []
for lItem in inProcessNameWOExeList: for lItem in inProcessNameWOExeList:
@ -807,9 +899,13 @@ def ProcessListGet(inProcessNameWOExeList=None):
pinfo['NameWOExeUpperStr'] = pinfo['name'][:-4].upper() pinfo['NameWOExeUpperStr'] = pinfo['name'][:-4].upper()
# Add if empty inProcessNameWOExeList or if process in inProcessNameWOExeList # Add if empty inProcessNameWOExeList or if process in inProcessNameWOExeList
if len(lProcessNameWOExeList)==0 or pinfo['name'].upper() in lProcessNameWOExeList: if len(lProcessNameWOExeList)==0 or pinfo['name'].upper() in lProcessNameWOExeList:
pinfo['NameWOExeStr'] = lMapUPPERInput[pinfo['name'].upper()] try: # 2021 02 22 Minor fix if not admin rights
pinfo['NameWOExeStr'] = lMapUPPERInput[pinfo['name'].upper()]
except Exception as e:
pinfo['NameWOExeStr'] = pinfo['name'][:-4]
lResult["ProcessDetailList"].append(pinfo) # Append dict to list lResult["ProcessDetailList"].append(pinfo) # Append dict to list
lResult["ProcessWOExeList"].append(pinfo['NameWOExeStr']) lResult["ProcessWOExeList"].append(pinfo['NameWOExeStr'])
lResult["ProcessWOExeUpperList"].append(pinfo['NameWOExeUpperStr'])
except (psutil.NoSuchProcess, psutil.AccessDenied, psutil.ZombieProcess): except (psutil.NoSuchProcess, psutil.AccessDenied, psutil.ZombieProcess):
pass pass
return lResult return lResult

@ -86,7 +86,7 @@
<p class="caption"><span class="caption-text">ROBOT</span></p> <p class="caption"><span class="caption-text">ROBOT</span></p>
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="../Robot/01_Robot.html">Description</a></li> <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/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">STUDIO</span></p> <p class="caption"><span class="caption-text">STUDIO</span></p>

@ -86,7 +86,7 @@
<p class="caption"><span class="caption-text">ROBOT</span></p> <p class="caption"><span class="caption-text">ROBOT</span></p>
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="../Robot/01_Robot.html">Description</a></li> <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/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">STUDIO</span></p> <p class="caption"><span class="caption-text">STUDIO</span></p>
@ -236,19 +236,19 @@
<td><p>Check if there is any running process that contains the given name processName.</p></td> <td><p>Check if there is any running process that contains the given name processName.</p></td>
</tr> </tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessListGet" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessListGet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessListGet</span></code></a>([inProcessNameWOExeList])</p></td> <tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessListGet" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessListGet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessListGet</span></code></a>([inProcessNameWOExeList])</p></td>
<td><p>Check activity of the list of processes</p></td> <td><p>Return process list on the orchestrator machine.</p></td>
</tr> </tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStart" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStart"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessStart</span></code></a>(inPathStr, inArgList[, …])</p></td> <tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStart" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStart"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessStart</span></code></a>(inPathStr, inArgList[, …])</p></td>
<td><p>Start process locally [optional: if task name is not started]</p></td> <td><p>Start process locally.</p></td>
</tr> </tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStop" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStop"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessStop</span></code></a>(inProcessNameWOExeStr, …[, …])</p></td> <tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStop" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStop"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessStop</span></code></a>(inProcessNameWOExeStr, …[, …])</p></td>
<td><p>Stop process</p></td> <td><p>Stop process on the orchestrator machine.</p></td>
</tr> </tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemAppend" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemAppend"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessorActivityItemAppend</span></code></a>(inGSettings, inDef)</p></td> <tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemAppend" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemAppend"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessorActivityItemAppend</span></code></a>(inGSettings[, …])</p></td>
<td><p>Add Activity item in Processor list</p></td> <td><p>Create and add activity item in processor queue.</p></td>
</tr> </tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemCreate" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemCreate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessorActivityItemCreate</span></code></a>(inDef[, …])</p></td> <tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemCreate" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemCreate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessorActivityItemCreate</span></code></a>(inDef[, …])</p></td>
<td><p>Create ActivityItem</p></td> <td><p>Create activity item.</p></td>
</tr> </tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorAliasDefCreate" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorAliasDefCreate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessorAliasDefCreate</span></code></a>(inGSettings, inDef)</p></td> <tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorAliasDefCreate" title="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorAliasDefCreate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProcessorAliasDefCreate</span></code></a>(inGSettings, inDef)</p></td>
<td><p>Create alias for def (can be used in ActivityItem in field Def) !WHEN DEF ALIAS IS REQUIRED! - Def alias is required when you try to call Python def from the Orchestrator WEB side (because you cant transmit Python def object out of the Python environment)</p></td> <td><p>Create alias for def (can be used in ActivityItem in field Def) !WHEN DEF ALIAS IS REQUIRED! - Def alias is required when you try to call Python def from the Orchestrator WEB side (because you cant transmit Python def object out of the Python environment)</p></td>
@ -620,12 +620,19 @@ Create Activity Item for the agent</p>
<dt id="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessIsStarted"> <dt id="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessIsStarted">
<code class="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><code class="sig-name descname">ProcessIsStarted</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inProcessNameWOExeStr</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#ProcessIsStarted"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessIsStarted" title="Permalink to this definition"></a></dt> <code class="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><code class="sig-name descname">ProcessIsStarted</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inProcessNameWOExeStr</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#ProcessIsStarted"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessIsStarted" title="Permalink to this definition"></a></dt>
<dd><p>Check if there is any running process that contains the given name processName.</p> <dd><p>Check if there is any running process that contains the given name processName.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># USAGE</span>
<span class="kn">from</span> <span class="nn">pyOpenRPA</span> <span class="kn">import</span> <span class="n">Orchestrator</span>
<span class="n">lProcessIsStartedBool</span> <span class="o">=</span> <span class="n">Orchestrator</span><span class="o">.</span><span class="n">ProcessIsStarted</span><span class="p">(</span><span class="n">inProcessNameWOExeStr</span> <span class="o">=</span> <span class="s2">&quot;notepad&quot;</span><span class="p">)</span>
<span class="c1"># lProcessIsStartedBool is True - notepad.exe is running on the Orchestrator machine</span>
</pre></div>
</div>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>inProcessNameWOExeStr</strong> </p> <dd class="field-odd"><p><strong>inProcessNameWOExeStr</strong> Process name WithOut (WO) .exe postfix. Example: “notepad” (not “notepad.exe”)</p>
</dd> </dd>
<dt class="field-even">Returns</dt> <dt class="field-even">Returns</dt>
<dd class="field-even"><p>True - process is running; False - process is not running</p> <dd class="field-even"><p>True - process is running on the orchestrator machine; False - process is not running on the orchestrator machine</p>
</dd> </dd>
</dl> </dl>
</dd></dl> </dd></dl>
@ -633,63 +640,144 @@ Create Activity Item for the agent</p>
<dl class="py function"> <dl class="py function">
<dt id="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessListGet"> <dt id="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessListGet">
<code class="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><code class="sig-name descname">ProcessListGet</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inProcessNameWOExeList</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#ProcessListGet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessListGet" title="Permalink to this definition"></a></dt> <code class="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><code class="sig-name descname">ProcessListGet</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inProcessNameWOExeList</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#ProcessListGet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessListGet" title="Permalink to this definition"></a></dt>
<dd><p>Check activity of the list of processes</p> <dd><p>Return process list on the orchestrator machine. You can determine the list of the processes you are interested - def will return the list about it.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># USAGE</span>
<span class="kn">from</span> <span class="nn">pyOpenRPA</span> <span class="kn">import</span> <span class="n">Orchestrator</span>
<span class="n">lProcessList</span> <span class="o">=</span> <span class="n">Orchestrator</span><span class="o">.</span><span class="n">ProcessListGet</span><span class="p">()</span>
<span class="c1"># Return the list of the process on the machine. !ATTENTION! RUn orchestrator as administrator to get all process list on the machine.</span>
</pre></div>
</div>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>inProcessNameWOExeList</strong> </p> <dd class="field-odd"><p><strong>inProcessNameWOExeList</strong> </p>
</dd> </dd>
<dt class="field-even">Returns</dt> <dt class="field-even">Returns</dt>
<dd class="field-even"><p>TODO FILL THE RESULT DICT</p> <dd class="field-even"><p><p>{</p>
</p>
</dd>
</dl>
<p>“ProcessWOExeList”: [“notepad”,”…”],
“ProcessWOExeUpperList”: [“NOTEPAD”,”…”],
“ProcessDetailList”: [</p>
<blockquote>
<div><dl class="simple">
<dt>{</dt><dd><p>pid: 412,
username: “DESKTOPUSER”,
name: notepad.exe,
vms: 13.77767775,
NameWOExeUpperStr: NOTEPAD,
NameWOExeStr: “notepad”},</p>
</dd> </dd>
</dl> </dl>
<p>{…}]</p>
</div></blockquote>
</dd></dl> </dd></dl>
<dl class="py function"> <dl class="py function">
<dt id="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStart"> <dt id="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStart">
<code class="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><code class="sig-name descname">ProcessStart</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inPathStr</span></em>, <em class="sig-param"><span class="n">inArgList</span></em>, <em class="sig-param"><span class="n">inStopProcessNameWOExeStr</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#ProcessStart"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStart" title="Permalink to this definition"></a></dt> <code class="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><code class="sig-name descname">ProcessStart</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inPathStr</span></em>, <em class="sig-param"><span class="n">inArgList</span></em>, <em class="sig-param"><span class="n">inStopProcessNameWOExeStr</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#ProcessStart"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStart" title="Permalink to this definition"></a></dt>
<dd><p>Start process locally [optional: if task name is not started]</p> <dd><p>Start process locally. Extra feature: Use inStopProcessNameWOExeStr to stop the execution if current process is running.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># USAGE</span>
<span class="kn">from</span> <span class="nn">pyOpenRPA</span> <span class="kn">import</span> <span class="n">Orchestrator</span>
<span class="n">Orchestrator</span><span class="o">.</span><span class="n">ProcessStart</span><span class="p">(</span>
<span class="n">inPathStr</span> <span class="o">=</span> <span class="s2">&quot;notepad&quot;</span>
<span class="n">inArgList</span> <span class="o">=</span> <span class="p">[]</span>
<span class="n">inStopProcessNameWOExeStr</span> <span class="o">=</span> <span class="s2">&quot;notepad&quot;</span><span class="p">)</span>
<span class="c1"># notepad.exe will be started if no notepad.exe is active on the machine</span>
</pre></div>
</div>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple"> <dd class="field-odd"><ul class="simple">
<li><p><strong>inPathStr</strong> </p></li> <li><p><strong>inPathStr</strong> Command to send in CMD</p></li>
<li><p><strong>inArgList</strong> </p></li> <li><p><strong>inArgList</strong> List of the arguments for the CMD command. Example: [“test.txt”]</p></li>
<li><p><strong>inStopProcessNameWOExeStr</strong> </p></li> <li><p><strong>inStopProcessNameWOExeStr</strong> Trigger: stop execution if process is running. Process name WithOut (WO) .exe postfix. Example: “notepad” (not “notepad.exe”)</p></li>
</ul> </ul>
</dd> </dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>None - nothing is returned. If process will not start -exception will be raised</p>
</dd>
</dl> </dl>
</dd></dl> </dd></dl>
<dl class="py function"> <dl class="py function">
<dt id="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStop"> <dt id="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStop">
<code class="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><code class="sig-name descname">ProcessStop</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inProcessNameWOExeStr</span></em>, <em class="sig-param"><span class="n">inCloseForceBool</span></em>, <em class="sig-param"><span class="n">inUserNameStr</span><span class="o">=</span><span class="default_value">'%username%'</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#ProcessStop"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStop" title="Permalink to this definition"></a></dt> <code class="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><code class="sig-name descname">ProcessStop</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inProcessNameWOExeStr</span></em>, <em class="sig-param"><span class="n">inCloseForceBool</span></em>, <em class="sig-param"><span class="n">inUserNameStr</span><span class="o">=</span><span class="default_value">'%username%'</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#ProcessStop"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStop" title="Permalink to this definition"></a></dt>
<dd><p>Stop process</p> <dd><p>Stop process on the orchestrator machine. You can set user session on the machine and set flag about to force close process.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># USAGE</span>
<span class="kn">from</span> <span class="nn">pyOpenRPA</span> <span class="kn">import</span> <span class="n">Orchestrator</span>
<span class="n">Orchestrator</span><span class="o">.</span><span class="n">ProcessStop</span><span class="p">(</span>
<span class="n">inProcessNameWOExeStr</span> <span class="o">=</span> <span class="s2">&quot;notepad&quot;</span>
<span class="n">inCloseForceBool</span> <span class="o">=</span> <span class="kc">True</span>
<span class="n">inUserNameStr</span> <span class="o">=</span> <span class="s2">&quot;USER_99&quot;</span><span class="p">)</span>
<span class="c1"># Will close process &quot;notepad.exe&quot; on the user session &quot;USER_99&quot; (!ATTENTION! if process not exists no exceptions will be raised)</span>
</pre></div>
</div>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple"> <dd class="field-odd"><ul class="simple">
<li><p><strong>inProcessNameWOExeStr</strong> </p></li> <li><p><strong>inProcessNameWOExeStr</strong> Process name WithOut (WO) .exe postfix. Example: “notepad” (not “notepad.exe”)</p></li>
<li><p><strong>inCloseForceBool</strong> </p></li> <li><p><strong>inCloseForceBool</strong> True - do force close. False - send signal to safe close (!ATTENTION! - Safe close works only in orchestrator session. Win OS doenst allow to send safe close signal between GUI sessions)</p></li>
<li><p><strong>inUserNameStr</strong> </p></li> <li><p><strong>inUserNameStr</strong> User name which is has current process to close. Default value is close process on the Orchestrator session</p></li>
</ul> </ul>
</dd> </dd>
<dt class="field-even">Returns</dt> <dt class="field-even">Returns</dt>
<dd class="field-even"><p></p> <dd class="field-even"><p>None</p>
</dd> </dd>
</dl> </dl>
</dd></dl> </dd></dl>
<dl class="py function"> <dl class="py function">
<dt id="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemAppend"> <dt id="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemAppend">
<code class="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><code class="sig-name descname">ProcessorActivityItemAppend</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inGSettings</span></em>, <em class="sig-param"><span class="n">inDef</span></em>, <em class="sig-param"><span class="n">inArgList</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inArgDict</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inArgGSettingsStr</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inArgLoggerStr</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#ProcessorActivityItemAppend"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemAppend" title="Permalink to this definition"></a></dt> <code class="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><code class="sig-name descname">ProcessorActivityItemAppend</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inGSettings</span></em>, <em class="sig-param"><span class="n">inDef</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inArgList</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inArgDict</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inArgGSettingsStr</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inArgLoggerStr</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inActivityItemDict</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#ProcessorActivityItemAppend"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemAppend" title="Permalink to this definition"></a></dt>
<dd><p>Add Activity item in Processor list</p> <dd><p>Create and add activity item in processor queue.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># USAGE</span>
<span class="kn">from</span> <span class="nn">pyOpenRPA</span> <span class="kn">import</span> <span class="n">Orchestrator</span>
<span class="c1"># EXAMPLE 1</span>
<span class="k">def</span> <span class="nf">TestDef</span><span class="p">(</span><span class="n">inArg1Str</span><span class="p">,</span> <span class="n">inGSettings</span><span class="p">,</span> <span class="n">inLogger</span><span class="p">):</span>
<span class="k">pass</span>
<span class="n">lActivityItem</span> <span class="o">=</span> <span class="n">Orchestrator</span><span class="o">.</span><span class="n">ProcessorActivityItemAppend</span><span class="p">(</span>
<span class="n">inGSettings</span> <span class="o">=</span> <span class="n">gSettingsDict</span><span class="p">,</span>
<span class="n">inDef</span> <span class="o">=</span> <span class="n">TestDef</span><span class="p">,</span>
<span class="n">inArgList</span><span class="o">=</span><span class="p">[],</span>
<span class="n">inArgDict</span><span class="o">=</span><span class="p">{</span><span class="s2">&quot;inArg1Str&quot;</span><span class="p">:</span> <span class="s2">&quot;ArgValueStr&quot;</span><span class="p">},</span>
<span class="n">inArgGSettingsStr</span> <span class="o">=</span> <span class="s2">&quot;inGSettings&quot;</span><span class="p">,</span>
<span class="n">inArgLoggerStr</span> <span class="o">=</span> <span class="s2">&quot;inLogger&quot;</span><span class="p">)</span>
<span class="c1"># Activity have been already append in the processor queue</span>
<span class="c1"># EXAMPLE 2</span>
<span class="k">def</span> <span class="nf">TestDef</span><span class="p">(</span><span class="n">inArg1Str</span><span class="p">):</span>
<span class="k">pass</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">gSettings</span><span class="p">,</span>
<span class="n">inDef</span> <span class="o">=</span> <span class="n">TestDef</span><span class="p">,</span>
<span class="n">inAliasStr</span><span class="o">=</span><span class="s2">&quot;TestDefAlias&quot;</span><span class="p">)</span>
<span class="n">lActivityItem</span> <span class="o">=</span> <span class="n">Orchestrator</span><span class="o">.</span><span class="n">ProcessorActivityItemCreate</span><span class="p">(</span>
<span class="n">inDef</span> <span class="o">=</span> <span class="s2">&quot;TestDefAlias&quot;</span><span class="p">,</span>
<span class="n">inArgList</span><span class="o">=</span><span class="p">[],</span>
<span class="n">inArgDict</span><span class="o">=</span><span class="p">{</span><span class="s2">&quot;inArg1Str&quot;</span><span class="p">:</span> <span class="s2">&quot;ArgValueStr&quot;</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">Orchestrator</span><span class="o">.</span><span class="n">ProcessorActivityItemAppend</span><span class="p">(</span>
<span class="n">inGSettings</span> <span class="o">=</span> <span class="n">gSettingsDict</span><span class="p">,</span>
<span class="n">inActivityItemDict</span> <span class="o">=</span> <span class="n">lActivityItem</span><span class="p">)</span>
<span class="c1"># Activity have been already append in the processor queue</span>
</pre></div>
</div>
<dl class="field-list simple"> <dl class="field-list simple">
<dt class="field-odd">Parameters</dt> <dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple"> <dd class="field-odd"><ul class="simple">
<li><p><strong>inGSettings</strong> Global settings dict (singleton)</p></li> <li><p><strong>inGSettings</strong> Global settings dict (singleton)</p></li>
<li><p><strong>inDef</strong> </p></li> <li><p><strong>inDef</strong> def link or def alias (look gSettings[“Processor”][“AliasDefDict”])</p></li>
<li><p><strong>inArgList</strong> </p></li> <li><p><strong>inArgList</strong> Args list for the Def</p></li>
<li><p><strong>inArgDict</strong> </p></li> <li><p><strong>inArgDict</strong> Args dict for the Def</p></li>
<li><p><strong>inArgGSettingsStr</strong> </p></li> <li><p><strong>inArgGSettingsStr</strong> Name of def argument of the GSettings dict</p></li>
<li><p><strong>inArgLoggerStr</strong> </p></li> <li><p><strong>inArgLoggerStr</strong> Name of def argument of the logging object</p></li>
<li><p><strong>inActivityItemDict</strong> Fill if you already have ActivityItemDict (dont fill inDef, inArgList, inArgDict, inArgGSettingsStr, inArgLoggerStr)</p></li>
</ul> </ul>
</dd> </dd>
</dl> </dl>
@ -698,7 +786,7 @@ Create Activity Item for the agent</p>
<dl class="py function"> <dl class="py function">
<dt id="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemCreate"> <dt id="pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemCreate">
<code class="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><code class="sig-name descname">ProcessorActivityItemCreate</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inDef</span></em>, <em class="sig-param"><span class="n">inArgList</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inArgDict</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inArgGSettingsStr</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inArgLoggerStr</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#ProcessorActivityItemCreate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemCreate" title="Permalink to this definition"></a></dt> <code class="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><code class="sig-name descname">ProcessorActivityItemCreate</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inDef</span></em>, <em class="sig-param"><span class="n">inArgList</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inArgDict</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inArgGSettingsStr</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inArgLoggerStr</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#ProcessorActivityItemCreate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemCreate" title="Permalink to this definition"></a></dt>
<dd><p>Create ActivityItem</p> <dd><p>Create activity item. Activity item can be used as list item in ProcessorActivityItemAppend or in Processor.ActivityListExecute.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># USAGE</span> <div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># USAGE</span>
<span class="kn">from</span> <span class="nn">pyOpenRPA</span> <span class="kn">import</span> <span class="n">Orchestrator</span> <span class="kn">from</span> <span class="nn">pyOpenRPA</span> <span class="kn">import</span> <span class="n">Orchestrator</span>
@ -1310,7 +1398,12 @@ Var 2 (Backward compatibility): inGSettings, inRDPSessionKeyStr, inHostStr, inP
</div> </div>
<div class="section" id="references"> <div class="section" id="references">
<h2>References<a class="headerlink" href="#references" title="Permalink to this headline"></a></h2> <h2>References<a class="headerlink" href="#references" title="Permalink to this headline"></a></h2>
<p><a href="#id1"><span class="problematic" id="id2">`Python-sphinx`_</span></a></p> <p><a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> <a class="footnote-reference brackets" href="#id1" id="id2">1</a></p>
<dl class="footnote brackets">
<dt class="label" id="id1"><span class="brackets"><a class="fn-backref" href="#id2">1</a></span></dt>
<dd><p><a class="reference external" href="http://docutils.sourceforge.net/rst.html">http://docutils.sourceforge.net/rst.html</a></p>
</dd>
</dl>
</div> </div>
</div> </div>

@ -86,7 +86,7 @@
<p class="caption"><span class="caption-text">ROBOT</span></p> <p class="caption"><span class="caption-text">ROBOT</span></p>
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="../Robot/01_Robot.html">Description</a></li> <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/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">STUDIO</span></p> <p class="caption"><span class="caption-text">STUDIO</span></p>

@ -85,7 +85,7 @@
<p class="caption"><span class="caption-text">ROBOT</span></p> <p class="caption"><span class="caption-text">ROBOT</span></p>
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="../Robot/01_Robot.html">Description</a></li> <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/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">STUDIO</span></p> <p class="caption"><span class="caption-text">STUDIO</span></p>

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Description &mdash; pyOpenRPA v1.2.0 documentation</title> <title>1. Description &mdash; pyOpenRPA v1.2.0 documentation</title>
@ -86,7 +86,7 @@
<p class="caption"><span class="caption-text">ROBOT</span></p> <p class="caption"><span class="caption-text">ROBOT</span></p>
<ul class="current"> <ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Description</a><ul> <li class="toctree-l1 current"><a class="current reference internal" href="#">1. Description</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#module-pyOpenRPA.Robot.UIDesktop">pyOpenRPA Robot</a></li> <li class="toctree-l2"><a class="reference internal" href="#module-pyOpenRPA.Robot.UIDesktop">pyOpenRPA Robot</a></li>
</ul> </ul>
</li> </li>
@ -150,7 +150,7 @@
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li> <li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>Description</li> <li>1. Description</li>
<li class="wy-breadcrumbs-aside"> <li class="wy-breadcrumbs-aside">
@ -170,7 +170,7 @@
<div itemprop="articleBody"> <div itemprop="articleBody">
<div class="section" id="description"> <div class="section" id="description">
<h1>Description<a class="headerlink" href="#description" title="Permalink to this headline"></a></h1> <h1>1. Description<a class="headerlink" href="#description" title="Permalink to this headline"></a></h1>
<p>pyOpenRPA Robot is the python package.</p> <p>pyOpenRPA Robot is the python package.</p>
<div class="section" id="module-pyOpenRPA.Robot.UIDesktop"> <div class="section" id="module-pyOpenRPA.Robot.UIDesktop">
<span id="pyopenrpa-robot"></span><h2>pyOpenRPA Robot<a class="headerlink" href="#module-pyOpenRPA.Robot.UIDesktop" title="Permalink to this headline"></a></h2> <span id="pyopenrpa-robot"></span><h2>pyOpenRPA Robot<a class="headerlink" href="#module-pyOpenRPA.Robot.UIDesktop" title="Permalink to this headline"></a></h2>

@ -39,7 +39,7 @@
<link rel="index" title="Index" href="../genindex.html" /> <link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" /> <link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Description" href="../Studio/Studio.html" /> <link rel="next" title="Description" href="../Studio/Studio.html" />
<link rel="prev" title="Description" href="01_Robot.html" /> <link rel="prev" title="1. Description" href="01_Robot.html" />
</head> </head>
<body class="wy-body-for-nav"> <body class="wy-body-for-nav">
@ -86,7 +86,7 @@
<p class="caption"><span class="caption-text">ROBOT</span></p> <p class="caption"><span class="caption-text">ROBOT</span></p>
<ul class="current"> <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="01_Robot.html">Description</a></li> <li class="toctree-l1"><a class="reference internal" href="01_Robot.html">1. Description</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">2. Defs</a><ul> <li class="toctree-l1 current"><a class="current reference internal" href="#">2. Defs</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#pyopenrpa-robot-uidesktop">pyOpenRPA.Robot.UIDesktop</a></li> <li class="toctree-l2"><a class="reference internal" href="#pyopenrpa-robot-uidesktop">pyOpenRPA.Robot.UIDesktop</a></li>
<li class="toctree-l2"><a class="reference internal" href="#references">References</a></li> <li class="toctree-l2"><a class="reference internal" href="#references">References</a></li>
@ -233,7 +233,7 @@
<footer> <footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="../Studio/Studio.html" class="btn btn-neutral float-right" title="Description" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a> <a href="../Studio/Studio.html" class="btn btn-neutral float-right" title="Description" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="01_Robot.html" class="btn btn-neutral float-left" title="Description" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a> <a href="01_Robot.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> </div>
<hr/> <hr/>

@ -86,7 +86,7 @@
<p class="caption"><span class="caption-text">ROBOT</span></p> <p class="caption"><span class="caption-text">ROBOT</span></p>
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="../Robot/01_Robot.html">Description</a></li> <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/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">STUDIO</span></p> <p class="caption"><span class="caption-text">STUDIO</span></p>

@ -84,7 +84,7 @@
<p class="caption"><span class="caption-text">ROBOT</span></p> <p class="caption"><span class="caption-text">ROBOT</span></p>
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="../Robot/01_Robot.html">Description</a></li> <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/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">STUDIO</span></p> <p class="caption"><span class="caption-text">STUDIO</span></p>

@ -84,7 +84,7 @@
<p class="caption"><span class="caption-text">ROBOT</span></p> <p class="caption"><span class="caption-text">ROBOT</span></p>
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="../../../Robot/01_Robot.html">Description</a></li> <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/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">STUDIO</span></p> <p class="caption"><span class="caption-text">STUDIO</span></p>
@ -789,7 +789,7 @@
<div class="viewcode-block" id="ProcessorActivityItemCreate"><a class="viewcode-back" href="../../../Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemCreate">[docs]</a><span class="k">def</span> <span class="nf">ProcessorActivityItemCreate</span><span class="p">(</span><span class="n">inDef</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">inArgDict</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> <div class="viewcode-block" id="ProcessorActivityItemCreate"><a class="viewcode-back" href="../../../Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemCreate">[docs]</a><span class="k">def</span> <span class="nf">ProcessorActivityItemCreate</span><span class="p">(</span><span class="n">inDef</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">inArgDict</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="sd">&quot;&quot;&quot;</span> <span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Create ActivityItem</span> <span class="sd"> Create activity item. Activity item can be used as list item in ProcessorActivityItemAppend or in Processor.ActivityListExecute.</span>
<span class="sd"> .. code-block:: python</span> <span class="sd"> .. code-block:: python</span>
@ -854,28 +854,68 @@
<span class="p">}</span> <span class="p">}</span>
<span class="k">return</span> <span class="n">lActivityItemDict</span></div> <span class="k">return</span> <span class="n">lActivityItemDict</span></div>
<div class="viewcode-block" id="ProcessorActivityItemAppend"><a class="viewcode-back" href="../../../Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemAppend">[docs]</a><span class="k">def</span> <span class="nf">ProcessorActivityItemAppend</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">inArgList</span><span class="o">=</span><span class="kc">None</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">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> <div class="viewcode-block" id="ProcessorActivityItemAppend"><a class="viewcode-back" href="../../../Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemAppend">[docs]</a><span class="k">def</span> <span class="nf">ProcessorActivityItemAppend</span><span class="p">(</span><span class="n">inGSettings</span><span class="p">,</span> <span class="n">inDef</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">inArgDict</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">inActivityItemDict</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span> <span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Add Activity item in Processor list</span> <span class="sd"> Create and add activity item in processor queue.</span>
<span class="sd"> .. code-block:: python</span>
<span class="sd"> # USAGE</span>
<span class="sd"> from pyOpenRPA import Orchestrator</span>
<span class="sd"> # EXAMPLE 1</span>
<span class="sd"> def TestDef(inArg1Str, inGSettings, inLogger):</span>
<span class="sd"> pass</span>
<span class="sd"> lActivityItem = Orchestrator.ProcessorActivityItemAppend(</span>
<span class="sd"> inGSettings = gSettingsDict,</span>
<span class="sd"> inDef = TestDef,</span>
<span class="sd"> inArgList=[],</span>
<span class="sd"> inArgDict={&quot;inArg1Str&quot;: &quot;ArgValueStr&quot;},</span>
<span class="sd"> inArgGSettingsStr = &quot;inGSettings&quot;,</span>
<span class="sd"> inArgLoggerStr = &quot;inLogger&quot;)</span>
<span class="sd"> # Activity have been already append in the processor queue</span>
<span class="sd"> # EXAMPLE 2</span>
<span class="sd"> def TestDef(inArg1Str):</span>
<span class="sd"> pass</span>
<span class="sd"> Orchestrator.ProcessorAliasDefUpdate(</span>
<span class="sd"> inGSettings = gSettings,</span>
<span class="sd"> inDef = TestDef,</span>
<span class="sd"> inAliasStr=&quot;TestDefAlias&quot;)</span>
<span class="sd"> lActivityItem = Orchestrator.ProcessorActivityItemCreate(</span>
<span class="sd"> inDef = &quot;TestDefAlias&quot;,</span>
<span class="sd"> inArgList=[],</span>
<span class="sd"> inArgDict={&quot;inArg1Str&quot;: &quot;ArgValueStr&quot;},</span>
<span class="sd"> inArgGSettingsStr = None,</span>
<span class="sd"> inArgLoggerStr = None)</span>
<span class="sd"> Orchestrator.ProcessorActivityItemAppend(</span>
<span class="sd"> inGSettings = gSettingsDict,</span>
<span class="sd"> inActivityItemDict = lActivityItem)</span>
<span class="sd"> # Activity have been already append in the processor queue</span>
<span class="sd"> :param inGSettings: Global settings dict (singleton)</span> <span class="sd"> :param inGSettings: Global settings dict (singleton)</span>
<span class="sd"> :param inDef:</span> <span class="sd"> :param inDef: def link or def alias (look gSettings[&quot;Processor&quot;][&quot;AliasDefDict&quot;])</span>
<span class="sd"> :param inArgList:</span> <span class="sd"> :param inArgList: Args list for the Def</span>
<span class="sd"> :param inArgDict:</span> <span class="sd"> :param inArgDict: Args dict for the Def</span>
<span class="sd"> :param inArgGSettingsStr:</span> <span class="sd"> :param inArgGSettingsStr: Name of def argument of the GSettings dict</span>
<span class="sd"> :param inArgLoggerStr:</span> <span class="sd"> :param inArgLoggerStr: Name of def argument of the logging object</span>
<span class="sd"> :param inActivityItemDict: Fill if you already have ActivityItemDict (don&#39;t fill inDef, inArgList, inArgDict, inArgGSettingsStr, inArgLoggerStr)</span>
<span class="sd"> &quot;&quot;&quot;</span> <span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="n">inArgList</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="n">inArgList</span><span class="o">=</span><span class="p">[]</span> <span class="k">if</span> <span class="n">inActivityItemDict</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">if</span> <span class="n">inArgDict</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="n">inArgDict</span><span class="o">=</span><span class="p">{}</span> <span class="k">if</span> <span class="n">inArgList</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="n">inArgList</span><span class="o">=</span><span class="p">[]</span>
<span class="n">lActivityList</span><span class="o">=</span><span class="p">[</span> <span class="k">if</span> <span class="n">inArgDict</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="n">inArgDict</span><span class="o">=</span><span class="p">{}</span>
<span class="p">{</span> <span class="k">if</span> <span class="n">inDef</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;pyOpenRPA Exception: ProcessorActivityItemAppend need inDef arg if you dont use inActivityItemDict&quot;</span><span class="p">)</span>
<span class="s2">&quot;Def&quot;</span><span class="p">:</span><span class="n">inDef</span><span class="p">,</span> <span class="c1"># def link or def alias (look gSettings[&quot;Processor&quot;][&quot;AliasDefDict&quot;])</span> <span class="n">lActivityList</span><span class="o">=</span><span class="p">[</span>
<span class="s2">&quot;ArgList&quot;</span><span class="p">:</span><span class="n">inArgList</span><span class="p">,</span> <span class="c1"># Args list</span> <span class="p">{</span>
<span class="s2">&quot;ArgDict&quot;</span><span class="p">:</span><span class="n">inArgDict</span><span class="p">,</span> <span class="c1"># Args dictionary</span> <span class="s2">&quot;Def&quot;</span><span class="p">:</span><span class="n">inDef</span><span class="p">,</span> <span class="c1"># def link or def alias (look gSettings[&quot;Processor&quot;][&quot;AliasDefDict&quot;])</span>
<span class="s2">&quot;ArgGSettings&quot;</span><span class="p">:</span> <span class="n">inArgGSettingsStr</span><span class="p">,</span> <span class="c1"># Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span> <span class="s2">&quot;ArgList&quot;</span><span class="p">:</span><span class="n">inArgList</span><span class="p">,</span> <span class="c1"># Args list</span>
<span class="s2">&quot;ArgLogger&quot;</span><span class="p">:</span> <span class="n">inArgLoggerStr</span> <span class="c1"># Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span> <span class="s2">&quot;ArgDict&quot;</span><span class="p">:</span><span class="n">inArgDict</span><span class="p">,</span> <span class="c1"># Args dictionary</span>
<span class="p">}</span> <span class="s2">&quot;ArgGSettings&quot;</span><span class="p">:</span> <span class="n">inArgGSettingsStr</span><span class="p">,</span> <span class="c1"># Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<span class="p">]</span> <span class="s2">&quot;ArgLogger&quot;</span><span class="p">:</span> <span class="n">inArgLoggerStr</span> <span class="c1"># Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<span class="p">}</span>
<span class="p">]</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">lActivityList</span> <span class="o">=</span> <span class="p">[</span><span class="n">inActivityItemDict</span><span class="p">]</span>
<span class="n">inGSettings</span><span class="p">[</span><span class="s2">&quot;ProcessorDict&quot;</span><span class="p">][</span><span class="s2">&quot;ActivityList&quot;</span><span class="p">]</span><span class="o">+=</span><span class="n">lActivityList</span></div> <span class="n">inGSettings</span><span class="p">[</span><span class="s2">&quot;ProcessorDict&quot;</span><span class="p">][</span><span class="s2">&quot;ActivityList&quot;</span><span class="p">]</span><span class="o">+=</span><span class="n">lActivityList</span></div>
<span class="c1">## Process defs</span> <span class="c1">## Process defs</span>
@ -883,8 +923,16 @@
<span class="sd">&quot;&quot;&quot;</span> <span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Check if there is any running process that contains the given name processName.</span> <span class="sd"> Check if there is any running process that contains the given name processName.</span>
<span class="sd"> :param inProcessNameWOExeStr:</span> <span class="sd"> .. code-block:: python</span>
<span class="sd"> :return: True - process is running; False - process is not running</span>
<span class="sd"> # USAGE</span>
<span class="sd"> from pyOpenRPA import Orchestrator</span>
<span class="sd"> lProcessIsStartedBool = Orchestrator.ProcessIsStarted(inProcessNameWOExeStr = &quot;notepad&quot;)</span>
<span class="sd"> # lProcessIsStartedBool is True - notepad.exe is running on the Orchestrator machine</span>
<span class="sd"> :param inProcessNameWOExeStr: Process name WithOut (WO) &#39;.exe&#39; postfix. Example: &quot;notepad&quot; (not &quot;notepad.exe&quot;)</span>
<span class="sd"> :return: True - process is running on the orchestrator machine; False - process is not running on the orchestrator machine</span>
<span class="sd"> &quot;&quot;&quot;</span> <span class="sd"> &quot;&quot;&quot;</span>
<span class="c1">#Iterate over the all the running process</span> <span class="c1">#Iterate over the all the running process</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">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>
@ -898,11 +946,23 @@
<div class="viewcode-block" id="ProcessStart"><a class="viewcode-back" href="../../../Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStart">[docs]</a><span class="k">def</span> <span class="nf">ProcessStart</span><span class="p">(</span><span class="n">inPathStr</span><span class="p">,</span> <span class="n">inArgList</span><span class="p">,</span> <span class="n">inStopProcessNameWOExeStr</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span> <div class="viewcode-block" id="ProcessStart"><a class="viewcode-back" href="../../../Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStart">[docs]</a><span class="k">def</span> <span class="nf">ProcessStart</span><span class="p">(</span><span class="n">inPathStr</span><span class="p">,</span> <span class="n">inArgList</span><span class="p">,</span> <span class="n">inStopProcessNameWOExeStr</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span> <span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Start process locally [optional: if task name is not started]</span> <span class="sd"> Start process locally. Extra feature: Use inStopProcessNameWOExeStr to stop the execution if current process is running.</span>
<span class="sd"> :param inPathStr:</span> <span class="sd"> .. code-block:: python</span>
<span class="sd"> :param inArgList:</span>
<span class="sd"> :param inStopProcessNameWOExeStr:</span> <span class="sd"> # USAGE</span>
<span class="sd"> from pyOpenRPA import Orchestrator</span>
<span class="sd"> Orchestrator.ProcessStart(</span>
<span class="sd"> inPathStr = &quot;notepad&quot;</span>
<span class="sd"> inArgList = []</span>
<span class="sd"> inStopProcessNameWOExeStr = &quot;notepad&quot;)</span>
<span class="sd"> # notepad.exe will be started if no notepad.exe is active on the machine</span>
<span class="sd"> :param inPathStr: Command to send in CMD</span>
<span class="sd"> :param inArgList: List of the arguments for the CMD command. Example: [&quot;test.txt&quot;]</span>
<span class="sd"> :param inStopProcessNameWOExeStr: Trigger: stop execution if process is running. Process name WithOut (WO) &#39;.exe&#39; postfix. Example: &quot;notepad&quot; (not &quot;notepad.exe&quot;)</span>
<span class="sd"> :return: None - nothing is returned. If process will not start -exception will be raised</span>
<span class="sd"> &quot;&quot;&quot;</span> <span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lStartProcessBool</span> <span class="o">=</span> <span class="kc">True</span> <span class="n">lStartProcessBool</span> <span class="o">=</span> <span class="kc">True</span>
<span class="k">if</span> <span class="n">inStopProcessNameWOExeStr</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="c1">#Check if process running</span> <span class="k">if</span> <span class="n">inStopProcessNameWOExeStr</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span> <span class="c1">#Check if process running</span>
@ -917,17 +977,29 @@
<span class="k">if</span> <span class="n">lStartProcessBool</span> <span class="o">==</span> <span class="kc">True</span><span class="p">:</span> <span class="c1"># Start if flag is true</span> <span class="k">if</span> <span class="n">lStartProcessBool</span> <span class="o">==</span> <span class="kc">True</span><span class="p">:</span> <span class="c1"># Start if flag is true</span>
<span class="n">lItemArgs</span><span class="o">=</span><span class="p">[</span><span class="n">inPathStr</span><span class="p">]</span> <span class="n">lItemArgs</span><span class="o">=</span><span class="p">[</span><span class="n">inPathStr</span><span class="p">]</span>
<span class="k">if</span> <span class="n">inArgList</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="n">inArgList</span> <span class="o">=</span> <span class="p">[]</span> <span class="c1"># 2021 02 22 Minor fix default value</span>
<span class="n">lItemArgs</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span><span class="n">inArgList</span><span class="p">)</span> <span class="n">lItemArgs</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span><span class="n">inArgList</span><span class="p">)</span>
<span class="n">subprocess</span><span class="o">.</span><span class="n">Popen</span><span class="p">(</span><span class="n">lItemArgs</span><span class="p">,</span><span class="n">shell</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span></div> <span class="n">subprocess</span><span class="o">.</span><span class="n">Popen</span><span class="p">(</span><span class="n">lItemArgs</span><span class="p">,</span><span class="n">shell</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span></div>
<div class="viewcode-block" id="ProcessStop"><a class="viewcode-back" href="../../../Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStop">[docs]</a><span class="k">def</span> <span class="nf">ProcessStop</span><span class="p">(</span><span class="n">inProcessNameWOExeStr</span><span class="p">,</span> <span class="n">inCloseForceBool</span><span class="p">,</span> <span class="n">inUserNameStr</span> <span class="o">=</span> <span class="s2">&quot;</span><span class="si">%u</span><span class="s2">sername%&quot;</span><span class="p">):</span> <div class="viewcode-block" id="ProcessStop"><a class="viewcode-back" href="../../../Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStop">[docs]</a><span class="k">def</span> <span class="nf">ProcessStop</span><span class="p">(</span><span class="n">inProcessNameWOExeStr</span><span class="p">,</span> <span class="n">inCloseForceBool</span><span class="p">,</span> <span class="n">inUserNameStr</span> <span class="o">=</span> <span class="s2">&quot;</span><span class="si">%u</span><span class="s2">sername%&quot;</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span> <span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Stop process</span> <span class="sd"> Stop process on the orchestrator machine. You can set user session on the machine and set flag about to force close process.</span>
<span class="sd"> :param inProcessNameWOExeStr:</span> <span class="sd"> .. code-block:: python</span>
<span class="sd"> :param inCloseForceBool:</span>
<span class="sd"> :param inUserNameStr:</span> <span class="sd"> # USAGE</span>
<span class="sd"> :return:</span> <span class="sd"> from pyOpenRPA import Orchestrator</span>
<span class="sd"> Orchestrator.ProcessStop(</span>
<span class="sd"> inProcessNameWOExeStr = &quot;notepad&quot;</span>
<span class="sd"> inCloseForceBool = True</span>
<span class="sd"> inUserNameStr = &quot;USER_99&quot;)</span>
<span class="sd"> # Will close process &quot;notepad.exe&quot; on the user session &quot;USER_99&quot; (!ATTENTION! if process not exists no exceptions will be raised)</span>
<span class="sd"> :param inProcessNameWOExeStr: Process name WithOut (WO) &#39;.exe&#39; postfix. Example: &quot;notepad&quot; (not &quot;notepad.exe&quot;)</span>
<span class="sd"> :param inCloseForceBool: True - do force close. False - send signal to safe close (!ATTENTION! - Safe close works only in orchestrator session. Win OS doens&#39;t allow to send safe close signal between GUI sessions)</span>
<span class="sd"> :param inUserNameStr: User name which is has current process to close. Default value is close process on the Orchestrator session</span>
<span class="sd"> :return: None</span>
<span class="sd"> &quot;&quot;&quot;</span> <span class="sd"> &quot;&quot;&quot;</span>
<span class="c1"># Support input arg if with .exe</span> <span class="c1"># Support input arg if with .exe</span>
<span class="n">lProcessNameWExeStr</span> <span class="o">=</span> <span class="n">inProcessNameWOExeStr</span> <span class="n">lProcessNameWExeStr</span> <span class="o">=</span> <span class="n">inProcessNameWOExeStr</span>
@ -948,15 +1020,35 @@
<div class="viewcode-block" id="ProcessListGet"><a class="viewcode-back" href="../../../Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessListGet">[docs]</a><span class="k">def</span> <span class="nf">ProcessListGet</span><span class="p">(</span><span class="n">inProcessNameWOExeList</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span> <div class="viewcode-block" id="ProcessListGet"><a class="viewcode-back" href="../../../Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessListGet">[docs]</a><span class="k">def</span> <span class="nf">ProcessListGet</span><span class="p">(</span><span class="n">inProcessNameWOExeList</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span> <span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Check activity of the list of processes</span> <span class="sd"> Return process list on the orchestrator machine. You can determine the list of the processes you are interested - def will return the list about it.</span>
<span class="sd"> .. code-block:: python</span>
<span class="sd"> # USAGE</span>
<span class="sd"> from pyOpenRPA import Orchestrator</span>
<span class="sd"> lProcessList = Orchestrator.ProcessListGet()</span>
<span class="sd"> # Return the list of the process on the machine. !ATTENTION! RUn orchestrator as administrator to get all process list on the machine.</span>
<span class="sd"> :param inProcessNameWOExeList:</span> <span class="sd"> :param inProcessNameWOExeList:</span>
<span class="sd"> :return: TODO FILL THE RESULT DICT</span> <span class="sd"> :return: {</span>
<span class="sd"> &quot;ProcessWOExeList&quot;: [&quot;notepad&quot;,&quot;...&quot;],</span>
<span class="sd"> &quot;ProcessWOExeUpperList&quot;: [&quot;NOTEPAD&quot;,&quot;...&quot;],</span>
<span class="sd"> &quot;ProcessDetailList&quot;: [</span>
<span class="sd"> {</span>
<span class="sd"> &#39;pid&#39;: 412,</span>
<span class="sd"> &#39;username&#39;: &quot;DESKTOP\\USER&quot;,</span>
<span class="sd"> &#39;name&#39;: &#39;notepad.exe&#39;,</span>
<span class="sd"> &#39;vms&#39;: 13.77767775,</span>
<span class="sd"> &#39;NameWOExeUpperStr&#39;: &#39;NOTEPAD&#39;,</span>
<span class="sd"> &#39;NameWOExeStr&#39;: &quot;&#39;notepad&#39;&quot;},</span>
<span class="sd"> {...}]</span>
<span class="sd"> &quot;&quot;&quot;</span> <span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="n">inProcessNameWOExeList</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="n">inProcessNameWOExeList</span> <span class="o">=</span> <span class="p">[]</span> <span class="k">if</span> <span class="n">inProcessNameWOExeList</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="n">inProcessNameWOExeList</span> <span class="o">=</span> <span class="p">[]</span>
<span class="sd">&#39;&#39;&#39;Get list of running process sorted by Memory Usage and filtered by inProcessNameWOExeList&#39;&#39;&#39;</span> <span class="sd">&#39;&#39;&#39;Get list of running process sorted by Memory Usage and filtered by inProcessNameWOExeList&#39;&#39;&#39;</span>
<span class="n">lMapUPPERInput</span> <span class="o">=</span> <span class="p">{}</span> <span class="c1"># Mapping for processes WO exe</span> <span class="n">lMapUPPERInput</span> <span class="o">=</span> <span class="p">{}</span> <span class="c1"># Mapping for processes WO exe</span>
<span class="n">lResult</span> <span class="o">=</span> <span class="p">{</span><span class="s2">&quot;ProcessWOExeList&quot;</span><span class="p">:[],</span><span class="s2">&quot;ProcessDetailList&quot;</span><span class="p">:[]}</span> <span class="n">lResult</span> <span class="o">=</span> <span class="p">{</span><span class="s2">&quot;ProcessWOExeList&quot;</span><span class="p">:[],</span> <span class="s2">&quot;ProcessWOExeUpperList&quot;</span><span class="p">:[],</span><span class="s2">&quot;ProcessDetailList&quot;</span><span class="p">:[]}</span>
<span class="c1"># Create updated list for quick check</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="n">lProcessNameWOExeList</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">for</span> <span class="n">lItem</span> <span class="ow">in</span> <span class="n">inProcessNameWOExeList</span><span class="p">:</span> <span class="k">for</span> <span class="n">lItem</span> <span class="ow">in</span> <span class="n">inProcessNameWOExeList</span><span class="p">:</span>
@ -972,9 +1064,13 @@
<span class="n">pinfo</span><span class="p">[</span><span class="s1">&#39;NameWOExeUpperStr&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">pinfo</span><span class="p">[</span><span class="s1">&#39;name&#39;</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="n">pinfo</span><span class="p">[</span><span class="s1">&#39;NameWOExeUpperStr&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">pinfo</span><span class="p">[</span><span class="s1">&#39;name&#39;</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="c1"># Add if empty inProcessNameWOExeList or if process in inProcessNameWOExeList</span> <span class="c1"># Add if empty inProcessNameWOExeList or if process in inProcessNameWOExeList</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">lProcessNameWOExeList</span><span class="p">)</span><span class="o">==</span><span class="mi">0</span> <span class="ow">or</span> <span class="n">pinfo</span><span class="p">[</span><span class="s1">&#39;name&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> <span class="ow">in</span> <span class="n">lProcessNameWOExeList</span><span class="p">:</span> <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">lProcessNameWOExeList</span><span class="p">)</span><span class="o">==</span><span class="mi">0</span> <span class="ow">or</span> <span class="n">pinfo</span><span class="p">[</span><span class="s1">&#39;name&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> <span class="ow">in</span> <span class="n">lProcessNameWOExeList</span><span class="p">:</span>
<span class="n">pinfo</span><span class="p">[</span><span class="s1">&#39;NameWOExeStr&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">lMapUPPERInput</span><span class="p">[</span><span class="n">pinfo</span><span class="p">[</span><span class="s1">&#39;name&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">upper</span><span class="p">()]</span> <span class="k">try</span><span class="p">:</span> <span class="c1"># 2021 02 22 Minor fix if not admin rights</span>
<span class="n">pinfo</span><span class="p">[</span><span class="s1">&#39;NameWOExeStr&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">lMapUPPERInput</span><span class="p">[</span><span class="n">pinfo</span><span class="p">[</span><span class="s1">&#39;name&#39;</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="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="n">pinfo</span><span class="p">[</span><span class="s1">&#39;NameWOExeStr&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">pinfo</span><span class="p">[</span><span class="s1">&#39;name&#39;</span><span class="p">][:</span><span class="o">-</span><span class="mi">4</span><span class="p">]</span>
<span class="n">lResult</span><span class="p">[</span><span class="s2">&quot;ProcessDetailList&quot;</span><span class="p">]</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="c1"># Append dict to list</span> <span class="n">lResult</span><span class="p">[</span><span class="s2">&quot;ProcessDetailList&quot;</span><span class="p">]</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="c1"># Append dict to list</span>
<span class="n">lResult</span><span class="p">[</span><span class="s2">&quot;ProcessWOExeList&quot;</span><span class="p">]</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">&#39;NameWOExeStr&#39;</span><span class="p">])</span> <span class="n">lResult</span><span class="p">[</span><span class="s2">&quot;ProcessWOExeList&quot;</span><span class="p">]</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">&#39;NameWOExeStr&#39;</span><span class="p">])</span>
<span class="n">lResult</span><span class="p">[</span><span class="s2">&quot;ProcessWOExeUpperList&quot;</span><span class="p">]</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">&#39;NameWOExeUpperStr&#39;</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">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">pass</span>
<span class="k">return</span> <span class="n">lResult</span></div> <span class="k">return</span> <span class="n">lResult</span></div>

@ -84,7 +84,7 @@
<p class="caption"><span class="caption-text">ROBOT</span></p> <p class="caption"><span class="caption-text">ROBOT</span></p>
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="../../../Robot/01_Robot.html">Description</a></li> <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/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">STUDIO</span></p> <p class="caption"><span class="caption-text">STUDIO</span></p>

@ -27,7 +27,7 @@ pyOpenRPA.Orchestrator.__Orchestrator__
References References
********** **********
`Python-sphinx`_ `reStructuredText`_
.. target-notes:: .. target-notes::
.. _`reStructuredText`: http://docutils.sourceforge.net/rst.html .. _`reStructuredText`: http://docutils.sourceforge.net/rst.html

@ -1,5 +1,5 @@
************************ ************************
Description 1. Description
************************ ************************
pyOpenRPA Robot is the python package. pyOpenRPA Robot is the python package.

@ -84,7 +84,7 @@
<p class="caption"><span class="caption-text">ROBOT</span></p> <p class="caption"><span class="caption-text">ROBOT</span></p>
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="Robot/01_Robot.html">Description</a></li> <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/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">STUDIO</span></p> <p class="caption"><span class="caption-text">STUDIO</span></p>

@ -38,7 +38,7 @@
<link rel="index" title="Index" href="genindex.html" /> <link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" /> <link rel="search" title="Search" href="search.html" />
<link rel="next" title="Description" href="Robot/01_Robot.html" /> <link rel="next" title="1. Description" href="Robot/01_Robot.html" />
</head> </head>
<body class="wy-body-for-nav"> <body class="wy-body-for-nav">
@ -85,7 +85,7 @@
<p class="caption"><span class="caption-text">ROBOT</span></p> <p class="caption"><span class="caption-text">ROBOT</span></p>
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="Robot/01_Robot.html">Description</a></li> <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/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">STUDIO</span></p> <p class="caption"><span class="caption-text">STUDIO</span></p>
@ -172,7 +172,7 @@
<div class="toctree-wrapper compound"> <div class="toctree-wrapper compound">
<p class="caption"><span class="caption-text">ROBOT</span></p> <p class="caption"><span class="caption-text">ROBOT</span></p>
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="Robot/01_Robot.html">Description</a><ul> <li class="toctree-l1"><a class="reference internal" href="Robot/01_Robot.html">1. Description</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Robot/01_Robot.html#module-pyOpenRPA.Robot.UIDesktop">pyOpenRPA Robot</a></li> <li class="toctree-l2"><a class="reference internal" href="Robot/01_Robot.html#module-pyOpenRPA.Robot.UIDesktop">pyOpenRPA Robot</a></li>
</ul> </ul>
</li> </li>
@ -217,7 +217,7 @@
</div> </div>
<footer> <footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="Robot/01_Robot.html" class="btn btn-neutral float-right" title="Description" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a> <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>
</div> </div>
<hr/> <hr/>

Binary file not shown.

@ -87,7 +87,7 @@
<p class="caption"><span class="caption-text">ROBOT</span></p> <p class="caption"><span class="caption-text">ROBOT</span></p>
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="Robot/01_Robot.html">Description</a></li> <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/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">STUDIO</span></p> <p class="caption"><span class="caption-text">STUDIO</span></p>

@ -87,7 +87,7 @@
<p class="caption"><span class="caption-text">ROBOT</span></p> <p class="caption"><span class="caption-text">ROBOT</span></p>
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="Robot/01_Robot.html">Description</a></li> <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/02_Defs.html">2. Defs</a></li>
</ul> </ul>
<p class="caption"><span class="caption-text">STUDIO</span></p> <p class="caption"><span class="caption-text">STUDIO</span></p>

File diff suppressed because one or more lines are too long

@ -91,29 +91,29 @@ __Orchestrator__.OSCMD(inCMDStr = "git status", inRunAsyncBool=True)
| |
| `ProcessListGet`([inProcessNameWOExeList]) | `ProcessListGet`([inProcessNameWOExeList])
| Check activity of the list of processes | Return process list on the orchestrator machine.
| |
| `ProcessStart`(inPathStr, inArgList[, …]) | `ProcessStart`(inPathStr, inArgList[, …])
| Start process locally [optional: if task name is not started] | Start process locally.
| |
| `ProcessStop`(inProcessNameWOExeStr, …[, …]) | `ProcessStop`(inProcessNameWOExeStr, …[, …])
| Stop process | Stop process on the orchestrator machine.
| |
| `ProcessorActivityItemAppend`(inGSettings, inDef) | `ProcessorActivityItemAppend`(inGSettings[, …])
| Add Activity item in Processor list | Create and add activity item in processor queue.
| |
| `ProcessorActivityItemCreate`(inDef[, …]) | `ProcessorActivityItemCreate`(inDef[, …])
| Create ActivityItem | Create activity item.
| |
| `ProcessorAliasDefCreate`(inGSettings, inDef) | `ProcessorAliasDefCreate`(inGSettings, inDef)
| Create alias for def (can be used in ActivityItem in field Def) !WHEN DEF ALIAS IS REQUIRED! - Def alias is required when you try to call Python def from the Orchestrator WEB side (because you cant transmit Python def object out of the Python environment) | Create alias for def (can be used in ActivityItem in field Def) !WHEN DEF ALIAS IS REQUIRED! - Def alias is required when you try to call Python def from the Orchestrator WEB side (because you cant transmit Python def object out of the Python environment)
@ -602,21 +602,37 @@ Orchestrator session save in file _SessionLast_RDPList.json (encoding = “utf-8
### pyOpenRPA.Orchestrator.__Orchestrator__.ProcessIsStarted(inProcessNameWOExeStr) ### pyOpenRPA.Orchestrator.__Orchestrator__.ProcessIsStarted(inProcessNameWOExeStr)
Check if there is any running process that contains the given name processName. Check if there is any running process that contains the given name processName.
```
# USAGE
from pyOpenRPA import Orchestrator
lProcessIsStartedBool = Orchestrator.ProcessIsStarted(inProcessNameWOExeStr = "notepad")
# lProcessIsStartedBool is True - notepad.exe is running on the Orchestrator machine
```
* **Parameters** * **Parameters**
**inProcessNameWOExeStr** **inProcessNameWOExeStr** Process name WithOut (WO) .exe postfix. Example: “notepad” (not “notepad.exe”)
* **Returns** * **Returns**
True - process is running; False - process is not running True - process is running on the orchestrator machine; False - process is not running on the orchestrator machine
### pyOpenRPA.Orchestrator.__Orchestrator__.ProcessListGet(inProcessNameWOExeList=None) ### pyOpenRPA.Orchestrator.__Orchestrator__.ProcessListGet(inProcessNameWOExeList=None)
Check activity of the list of processes Return process list on the orchestrator machine. You can determine the list of the processes you are interested - def will return the list about it.
```
# USAGE
from pyOpenRPA import Orchestrator
lProcessList = Orchestrator.ProcessListGet()
# Return the list of the process on the machine. !ATTENTION! RUn orchestrator as administrator to get all process list on the machine.
```
* **Parameters** * **Parameters**
@ -627,51 +643,131 @@ Check activity of the list of processes
* **Returns** * **Returns**
TODO FILL THE RESULT DICT {
“ProcessWOExeList”: [“notepad”,”…”],
“ProcessWOExeUpperList”: [“NOTEPAD”,”…”],
“ProcessDetailList”: [
> {
> pid: 412,
> username: “DESKTOPUSER”,
> name: notepad.exe,
> vms: 13.77767775,
> NameWOExeUpperStr: NOTEPAD,
> NameWOExeStr: “notepad”},
> {…}]
### pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStart(inPathStr, inArgList, inStopProcessNameWOExeStr=None) ### pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStart(inPathStr, inArgList, inStopProcessNameWOExeStr=None)
Start process locally [optional: if task name is not started] Start process locally. Extra feature: Use inStopProcessNameWOExeStr to stop the execution if current process is running.
```
# USAGE
from pyOpenRPA import Orchestrator
Orchestrator.ProcessStart(
inPathStr = "notepad"
inArgList = []
inStopProcessNameWOExeStr = "notepad")
# notepad.exe will be started if no notepad.exe is active on the machine
```
* **Parameters** * **Parameters**
* **inPathStr** * **inPathStr** Command to send in CMD
* **inArgList** * **inArgList** List of the arguments for the CMD command. Example: [“test.txt”]
* **inStopProcessNameWOExeStr** * **inStopProcessNameWOExeStr** Trigger: stop execution if process is running. Process name WithOut (WO) .exe postfix. Example: “notepad” (not “notepad.exe”)
* **Returns**
None - nothing is returned. If process will not start -exception will be raised
### pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStop(inProcessNameWOExeStr, inCloseForceBool, inUserNameStr='%username%') ### pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStop(inProcessNameWOExeStr, inCloseForceBool, inUserNameStr='%username%')
Stop process Stop process on the orchestrator machine. You can set user session on the machine and set flag about to force close process.
```
# USAGE
from pyOpenRPA import Orchestrator
Orchestrator.ProcessStop(
inProcessNameWOExeStr = "notepad"
inCloseForceBool = True
inUserNameStr = "USER_99")
# Will close process "notepad.exe" on the user session "USER_99" (!ATTENTION! if process not exists no exceptions will be raised)
```
* **Parameters** * **Parameters**
* **inProcessNameWOExeStr** * **inProcessNameWOExeStr** Process name WithOut (WO) .exe postfix. Example: “notepad” (not “notepad.exe”)
* **inCloseForceBool** * **inCloseForceBool** True - do force close. False - send signal to safe close (!ATTENTION! - Safe close works only in orchestrator session. Win OS doenst allow to send safe close signal between GUI sessions)
* **inUserNameStr** * **inUserNameStr** User name which is has current process to close. Default value is close process on the Orchestrator session
* **Returns** * **Returns**
None
### pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemAppend(inGSettings, inDef, inArgList=None, inArgDict=None, inArgGSettingsStr=None, inArgLoggerStr=None)
Add Activity item in Processor list ### pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemAppend(inGSettings, inDef=None, inArgList=None, inArgDict=None, inArgGSettingsStr=None, inArgLoggerStr=None, inActivityItemDict=None)
Create and add activity item in processor queue.
```
# USAGE
from pyOpenRPA import Orchestrator
# EXAMPLE 1
def TestDef(inArg1Str, inGSettings, inLogger):
pass
lActivityItem = Orchestrator.ProcessorActivityItemAppend(
inGSettings = gSettingsDict,
inDef = TestDef,
inArgList=[],
inArgDict={"inArg1Str": "ArgValueStr"},
inArgGSettingsStr = "inGSettings",
inArgLoggerStr = "inLogger")
# Activity have been already append in the processor queue
# EXAMPLE 2
def TestDef(inArg1Str):
pass
Orchestrator.ProcessorAliasDefUpdate(
inGSettings = gSettings,
inDef = TestDef,
inAliasStr="TestDefAlias")
lActivityItem = Orchestrator.ProcessorActivityItemCreate(
inDef = "TestDefAlias",
inArgList=[],
inArgDict={"inArg1Str": "ArgValueStr"},
inArgGSettingsStr = None,
inArgLoggerStr = None)
Orchestrator.ProcessorActivityItemAppend(
inGSettings = gSettingsDict,
inActivityItemDict = lActivityItem)
# Activity have been already append in the processor queue
```
* **Parameters** * **Parameters**
@ -680,24 +776,27 @@ Add Activity item in Processor list
* **inGSettings** Global settings dict (singleton) * **inGSettings** Global settings dict (singleton)
* **inDef** * **inDef** def link or def alias (look gSettings[“Processor”][“AliasDefDict”])
* **inArgList** * **inArgList** Args list for the Def
* **inArgDict** * **inArgDict** Args dict for the Def
* **inArgGSettingsStr** Name of def argument of the GSettings dict
* **inArgGSettingsStr** * **inArgLoggerStr** Name of def argument of the logging object
* **inArgLoggerStr** * **inActivityItemDict** Fill if you already have ActivityItemDict (dont fill inDef, inArgList, inArgDict, inArgGSettingsStr, inArgLoggerStr)
### pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemCreate(inDef, inArgList=None, inArgDict=None, inArgGSettingsStr=None, inArgLoggerStr=None) ### pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemCreate(inDef, inArgList=None, inArgDict=None, inArgGSettingsStr=None, inArgLoggerStr=None)
Create ActivityItem Create activity item. Activity item can be used as list item in ProcessorActivityItemAppend or in Processor.ActivityListExecute.
``` ```
# USAGE # USAGE
@ -1467,8 +1566,4 @@ Return User UAC Hierarchy DICT Return {…}
## References ## References
[reStructuredText](http://docutils.sourceforge.net/rst.html)
```
`Python-sphinx`_
```

@ -1,4 +1,4 @@
# Description # 1. Description
pyOpenRPA Robot is the python package. pyOpenRPA Robot is the python package.

@ -5,7 +5,7 @@ contain the root `toctree` directive. -->
# Welcome to pyOpenRPAs documentation! # Welcome to pyOpenRPAs documentation!
* Description * 1. Description
* pyOpenRPA Robot * pyOpenRPA Robot

Loading…
Cancel
Save