:paraminCloseForceBool:True-doforceclose.False-sendsignaltosafeclose(!ATTENTION!-Safecloseworksonlyinorchestratorsession.WinOSdoens't allow to send safe close signal between GUI sessions)
<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 can’t 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 can’t transmit Python def object out of the Python environment)</p></td>
@ -620,12 +620,19 @@ Create Activity Item for the agent</p>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">ProcessIsStarted</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inProcessNameWOExeStr</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#ProcessIsStarted"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessIsStarted"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">ProcessIsStarted</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inProcessNameWOExeStr</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#ProcessIsStarted"><spanclass="viewcode-link">[source]</span></a><aclass="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>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">ProcessListGet</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inProcessNameWOExeList</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#ProcessListGet"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessListGet"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">ProcessListGet</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inProcessNameWOExeList</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#ProcessListGet"><spanclass="viewcode-link">[source]</span></a><aclass="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>
<spanclass="c1"># Return the list of the process on the machine. !ATTENTION! RUn orchestrator as administrator to get all process list on the machine.</span>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">ProcessStart</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inPathStr</span></em>, <emclass="sig-param"><spanclass="n">inArgList</span></em>, <emclass="sig-param"><spanclass="n">inStopProcessNameWOExeStr</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#ProcessStart"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStart"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">ProcessStart</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inPathStr</span></em>, <emclass="sig-param"><spanclass="n">inArgList</span></em>, <emclass="sig-param"><spanclass="n">inStopProcessNameWOExeStr</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#ProcessStart"><spanclass="viewcode-link">[source]</span></a><aclass="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>
<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>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>None - nothing is returned. If process will not start -exception will be raised</p>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">ProcessStop</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inProcessNameWOExeStr</span></em>, <emclass="sig-param"><spanclass="n">inCloseForceBool</span></em>, <emclass="sig-param"><spanclass="n">inUserNameStr</span><spanclass="o">=</span><spanclass="default_value">'%username%'</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#ProcessStop"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessStop"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-prename descclassname">pyOpenRPA.Orchestrator.__Orchestrator__.</code><codeclass="sig-name descname">ProcessStop</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">inProcessNameWOExeStr</span></em>, <emclass="sig-param"><spanclass="n">inCloseForceBool</span></em>, <emclass="sig-param"><spanclass="n">inUserNameStr</span><spanclass="o">=</span><spanclass="default_value">'%username%'</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html#ProcessStop"><spanclass="viewcode-link">[source]</span></a><aclass="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>
<spanclass="c1"># Will close process "notepad.exe" on the user session "USER_99" (!ATTENTION! if process not exists no exceptions will be raised)</span>
<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 doens’t 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>
<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 (don’t 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>
<spanid="pyopenrpa-robot"></span><h2>pyOpenRPA Robot<aclass="headerlink"href="#module-pyOpenRPA.Robot.UIDesktop"title="Permalink to this headline">¶</a></h2>
<spanid="pyopenrpa-robot"></span><h2>pyOpenRPA Robot<aclass="headerlink"href="#module-pyOpenRPA.Robot.UIDesktop"title="Permalink to this headline">¶</a></h2>
<spanclass="sd"> Create activity item. Activity item can be used as list item in ProcessorActivityItemAppend or in Processor.ActivityListExecute.</span>
<spanclass="sd"> # Activity have been already append in the processor queue</span>
<spanclass="sd"> :param inGSettings: Global settings dict (singleton)</span>
<spanclass="sd"> :param inGSettings: Global settings dict (singleton)</span>
<spanclass="sd"> :param inDef:</span>
<spanclass="sd"> :param inDef: def link or def alias (look gSettings["Processor"]["AliasDefDict"])</span>
<spanclass="sd"> :param inArgList:</span>
<spanclass="sd"> :param inArgList: Args list for the Def</span>
<spanclass="sd"> :param inArgDict:</span>
<spanclass="sd"> :param inArgDict: Args dict for the Def</span>
<spanclass="sd"> :param inArgGSettingsStr:</span>
<spanclass="sd"> :param inArgGSettingsStr: Name of def argument of the GSettings dict</span>
<spanclass="sd"> :param inArgLoggerStr:</span>
<spanclass="sd"> :param inArgLoggerStr: Name of def argument of the logging object</span>
<spanclass="sd"> :param inActivityItemDict: Fill if you already have ActivityItemDict (don't fill inDef, inArgList, inArgDict, inArgGSettingsStr, inArgLoggerStr)</span>
<spanclass="k">if</span><spanclass="n">inDef</span><spanclass="ow">is</span><spanclass="kc">None</span><spanclass="p">:</span><spanclass="k">raise</span><spanclass="ne">Exception</span><spanclass="p">(</span><spanclass="sa">f</span><spanclass="s2">"pyOpenRPA Exception: ProcessorActivityItemAppend need inDef arg if you dont use inActivityItemDict"</span><spanclass="p">)</span>
<spanclass="s2">"Def"</span><spanclass="p">:</span><spanclass="n">inDef</span><spanclass="p">,</span><spanclass="c1"># def link or def alias (look gSettings["Processor"]["AliasDefDict"])</span>
<spanclass="s2">"Def"</span><spanclass="p">:</span><spanclass="n">inDef</span><spanclass="p">,</span><spanclass="c1"># def link or def alias (look gSettings["Processor"]["AliasDefDict"])</span>
<spanclass="s2">"ArgGSettings"</span><spanclass="p">:</span><spanclass="n">inArgGSettingsStr</span><spanclass="p">,</span><spanclass="c1"># Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<spanclass="s2">"ArgLogger"</span><spanclass="p">:</span><spanclass="n">inArgLoggerStr</span><spanclass="c1"># Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<spanclass="s2">"ArgGSettings"</span><spanclass="p">:</span><spanclass="n">inArgGSettingsStr</span><spanclass="p">,</span><spanclass="c1"># Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<spanclass="p">]</span>
<spanclass="s2">"ArgLogger"</span><spanclass="p">:</span><spanclass="n">inArgLoggerStr</span><spanclass="c1"># Name of GSettings attribute: str (ArgDict) or index (for ArgList)</span>
<spanclass="sd"> # lProcessIsStartedBool is True - notepad.exe is running on the Orchestrator machine</span>
<spanclass="sd"> :param inProcessNameWOExeStr: Process name WithOut (WO) '.exe' postfix. Example: "notepad" (not "notepad.exe")</span>
<spanclass="sd"> :return: True - process is running on the orchestrator machine; False - process is not running on the orchestrator machine</span>
<spanclass="sd">"""</span>
<spanclass="sd">"""</span>
<spanclass="c1">#Iterate over the all the running process</span>
<spanclass="c1">#Iterate over the all the running process</span>
<spanclass="sd"> # notepad.exe will be started if no notepad.exe is active on the machine</span>
<spanclass="sd"> :param inPathStr: Command to send in CMD</span>
<spanclass="sd"> :param inArgList: List of the arguments for the CMD command. Example: ["test.txt"]</span>
<spanclass="sd"> :param inStopProcessNameWOExeStr: Trigger: stop execution if process is running. Process name WithOut (WO) '.exe' postfix. Example: "notepad" (not "notepad.exe")</span>
<spanclass="sd"> :return: None - nothing is returned. If process will not start -exception will be raised</span>
<spanclass="k">if</span><spanclass="n">inStopProcessNameWOExeStr</span><spanclass="ow">is</span><spanclass="ow">not</span><spanclass="kc">None</span><spanclass="p">:</span><spanclass="c1">#Check if process running</span>
<spanclass="k">if</span><spanclass="n">inStopProcessNameWOExeStr</span><spanclass="ow">is</span><spanclass="ow">not</span><spanclass="kc">None</span><spanclass="p">:</span><spanclass="c1">#Check if process running</span>
@ -917,17 +977,29 @@
<spanclass="k">if</span><spanclass="n">lStartProcessBool</span><spanclass="o">==</span><spanclass="kc">True</span><spanclass="p">:</span><spanclass="c1"># Start if flag is true</span>
<spanclass="k">if</span><spanclass="n">lStartProcessBool</span><spanclass="o">==</span><spanclass="kc">True</span><spanclass="p">:</span><spanclass="c1"># Start if flag is true</span>
<spanclass="sd"> # Will close process "notepad.exe" on the user session "USER_99" (!ATTENTION! if process not exists no exceptions will be raised)</span>
<spanclass="sd"> :param inProcessNameWOExeStr: Process name WithOut (WO) '.exe' postfix. Example: "notepad" (not "notepad.exe")</span>
<spanclass="sd"> :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)</span>
<spanclass="sd"> :param inUserNameStr: User name which is has current process to close. Default value is close process on the Orchestrator session</span>
<spanclass="sd"> :return: None</span>
<spanclass="sd">"""</span>
<spanclass="sd">"""</span>
<spanclass="c1"># Support input arg if with .exe</span>
<spanclass="c1"># Support input arg if with .exe</span>
<spanclass="sd"> Check activity of the list of processes</span>
<spanclass="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>
<spanclass="sd"> .. code-block:: python</span>
<spanclass="sd"> # USAGE</span>
<spanclass="sd"> from pyOpenRPA import Orchestrator</span>
<spanclass="sd"> # Return the list of the process on the machine. !ATTENTION! RUn orchestrator as administrator to get all process list on the machine.</span>
<spanclass="n">lResult</span><spanclass="p">[</span><spanclass="s2">"ProcessDetailList"</span><spanclass="p">]</span><spanclass="o">.</span><spanclass="n">append</span><spanclass="p">(</span><spanclass="n">pinfo</span><spanclass="p">)</span><spanclass="c1"># Append dict to list</span>
<spanclass="n">lResult</span><spanclass="p">[</span><spanclass="s2">"ProcessDetailList"</span><spanclass="p">]</span><spanclass="o">.</span><spanclass="n">append</span><spanclass="p">(</span><spanclass="n">pinfo</span><spanclass="p">)</span><spanclass="c1"># Append dict to list</span>
| 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 can’t 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 can’t transmit Python def object out of the Python environment)
@ -602,21 +602,37 @@ Orchestrator session save in file _SessionLast_RDPList.json (encoding = “utf-8
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** – Trigger: stop execution if process is running. Process name WithOut (WO) ‘.exe’ postfix. Example: “notepad” (not “notepad.exe”)
* **inStopProcessNameWOExeStr** –
* **Returns**
None - nothing is returned. If process will not start -exception will be raised
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 doens’t 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