- def ProcessorAliasDefCreate(inGSettings, inDef, inAliasStr=None): # Create alias for def (can be used in ActivityItem in field Def)

- WEB
    /// Add ActivityList in processor queue
    mGlobal.pyOpenRPA.ProcessorQueueAdd=function(inActivityList) {

    /// Execute ActivityList
    mGlobal.pyOpenRPA.ActivityListExecute=function(inActivityList) {

- ORC Defs
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)
dev-linux
Ivan Maslov 4 years ago
parent e6945b4a2a
commit 1d12d59e8c

@ -422,7 +422,7 @@ def SettingsUpdate(inGlobalConfiguration):
{"Method": "GET", "URL": "/pyOpenRPA/ServerJSInit", "MatchType": "Equal","ResponseDefRequestGlobal": pyOpenRPA_ServerJSInit, "ResponseContentType": "application/javascript"},
{"Method": "POST", "URL": "/pyOpenRPA/ServerLog", "MatchType": "Equal","ResponseDefRequestGlobal": pyOpenRPA_ServerLog, "ResponseContentType": "application/json"},
{"Method": "GET", "URL": "/pyOpenRPA/Screenshot", "MatchType": "BeginWith", "ResponseDefRequestGlobal": pyOpenRPA_Screenshot, "ResponseContentType": "image/png"},
{"Method": "POST", "URL": "/pyOpenRPA/Processor", "MatchType": "Equal","ResponseDefRequestGlobal": pyOpenRPA_Processor, "ResponseContentType": "application/json"},
{"Method": "POST", "URL": "/pyOpenRPA/ProcessorQueueAdd", "MatchType": "Equal","ResponseDefRequestGlobal": pyOpenRPA_Processor, "ResponseContentType": "application/json"},
{"Method": "POST", "URL": "/pyOpenRPA/ActivityListExecute", "MatchType": "Equal","ResponseDefRequestGlobal": pyOpenRPA_ActivityListExecute, "ResponseContentType": "application/json"},
{"Method": "POST", "URL": "/pyOpenRPA/Agent/O2A", "MatchType": "Equal","ResponseDefRequestGlobal": pyOpenRPA_Agent_O2A, "ResponseContentType": "application/json"},
{"Method": "POST", "URL": "/pyOpenRPA/Agent/A2O", "MatchType": "Equal","ResponseDefRequestGlobal": pyOpenRPA_Agent_A2O, "ResponseContentType": "application/json"},

@ -1,10 +1,24 @@
import json
# 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\")")
def JSEscapeForHTMLInline(inJSStr):
lResult = inJSStr.replace("\"","&quot;")
return lResult
# Create JS for send activity list/ activity to the processor
# USAGE: Orchestrator.Web.Basic.JSProcessorActivityListAdd(inActivityList)
def JSProcessorActivityListAdd(inActivityList):
if type(inActivityList) is not list: inActivityList = [inActivityList]
lJSStr = f"""mGlobal.pyOpenRPA.ProcessorQueueAdd({json.dumps(inActivityList)});"""
return lJSStr
# Create JS for execute activity list/ activity permanent
# USAGE: Orchestrator.Web.Basic.JSActivityListExecute(inActivityList)
def JSActivityListExecute(inActivityList):
if type(inActivityList) is not list: inActivityList = [inActivityList]
lJSStr = f"""mGlobal.pyOpenRPA.ActivityListExecute({json.dumps(inActivityList)});"""
return lJSStr
# Generate HTML code of the simple URL link by the URL
# USAGE: Orchestrator.Web.Basic.HTMLLinkURL(inURLStr="test",inColorStr="orange")
# USAGE: Basic.HTMLLinkURL(inURLStr="test",inColorStr="orange")

@ -390,6 +390,56 @@ $(document).ready(function() {
dataType: "text"
});
}
/// Execute ActivityList
mGlobal.pyOpenRPA.ActivityListExecute=function(inActivityList) {
///EXAMPLE
// [{
// "Def":"OSCMD", // def link or def alias (look gSettings["Processor"]["AliasDefDict"])
// "ArgList":[], // Args list
// "ArgDict":{"inCMDStr":lCMDCode,"inRunAsyncBool":false}, // Args dictionary
// "ArgGSettings": null, // Name of GSettings attribute: str (ArgDict) or index (for ArgList)
// "ArgLogger": "inLogger" // Name of GSettings attribute: str (ArgDict) or index (for ArgList)
// }]
///Подготовить конфигурацию
lData = inActivityList
$.ajax({
type: "POST",
url: '/pyOpenRPA/ActivityListExecute',
data: JSON.stringify(lData),
success:
function(lData,l2,l3)
{
var lResponseJSON=JSON.parse(lData)
console.log(lResponseJSON)
},
dataType: "text"
});
}
/// Add ActivityList in processor queue
mGlobal.pyOpenRPA.ProcessorQueueAdd=function(inActivityList) {
///EXAMPLE
// [{
// "Def":"OSCMD", // def link or def alias (look gSettings["Processor"]["AliasDefDict"])
// "ArgList":[], // Args list
// "ArgDict":{"inCMDStr":lCMDCode,"inRunAsyncBool":false}, // Args dictionary
// "ArgGSettings": null, // Name of GSettings attribute: str (ArgDict) or index (for ArgList)
// "ArgLogger": "inLogger" // Name of GSettings attribute: str (ArgDict) or index (for ArgList)
// }]
///Подготовить конфигурацию
lData = inActivityList
$.ajax({
type: "POST",
url: '/pyOpenRPA/ProcessorQueueAdd',
data: JSON.stringify(lData),
success:
function(lData,l2,l3)
{
var lResponseJSON=JSON.parse(lData)
console.log(lResponseJSON)
},
dataType: "text"
});
}
/// v1.2.0 pyOpenRPA ServerJSInit
mGlobal.pyOpenRPA.ServerJSInitDef=function() {

@ -348,6 +348,16 @@ def GSettingsKeyListValueOperatorPlus(inGSettings, inValue, inKeyList=None): # O
lDict[inKeyList[-1]] += inValue #Set value
return True
# Create alias for def (can be used in ActivityItem in field Def)
def ProcessorAliasDefCreate(inGSettings, inDef, inAliasStr=None):
lL = inGSettings["Logger"]
if inAliasStr is None: inAliasStr = str(inDef)
# Check if key is not exists
if inAliasStr not in inGSettings["ProcessorDict"]["AliasDefDict"]:
inGSettings["ProcessorDict"]["AliasDefDict"][inAliasStr]=inDef
else:
if lL: lL.warning(f"Orchestrator.ProcessorAliasDefCreate: Alias {inAliasStr} already exists in Alias dictionary.")
# Add Activity item in Processor list
def ProcessorActivityItemAppend(inGSettings, inDef, inArgList=None, inArgDict=None, inArgGSettingsStr=None, inArgLoggerStr=None):
if inArgList is None: inArgList=[]

@ -106,7 +106,18 @@
- def WebUserIsSuperToken(inRequest, inGSettings): # Return bool if request is authentificated with supetoken (token which is never expires)
- def ProcessorAliasDefCreate(inGSettings, inDef, inAliasStr=None): # Create alias for def (can be used in ActivityItem in field Def)
- WEB
/// Add ActivityList in processor queue
mGlobal.pyOpenRPA.ProcessorQueueAdd=function(inActivityList) {
/// Execute ActivityList
mGlobal.pyOpenRPA.ActivityListExecute=function(inActivityList) {
- ORC Defs
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)
[1.1.0]
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

Loading…
Cancel
Save