Minor fixes

dev-linux
Ivan Maslov 4 years ago
parent 380929942c
commit fe81192d4f

@ -1,5 +1,5 @@
# 1.2.0 - general processor - contains old orchestrator processor + RDPActive processor
import time, copy, threading
import time, copy, threading, uuid
# Run processor synchronious
# inThreadControlDict = {"ThreadExecuteBool":True}
def ProcessorRunSync(inGSettings, inRobotRDPThreadControlDict):
@ -115,6 +115,9 @@ def ProcessorMonitorRunSync(inGSettings):
while True:
if len(inGSettings["ProcessorDict"]["ActivityList"])>0:
lItemDict = inGSettings["ProcessorDict"]["ActivityList"][0]
if "GUIDStr" not in lItemDict:
lGUIDStr = str(uuid.uuid4()) # generate new GUID
lItemDict["GUIDStr"] = lGUIDStr
# Check if GUID is identical
if lItemDict["GUIDStr"]==lActiveGUIDStr:
# Check time

@ -851,6 +851,7 @@ def ProcessorActivityItemAppend(inGSettings, inDef=None, inArgList=None, inArgDi
:param inArgGSettingsStr: Name of def argument of the GSettings dict
: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)
:return ActivityItem GUIDStr
"""
if inActivityItemDict is None:
if inArgList is None: inArgList=[]
@ -868,14 +869,15 @@ def ProcessorActivityItemAppend(inGSettings, inDef=None, inArgList=None, inArgDi
else:
lActivityList = [inActivityItemDict]
# Work about GUID in Activity items
lGUIDStr = None
for lItemDict in lActivityList:
# Add GUIDStr if not exist
lGUIDStr = None
if "GUIDStr" not in lItemDict:
lGUIDStr = str(uuid.uuid4()) # generate new GUID
lItemDict["GUIDStr"] = lGUIDStr
# Add activity list in ProcessorDict
inGSettings["ProcessorDict"]["ActivityList"]+=lActivityList
return lGUIDStr
## Process defs
def ProcessIsStarted(inProcessNameWOExeStr): # Check if process is started

@ -990,6 +990,7 @@
</ul>
</dd>
</dl>
<p>:return ActivityItem GUIDStr</p>
</dd></dl>
<dl class="py function">

@ -1032,6 +1032,7 @@
<span class="sd"> :param inArgGSettingsStr: Name of def argument of the GSettings dict</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"> :return ActivityItem GUIDStr</span>
<span class="sd"> &quot;&quot;&quot;</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">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>
@ -1049,14 +1050,15 @@
<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="c1"># Work about GUID in Activity items</span>
<span class="n">lGUIDStr</span> <span class="o">=</span> <span class="kc">None</span>
<span class="k">for</span> <span class="n">lItemDict</span> <span class="ow">in</span> <span class="n">lActivityList</span><span class="p">:</span>
<span class="c1"># Add GUIDStr if not exist</span>
<span class="n">lGUIDStr</span> <span class="o">=</span> <span class="kc">None</span>
<span class="k">if</span> <span class="s2">&quot;GUIDStr&quot;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">lItemDict</span><span class="p">:</span>
<span class="n">lGUIDStr</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">uuid</span><span class="o">.</span><span class="n">uuid4</span><span class="p">())</span> <span class="c1"># generate new GUID</span>
<span class="n">lItemDict</span><span class="p">[</span><span class="s2">&quot;GUIDStr&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">lGUIDStr</span>
<span class="c1"># Add activity list in ProcessorDict</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>
<span class="k">return</span> <span class="n">lGUIDStr</span></div>
<span class="c1">## Process defs</span>
<div class="viewcode-block" id="ProcessIsStarted"><a class="viewcode-back" href="../../../Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.ProcessIsStarted">[docs]</a><span class="k">def</span> <span class="nf">ProcessIsStarted</span><span class="p">(</span><span class="n">inProcessNameWOExeStr</span><span class="p">):</span> <span class="c1"># Check if process is started</span>

File diff suppressed because one or more lines are too long

@ -1054,6 +1054,8 @@ Orchestrator.ProcessorActivityItemAppend(
* **inActivityItemDict** Fill if you already have ActivityItemDict (dont fill inDef, inArgList, inArgDict, inArgGSettingsStr, inArgLoggerStr)
:return ActivityItem GUIDStr
### pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemCreate(inDef, inArgList=None, inArgDict=None, inArgGSettingsStr=None, inArgLoggerStr=None, inGUIDStr=None)
Create activity item. Activity item can be used as list item in ProcessorActivityItemAppend or in Processor.ActivityListExecute.

Loading…
Cancel
Save