def ProcessorActivityItemCreate(inDef, inArgList=None, inArgDict=None, inArgGSettingsStr=None, inArgLoggerStr=None): # Create ActivityItem # return dict

def ProcessorAliasDefUpdate(inGSettings=inGSettings, inDef=inDef, inAliasStr=lDefAliasStr)

# Create HTMLLink by the def, argdict, arglist, gsettingsStr, logger Str titleStr, color, (execute permanently)
def HTMLLinkDefExecute(inGSettings, inDef, inArgDict=None, inArgList=None, inArgGSettingsStr="", inArgLoggerStr="", inLinkTitleStr=None, inLinkColorStr=""):

# Create HTMLLink by the def, argdict, arglist, gsettingsStr, logger Str titleStr, color, (add in processor queue)
def HTMLLinkDefProcessor(inGSettings, inDef, inArgDict=None, inArgList=None, inArgGSettingsStr="", inArgLoggerStr="", inLinkTitleStr=None, inLinkColorStr=""):
dev-linux
Ivan Maslov 4 years ago
parent d9cd7b0581
commit 73cee5e46f

@ -25,7 +25,8 @@ def ProcessorRunSync(inGSettings):
if lL: lL.debug(f'Processor ActivityList len: {len(lActivityList)}') if lL: lL.debug(f'Processor ActivityList len: {len(lActivityList)}')
lActivityItem = inGSettings["ProcessorDict"]["ActivityList"].pop(0) # Extract the first item from processor queue lActivityItem = inGSettings["ProcessorDict"]["ActivityList"].pop(0) # Extract the first item from processor queue
ActivityListExecute(inGSettings = inGSettings, inActivityList = [lActivityItem]) # execute the activity item ActivityListExecute(inGSettings = inGSettings, inActivityList = [lActivityItem]) # execute the activity item
time.sleep(inGSettings["ProcessorDict"]["CheckIntervalSecFloat"]) # Sleep when list is empty else:
time.sleep(inGSettings["ProcessorDict"]["CheckIntervalSecFloat"]) # Sleep when list is empty
# Execute ActivityItem list # Execute ActivityItem list
# return the def result # return the def result

@ -1,4 +1,5 @@
import json import json
from .. import __Orchestrator__
# Escape JS to the safe JS for the inline JS in HTML tags ATTENTION! Use it only if want to paste JS into HTML tag - not in <script> # Escape JS to the safe JS for the inline JS in HTML tags ATTENTION! Use it only if want to paste JS into HTML tag - not in <script>
# USAGE: JSEscapeForHTMLInline(inJSStr="lTest=\"Hello World\"; alert(\"lTest\")") # USAGE: JSEscapeForHTMLInline(inJSStr="lTest=\"Hello World\"; alert(\"lTest\")")
def JSEscapeForHTMLInline(inJSStr): def JSEscapeForHTMLInline(inJSStr):
@ -39,6 +40,27 @@ def HTMLLinkJSOnClick(inJSOnClickStr, inTitleStr, inColorStr=None):
lResult=f"<a {lCSSStyleStr} onclick=\"{inJSOnClickStr}\">{inTitleStr}</a>" lResult=f"<a {lCSSStyleStr} onclick=\"{inJSOnClickStr}\">{inTitleStr}</a>"
return lResult return lResult
# Create HTMLLink by the def, argdict, arglist, gsettingsStr, logger Str titleStr, color, (add in processor queue)
def HTMLLinkDefProcessor(inGSettings, inDef, inArgDict=None, inArgList=None, inArgGSettingsStr="", inArgLoggerStr="", inLinkTitleStr=None, inLinkColorStr=""):
lDefAliasStr = inDef
if callable(inDef): lDefAliasStr = str(inDef)
if inLinkTitleStr is None: inLinkTitleStr = lDefAliasStr
lDefAliasStr=__Orchestrator__.ProcessorAliasDefUpdate(inGSettings=inGSettings, inDef=inDef, inAliasStr=lDefAliasStr)
lActivityList = [__Orchestrator__.ProcessorActivityItemCreate(inDef=lDefAliasStr,inArgList=inArgList,inArgDict=inArgDict,inArgGSettingsStr=inArgGSettingsStr,inArgLoggerStr=inArgLoggerStr)]
lJSStr = JSProcessorActivityListAdd(lActivityList)
lHTMLStr = HTMLLinkJSOnClick(inJSOnClickStr=lJSStr,inTitleStr=inLinkTitleStr, inColorStr=inLinkColorStr)
return lHTMLStr
# Create HTMLLink by the def, argdict, arglist, gsettingsStr, logger Str titleStr, color, (execute permanently)
def HTMLLinkDefExecute(inGSettings, inDef, inArgDict=None, inArgList=None, inArgGSettingsStr="", inArgLoggerStr="", inLinkTitleStr=None, inLinkColorStr=""):
lDefAliasStr = inDef
if callable(inDef): lDefAliasStr = str(inDef)
if inLinkTitleStr is None: inLinkTitleStr = lDefAliasStr
lDefAliasStr=__Orchestrator__.ProcessorAliasDefUpdate(inGSettings=inGSettings, inDef=inDef, inAliasStr=lDefAliasStr)
lActivityList = [__Orchestrator__.ProcessorActivityItemCreate(inDef=lDefAliasStr,inArgList=inArgList,inArgDict=inArgDict,inArgGSettingsStr=inArgGSettingsStr,inArgLoggerStr=inArgLoggerStr)]
lJSStr = JSActivityListExecute(lActivityList)
lHTMLStr = HTMLLinkJSOnClick(inJSOnClickStr=lJSStr,inTitleStr=inLinkTitleStr, inColorStr=inLinkColorStr)
return lHTMLStr
# HTML Generator for the CP up to v.1.2.0 # HTML Generator for the CP up to v.1.2.0
def HTMLControlPanelBC(inCPDict): def HTMLControlPanelBC(inCPDict):

@ -359,6 +359,27 @@ def ProcessorAliasDefCreate(inGSettings, inDef, inAliasStr=None):
if lL: lL.warning(f"Orchestrator.ProcessorAliasDefCreate: Alias {inAliasStr} already exists in alias dictionary. Another alias will be generated and returned") if lL: lL.warning(f"Orchestrator.ProcessorAliasDefCreate: Alias {inAliasStr} already exists in alias dictionary. Another alias will be generated and returned")
inGSettings["ProcessorDict"]["AliasDefDict"][inAliasStr] = inDef inGSettings["ProcessorDict"]["AliasDefDict"][inAliasStr] = inDef
return inAliasStr return inAliasStr
# Update alias for def (can be used in ActivityItem in field Def)
# return Alias str
def ProcessorAliasDefUpdate(inGSettings, inDef, inAliasStr):
inGSettings["ProcessorDict"]["AliasDefDict"][inAliasStr] = inDef
return inAliasStr
# Create ActivityItem
# return dict
def ProcessorActivityItemCreate(inDef, inArgList=None, inArgDict=None, inArgGSettingsStr=None, inArgLoggerStr=None):
if inArgList is None: inArgList=[]
if inArgDict is None: inArgDict={}
lActivityItemDict= {
"Def":inDef, # def link or def alias (look gSettings["Processor"]["AliasDefDict"])
"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)
}
return lActivityItemDict
# Add Activity item in Processor list # Add Activity item in Processor list
def ProcessorActivityItemAppend(inGSettings, inDef, inArgList=None, inArgDict=None, inArgGSettingsStr=None, inArgLoggerStr=None): def ProcessorActivityItemAppend(inGSettings, inDef, inArgList=None, inArgDict=None, inArgGSettingsStr=None, inArgLoggerStr=None):
if inArgList is None: inArgList=[] if inArgList is None: inArgList=[]

@ -116,8 +116,15 @@
- ORC Defs - ORC Defs
def JSActivityListExecute(inActivityList): # Create JS for execute activity list/ activity permanent # USAGE: Orchestrator.Web.Basic.JSActivityListExecute(inActivityList) def JSActivityListExecute(inActivityList): # Create JS for execute activity list/ activity permanent # USAGE: Orchestrator.Web.Basic.JSActivityListExecute(inActivityList)
def JSProcessorActivityListAdd(inActivityList): # Create JS for send activity list/ activity to the processor # USAGE: Orchestrator.Web.Basic.JSProcessorActivityListAdd(inActivityList) def JSProcessorActivityListAdd(inActivityList): # Create JS for send activity list/ activity to the processor # USAGE: Orchestrator.Web.Basic.JSProcessorActivityListAdd(inActivityList)
def ProcessorActivityItemCreate(inDef, inArgList=None, inArgDict=None, inArgGSettingsStr=None, inArgLoggerStr=None): # Create ActivityItem # return dict
def ProcessorAliasDefUpdate(inGSettings=inGSettings, inDef=inDef, inAliasStr=lDefAliasStr)
# Create HTMLLink by the def, argdict, arglist, gsettingsStr, logger Str titleStr, color, (execute permanently)
def HTMLLinkDefExecute(inGSettings, inDef, inArgDict=None, inArgList=None, inArgGSettingsStr="", inArgLoggerStr="", inLinkTitleStr=None, inLinkColorStr=""):
# Create HTMLLink by the def, argdict, arglist, gsettingsStr, logger Str titleStr, color, (add in processor queue)
def HTMLLinkDefProcessor(inGSettings, inDef, inArgDict=None, inArgList=None, inArgGSettingsStr="", inArgLoggerStr="", inLinkTitleStr=None, inLinkColorStr=""):
[1.1.0] [1.1.0]
After 2 month test prefinal with new improovements (+RobotRDPActive in Orchestrator + Easy ControlPanelTemplate) After 2 month test prefinal with new improovements (+RobotRDPActive in Orchestrator + Easy ControlPanelTemplate)
Beta before 1.1.0 (new way of OpenRPA with improvements. Sorry, but no backward compatibility)/ Backward compatibility will start from 1.0.1 Beta before 1.1.0 (new way of OpenRPA with improvements. Sorry, but no backward compatibility)/ Backward compatibility will start from 1.0.1

Loading…
Cancel
Save