diff --git a/Wiki/ENG_Guide/html/_sources/Orchestrator/Orchestrator.rst.txt b/Sources/GuideSphinx/Orchestrator/01_Orchestrator.rst similarity index 70% rename from Wiki/ENG_Guide/html/_sources/Orchestrator/Orchestrator.rst.txt rename to Sources/GuideSphinx/Orchestrator/01_Orchestrator.rst index b94fc25c..6004515a 100644 --- a/Wiki/ENG_Guide/html/_sources/Orchestrator/Orchestrator.rst.txt +++ b/Sources/GuideSphinx/Orchestrator/01_Orchestrator.rst @@ -1,6 +1,6 @@ -************************ -Description -************************ +#################################### +1. Description +#################################### pyOpenRPA Orchestrator is the executable process. @@ -9,8 +9,9 @@ The features of the orchestrator is: - Automatized robots control (customized algorithms, robots scheduling) - Source code mega flexibility: Light Orchestrator architecture is good for own customization +************************************ Global settings dict concept -################################## +************************************ pyOpenRPA project is complex tool which consist of several executable modules such as Robot, Orchestrator, Studio, Because of module compexity, we use 1 init arg - inGSettings @@ -18,9 +19,9 @@ inGSettings is a complex dictionary which has all reqired parameters for the mod The description of the GSettings you can find in executable module details. - +************************************ Orchestrator how to configure -################################## +************************************ To init pyOpenRPA Orchestrator instance use script: @@ -31,12 +32,10 @@ Orchestrator.Orchestrator(inGSettings=gSettings) # Call the orchestrator def gSettings structure -:ref:`gSettingsTemplate`. - - +************************************ Orchestrator architecture -################################## +************************************ Orchestrator has several source code components: - User/robot activity consolidated queue single thread (Processor) - User/robot activity asynchonus many threads (Processor) @@ -49,16 +48,19 @@ Orchestrator has several source code components: Below you can find more information about all of the component. +*************************** Component Processor -################################## +*************************** Sync - Append activity list to consolidated processor queue. Execution goes sequency by the activity list order Async - Create New thread to execute the activity list - Activity list -Liast of the activity item + +List of the activity item - Activity item + Activity item is universal mechanism to execute different algorythms from any sources. The core feature of the Activity is to call python defs with args and kwargs. If you need to init do some activity you can write some python def, then create Activity item with current def. @@ -66,16 +68,23 @@ ATTENTION: In some cases (such as web transmition), when you can't transmit pyth ?Why i cant transmit python def from the web Because the WEB space is not the Python executable space. Interaction between it spaces create by JSON protocol. So, we know than JSON apply int, float, str, bool, None, list, dict - that is all. -{ - "Def":"DefAliasTest", # def link or def alias (look gSettings["Processor"]["AliasDefDict"]) - "ArgList":[1,2,3], # Args list - "ArgDict":{"ttt":1,"222":2,"dsd":3}, # Args dictionary - "ArgGSettings": None # Name of GSettings attribute: str (ArgDict) or index (for ArgList) - "ArgLogger": None # Name of GSettings attribute: str (ArgDict) or index (for ArgList) -}# Pay attention! Do not left comma symbol after the end of the dict - it can be interpretated like a turple.. - - -pyOpenRPA Orchestrator -################################## -.. automodule:: pyOpenRPA.Orchestrator.__Orchestrator__ - :members: \ No newline at end of file + +.. note:: + Example + { + "Def":"DefAliasTest", # def link or def alias (look gSettings["Processor"]["AliasDefDict"]) + "ArgList":[1,2,3], # Args list + "ArgDict":{"ttt":1,"222":2,"dsd":3}, # Args dictionary + "ArgGSettings": None # Name of GSettings attribute: str (ArgDict) or index (for ArgList) + "ArgLogger": None # Name of GSettings attribute: str (ArgDict) or index (for ArgList) + }# Pay attention! Do not left comma symbol after the end of the dict - it can be interpretated like a turple.. + + +********** +References +********** + +`Python-sphinx`_ + +.. target-notes:: +.. _`reStructuredText`: http://docutils.sourceforge.net/rst.html diff --git a/Sources/GuideSphinx/Orchestrator/02_Defs.rst b/Sources/GuideSphinx/Orchestrator/02_Defs.rst new file mode 100644 index 00000000..2be63177 --- /dev/null +++ b/Sources/GuideSphinx/Orchestrator/02_Defs.rst @@ -0,0 +1,32 @@ +#################################### +2. Defs +#################################### + +************************************************** +pyOpenRPA.Orchestrator.__Orchestrator__ +************************************************** + +.. code-block:: python + + # EXAMPLE 1 + from pyOpenRPA import Orchestrator + Orchestrator.OSCMD(inCMDStr = "git status", inRunAsyncBool=True) + + # EXAMPLE 2 + from pyOpenRPA.Orchestrator import __Orchestrator__ + __Orchestrator__.OSCMD(inCMDStr = "git status", inRunAsyncBool=True) + + + +.. automodule:: pyOpenRPA.Orchestrator.__Orchestrator__ + :members: + + +********** +References +********** + +`Python-sphinx`_ + +.. target-notes:: +.. _`reStructuredText`: http://docutils.sourceforge.net/rst.html diff --git a/Sources/GuideSphinx/Orchestrator/gSettingsTemplate.rst b/Sources/GuideSphinx/Orchestrator/03_gSettingsTemplate.rst similarity index 82% rename from Sources/GuideSphinx/Orchestrator/gSettingsTemplate.rst rename to Sources/GuideSphinx/Orchestrator/03_gSettingsTemplate.rst index a99645f5..4efe8d47 100644 --- a/Sources/GuideSphinx/Orchestrator/gSettingsTemplate.rst +++ b/Sources/GuideSphinx/Orchestrator/03_gSettingsTemplate.rst @@ -1,6 +1,6 @@ .. _gSettingsTemplate: ************************ -gSettings Template +3. gSettings Template ************************ gSettings structure diff --git a/Sources/GuideSphinx/Orchestrator/HowToStart.rst b/Sources/GuideSphinx/Orchestrator/04_HowToStart.rst similarity index 89% rename from Sources/GuideSphinx/Orchestrator/HowToStart.rst rename to Sources/GuideSphinx/Orchestrator/04_HowToStart.rst index e704cc56..66e056d7 100644 --- a/Sources/GuideSphinx/Orchestrator/HowToStart.rst +++ b/Sources/GuideSphinx/Orchestrator/04_HowToStart.rst @@ -1,5 +1,5 @@ ************************ -How to start +4. How to start ************************ Start configuration example diff --git a/Sources/GuideSphinx/conf.py b/Sources/GuideSphinx/conf.py index c2a7a4b2..2b8ef4ca 100644 --- a/Sources/GuideSphinx/conf.py +++ b/Sources/GuideSphinx/conf.py @@ -31,7 +31,7 @@ release = 'v1.2.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = ['sphinx.ext.todo', 'sphinx.ext.viewcode', 'sphinx.ext.autodoc', "sphinx_rtd_theme",] +extensions = ['sphinx.ext.todo', 'sphinx.ext.viewcode', 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', "sphinx_rtd_theme",] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/Sources/GuideSphinx/index.rst b/Sources/GuideSphinx/index.rst index d91941ab..81357a57 100644 --- a/Sources/GuideSphinx/index.rst +++ b/Sources/GuideSphinx/index.rst @@ -10,7 +10,6 @@ Welcome to pyOpenRPA's documentation! :maxdepth: 2 :caption: GENERAL :glob: - :titlesonly: * @@ -18,7 +17,6 @@ Welcome to pyOpenRPA's documentation! :maxdepth: 2 :caption: ROBOT :glob: - :titlesonly: Robot/* @@ -26,14 +24,12 @@ Welcome to pyOpenRPA's documentation! :maxdepth: 2 :caption: STUDIO :glob: - :titlesonly: Studio/* .. toctree:: - :maxdepth: 2 + :maxdepth: 3 :caption: ORCHESTRATOR :glob: - :titlesonly: Orchestrator/* \ No newline at end of file diff --git a/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py b/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py index 710ea456..0d2f269a 100644 --- a/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py +++ b/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py @@ -31,6 +31,11 @@ def AgentActivityItemAdd(inGSettings, inHostNameStr, inUserStr, inActivityItemDi """ Add activity in AgentDict. Check if item is created + .. code-block:: python + + # USAGE + import this + :param inGSettings: Global settings dict (singleton) :param inHostNameStr: Agent host name :param inUserStr: User login, where agent is based @@ -480,9 +485,27 @@ def GSettingsKeyListValueAppend(inGSettings, inValue, inKeyList=None): """ Append value in GSettings by the key list + .. code-block:: python + + # USAGE + from pyOpenRPA import Orchestrator + + Orchestrator.GSettingsKeyListValueAppend( + inGSettings = gSettings, + inValue = "NewValue", + inKeyList=["NewKeyDict","NewKeyList"]): + # result inGSettings: { + # ... another keys in gSettings ..., + # "NewKeyDict":{ + # "NewKeyList":[ + # "NewValue" + # ] + # } + #} + :param inGSettings: Global settings dict (singleton) - :param inValue: - :param inKeyList: + :param inValue: Any value to be appended in gSettings Dict by the key list + :param inKeyList: List of the nested keys (see example) :return: True every time """ if inKeyList is None: inKeyList = [] @@ -499,11 +522,32 @@ def GSettingsKeyListValueAppend(inGSettings, inValue, inKeyList=None): def GSettingsKeyListValueOperatorPlus(inGSettings, inValue, inKeyList=None): """ - Operator plus value in GSettings by the key list + Execute plus operation between 2 lists (1:inValue and 2:gSettings by the inKeyList) + + .. code-block:: python + + # USAGE + from pyOpenRPA import Orchestrator + + Orchestrator.GSettingsKeyListValueOperatorPlus( + inGSettings = gSettings, + inValue = [1,2,3], + inKeyList=["NewKeyDict","NewKeyList"]): + # result inGSettings: { + # ... another keys in gSettings ..., + # "NewKeyDict":{ + # "NewKeyList":[ + # "NewValue", + # 1, + # 2, + # 3 + # ] + # } + #} :param inGSettings: Global settings dict (singleton) - :param inValue: - :param inKeyList: + :param inValue: List with values to be merged with list in gSettings + :param inKeyList: List of the nested keys (see example) :return: True every time """ if inKeyList is None: inKeyList = [] @@ -521,12 +565,27 @@ def GSettingsKeyListValueOperatorPlus(inGSettings, inValue, inKeyList=None): def ProcessorAliasDefCreate(inGSettings, inDef, inAliasStr=None): """ 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) + + .. code-block:: python + + # USAGE + from pyOpenRPA import Orchestrator + + def TestDef(): + pass + lAliasStr = Orchestrator.ProcessorAliasDefCreate( + inGSettings = gSettings, + inDef = TestDef, + inAliasStr="TestDefAlias") + # Now you can call TestDef by the alias from var lAliasStr with help of ActivityItem (key Def = lAliasStr) :param inGSettings: Global settings dict (singleton) - :param inDef: - :param inAliasStr: - :return: str Alias + :param inDef: Def + :param inAliasStr: String alias for associated def + :return: str Alias string (Alias can be regenerated if previous alias was occupied) """ + #TODO Pay attention - New alias can be used too - need to create more complex algorythm to create new alias! lL = inGSettings["Logger"] if inAliasStr is None: inAliasStr = str(inDef) # Check if key is not exists @@ -538,12 +597,26 @@ def ProcessorAliasDefCreate(inGSettings, inDef, inAliasStr=None): def ProcessorAliasDefUpdate(inGSettings, inDef, inAliasStr): """ - Update alias for def (can be used in ActivityItem in field Def) + Update 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) + + .. code-block:: python + + # USAGE + from pyOpenRPA import Orchestrator + + def TestDef(): + pass + Orchestrator.ProcessorAliasDefUpdate( + inGSettings = gSettings, + inDef = TestDef, + inAliasStr="TestDefAlias") + # Now you can call TestDef by the alias "TestDefAlias" with help of ActivityItem (key Def = "TestDefAlias") :param inGSettings: Global settings dict (singleton) - :param inDef: - :param inAliasStr: - :return: str Alias + :param inDef: Def + :param inAliasStr: String alias for associated def + :return: str Alias string """ if callable(inDef): inGSettings["ProcessorDict"]["AliasDefDict"][inAliasStr] = inDef else: raise Exception(f"pyOpenRPA Exception: You can't use Orchestrator.ProcessorAliasDefUpdate with arg 'inDef' string value. inDef is '{inDef}', inAliasStr is '{inAliasStr}'") @@ -553,11 +626,56 @@ def ProcessorActivityItemCreate(inDef, inArgList=None, inArgDict=None, inArgGSet """ Create ActivityItem - :param inDef: - :param inArgList: - :param inArgDict: - :param inArgGSettingsStr: - :param inArgLoggerStr: + .. code-block:: python + + # USAGE + from pyOpenRPA import Orchestrator + + # EXAMPLE 1 + def TestDef(inArg1Str, inGSettings, inLogger): + pass + lActivityItem = Orchestrator.ProcessorActivityItemCreate( + inDef = TestDef, + inArgList=[], + inArgDict={"inArg1Str": "ArgValueStr"}, + inArgGSettingsStr = "inGSettings", + inArgLoggerStr = "inLogger") + # lActivityItem: + # { + # "Def":TestDef, + # "ArgList":inArgList, + # "ArgDict":inArgDict, + # "ArgGSettings": "inArgGSettings", + # "ArgLogger": "inLogger" + # } + + # 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) + # lActivityItem: + # { + # "Def":"TestDefAlias", + # "ArgList":inArgList, + # "ArgDict":inArgDict, + # "ArgGSettings": None, + # "ArgLogger": None + # } + + :param inDef: def link or def alias (look gSettings["Processor"]["AliasDefDict"]) + :param inArgList: Args list for the Def + :param inArgDict: Args dict for the def + :param inArgGSettingsStr: Name of def argument of the GSettings dict + :param inArgLoggerStr: Name of def argument of the logging object :return: {} """ if inArgList is None: inArgList=[] diff --git a/Wiki/ENG_Guide/doctrees/Orchestrator/01_Orchestrator.doctree b/Wiki/ENG_Guide/doctrees/Orchestrator/01_Orchestrator.doctree new file mode 100644 index 00000000..30351a56 Binary files /dev/null and b/Wiki/ENG_Guide/doctrees/Orchestrator/01_Orchestrator.doctree differ diff --git a/Wiki/ENG_Guide/doctrees/Orchestrator/02_Defs.doctree b/Wiki/ENG_Guide/doctrees/Orchestrator/02_Defs.doctree new file mode 100644 index 00000000..67a92a26 Binary files /dev/null and b/Wiki/ENG_Guide/doctrees/Orchestrator/02_Defs.doctree differ diff --git a/Wiki/ENG_Guide/doctrees/Orchestrator/03_gSettingsTemplate.doctree b/Wiki/ENG_Guide/doctrees/Orchestrator/03_gSettingsTemplate.doctree new file mode 100644 index 00000000..ad408c0a Binary files /dev/null and b/Wiki/ENG_Guide/doctrees/Orchestrator/03_gSettingsTemplate.doctree differ diff --git a/Wiki/ENG_Guide/doctrees/Orchestrator/04_HowToStart.doctree b/Wiki/ENG_Guide/doctrees/Orchestrator/04_HowToStart.doctree new file mode 100644 index 00000000..6a8e8294 Binary files /dev/null and b/Wiki/ENG_Guide/doctrees/Orchestrator/04_HowToStart.doctree differ diff --git a/Wiki/ENG_Guide/html/.buildinfo b/Wiki/ENG_Guide/html/.buildinfo index 5f28f966..2a953b20 100644 --- a/Wiki/ENG_Guide/html/.buildinfo +++ b/Wiki/ENG_Guide/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 428b1a8b711af25fb408c9d4784014f7 +config: b242bb7d21650146bd8bbd75ad743c60 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/Wiki/ENG_Guide/html/Orchestrator/01_Orchestrator.html b/Wiki/ENG_Guide/html/Orchestrator/01_Orchestrator.html new file mode 100644 index 00000000..e0390d6a --- /dev/null +++ b/Wiki/ENG_Guide/html/Orchestrator/01_Orchestrator.html @@ -0,0 +1,295 @@ + + + + + + + + + + 1. Description — pyOpenRPA v1.2.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + +
+ + + + +
+
+
+
+ +
+

1. Description

+

pyOpenRPA Orchestrator is the executable process.

+

The features of the orchestrator is: +- Centralized/decentralized user control interface (applicable and for business users and for technical users). Web based, support desktop, tablet, phone. +- Automatized robots control (customized algorithms, robots scheduling) +- Source code mega flexibility: Light Orchestrator architecture is good for own customization

+
+

Global settings dict concept

+

pyOpenRPA project is complex tool which consist of several executable modules such as Robot, Orchestrator, Studio,

+

Because of module compexity, we use 1 init arg - inGSettings +inGSettings is a complex dictionary which has all reqired parameters for the module execution.

+

The description of the GSettings you can find in executable module details.

+
+
+

Orchestrator how to configure

+

To init pyOpenRPA Orchestrator instance use script:

+

from pyOpenRPA import Orchestrator # Import orchestrator main +gSettings = SettingsTemplate.Create(inModeStr=”BASIC”) # Create GSettings with basic configuration +Orchestrator.Orchestrator(inGSettings=gSettings) # Call the orchestrator def

+

gSettings structure

+
+
+

Orchestrator architecture

+

Orchestrator has several source code components: +- User/robot activity consolidated queue single thread (Processor) +- User/robot activity asynchonus many threads (Processor) +- Scheduler single thread (main) +- RDP keep active many thread +- Autocleaner single thread +- GUI keep active single thread +- HTTP web server single thread (create user socket threads) +-

+

Below you can find more information about all of the component.

+
+
+

Component Processor

+

Sync - Append activity list to consolidated processor queue. Execution goes sequency by the activity list order

+

Async - Create New thread to execute the activity list

+
    +
  • Activity list

  • +
+

List of the activity item

+
    +
  • Activity item

  • +
+

Activity item is universal mechanism to execute different algorythms from any sources. +The core feature of the Activity is to call python defs with args and kwargs. +If you need to init do some activity you can write some python def, then create Activity item with current def. +ATTENTION: In some cases (such as web transmition), when you can’t transmit python def as object you can use symbolic names for python defs. It is apply you to init all of you want from the web UI.

+

?Why i cant transmit python def from the web +Because the WEB space is not the Python executable space. Interaction between it spaces create by JSON protocol. So, we know than JSON apply int, float, str, bool, None, list, dict - that is all.

+
+

Note

+

Example +{

+
+

“Def”:”DefAliasTest”, # def link or def alias (look gSettings[“Processor”][“AliasDefDict”]) +“ArgList”:[1,2,3], # Args list +“ArgDict”:{“ttt”:1,”222”:2,”dsd”:3}, # Args dictionary +“ArgGSettings”: None # Name of GSettings attribute: str (ArgDict) or index (for ArgList) +“ArgLogger”: None # Name of GSettings attribute: str (ArgDict) or index (for ArgList)

+
+

}# Pay attention! Do not left comma symbol after the end of the dict - it can be interpretated like a turple..

+
+
+
+

References

+

`Python-sphinx`_

+
+
+ + +
+ +
+ +
+
+ +
+ +
+ + + + + + + + + + + \ No newline at end of file diff --git a/Wiki/ENG_Guide/html/Orchestrator/Orchestrator.html b/Wiki/ENG_Guide/html/Orchestrator/02_Defs.html similarity index 82% rename from Wiki/ENG_Guide/html/Orchestrator/Orchestrator.html rename to Wiki/ENG_Guide/html/Orchestrator/02_Defs.html index 577c78ce..53ec3667 100644 --- a/Wiki/ENG_Guide/html/Orchestrator/Orchestrator.html +++ b/Wiki/ENG_Guide/html/Orchestrator/02_Defs.html @@ -7,7 +7,7 @@ - Description — pyOpenRPA v1.2.0 documentation + 2. Defs — pyOpenRPA v1.2.0 documentation @@ -38,8 +38,8 @@ - - + + @@ -94,9 +94,14 @@

ORCHESTRATOR

@@ -145,13 +150,13 @@
  • »
  • -
  • Description
  • +
  • 2. Defs
  • - View page source + View page source
  • @@ -164,75 +169,27 @@
    -
    -

    Description

    -

    pyOpenRPA Orchestrator is the executable process.

    -

    The features of the orchestrator is: -- Centralized/decentralized user control interface (applicable and for business users and for technical users). Web based, support desktop, tablet, phone. -- Automatized robots control (customized algorithms, robots scheduling) -- Source code mega flexibility: Light Orchestrator architecture is good for own customization

    -
    -

    Global settings dict concept

    -

    pyOpenRPA project is complex tool which consist of several executable modules such as Robot, Orchestrator, Studio,

    -

    Because of module compexity, we use 1 init arg - inGSettings -inGSettings is a complex dictionary which has all reqired parameters for the module execution.

    -

    The description of the GSettings you can find in executable module details.

    -
    -
    -

    Orchestrator how to configure

    -

    To init pyOpenRPA Orchestrator instance use script:

    -

    from pyOpenRPA import Orchestrator # Import orchestrator main -gSettings = SettingsTemplate.Create(inModeStr=”BASIC”) # Create GSettings with basic configuration -Orchestrator.Orchestrator(inGSettings=gSettings) # Call the orchestrator def

    -

    gSettings structure

    -

    gSettingsTemplate.

    -
    -
    -

    Orchestrator architecture

    -

    Orchestrator has several source code components: -- User/robot activity consolidated queue single thread (Processor) -- User/robot activity asynchonus many threads (Processor) -- Scheduler single thread (main) -- RDP keep active many thread -- Autocleaner single thread -- GUI keep active single thread -- HTTP web server single thread (create user socket threads) --

    -

    Below you can find more information about all of the component.

    -
    -
    -

    Component Processor

    -

    Sync - Append activity list to consolidated processor queue. Execution goes sequency by the activity list order

    -

    Async - Create New thread to execute the activity list

    -
      -
    • Activity list

    • -
    -

    Liast of the activity item

    -
      -
    • Activity item

    • -
    -

    Activity item is universal mechanism to execute different algorythms from any sources. -The core feature of the Activity is to call python defs with args and kwargs. -If you need to init do some activity you can write some python def, then create Activity item with current def. -ATTENTION: In some cases (such as web transmition), when you can’t transmit python def as object you can use symbolic names for python defs. It is apply you to init all of you want from the web UI.

    -

    ?Why i cant transmit python def from the web -Because the WEB space is not the Python executable space. Interaction between it spaces create by JSON protocol. So, we know than JSON apply int, float, str, bool, None, list, dict - that is all. -{

    -
    -

    “Def”:”DefAliasTest”, # def link or def alias (look gSettings[“Processor”][“AliasDefDict”]) -“ArgList”:[1,2,3], # Args list -“ArgDict”:{“ttt”:1,”222”:2,”dsd”:3}, # Args dictionary -“ArgGSettings”: None # Name of GSettings attribute: str (ArgDict) or index (for ArgList) -“ArgLogger”: None # Name of GSettings attribute: str (ArgDict) or index (for ArgList)

    -
    -

    }# Pay attention! Do not left comma symbol after the end of the dict - it can be interpretated like a turple..

    +
    +

    2. Defs

    +
    +

    pyOpenRPA.Orchestrator.__Orchestrator__

    +
    # EXAMPLE 1
    +from pyOpenRPA import Orchestrator
    +Orchestrator.OSCMD(inCMDStr = "git status", inRunAsyncBool=True)
    +
    +# EXAMPLE 2
    +from pyOpenRPA.Orchestrator import __Orchestrator__
    +__Orchestrator__.OSCMD(inCMDStr = "git status", inRunAsyncBool=True)
    +
    -
    -

    pyOpenRPA Orchestrator

    -
    +
    pyOpenRPA.Orchestrator.__Orchestrator__.AgentActivityItemAdd(inGSettings, inHostNameStr, inUserStr, inActivityItemDict)[source]

    Add activity in AgentDict. Check if item is created

    +
    # USAGE
    +import this
    +
    +
    Parameters
      @@ -343,12 +300,29 @@ Create Activity Item for the agent

      pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsKeyListValueAppend(inGSettings, inValue, inKeyList=None)[source]

      Append value in GSettings by the key list

      +
      # USAGE
      +from pyOpenRPA import Orchestrator
      +
      +Orchestrator.GSettingsKeyListValueAppend(
      +    inGSettings = gSettings,
      +    inValue = "NewValue",
      +    inKeyList=["NewKeyDict","NewKeyList"]):
      +# result inGSettings: {
      +#    ... another keys in gSettings ...,
      +#    "NewKeyDict":{
      +#        "NewKeyList":[
      +#            "NewValue"
      +#        ]
      +#    }
      +#}
      +
      +
      Parameters
      • inGSettings – Global settings dict (singleton)

      • -
      • inValue

      • -
      • inKeyList

      • +
      • inValue – Any value to be appended in gSettings Dict by the key list

      • +
      • inKeyList – List of the nested keys (see example)

      Returns
      @@ -377,13 +351,33 @@ Create Activity Item for the agent

      pyOpenRPA.Orchestrator.__Orchestrator__.GSettingsKeyListValueOperatorPlus(inGSettings, inValue, inKeyList=None)[source]
      -

      Operator plus value in GSettings by the key list

      +

      Execute plus operation between 2 lists (1:inValue and 2:gSettings by the inKeyList)

      +
      # USAGE
      +from pyOpenRPA import Orchestrator
      +
      +Orchestrator.GSettingsKeyListValueOperatorPlus(
      +    inGSettings = gSettings,
      +    inValue = [1,2,3],
      +    inKeyList=["NewKeyDict","NewKeyList"]):
      +# result inGSettings: {
      +#    ... another keys in gSettings ...,
      +#    "NewKeyDict":{
      +#        "NewKeyList":[
      +#            "NewValue",
      +#            1,
      +#            2,
      +#            3
      +#        ]
      +#    }
      +#}
      +
      +
      Parameters
      • inGSettings – Global settings dict (singleton)

      • -
      • inValue

      • -
      • inKeyList

      • +
      • inValue – List with values to be merged with list in gSettings

      • +
      • inKeyList – List of the nested keys (see example)

      Returns
      @@ -554,14 +548,58 @@ Create Activity Item for the agent

      pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorActivityItemCreate(inDef, inArgList=None, inArgDict=None, inArgGSettingsStr=None, inArgLoggerStr=None)[source]

      Create ActivityItem

      +
      # USAGE
      +from pyOpenRPA import Orchestrator
      +
      +# EXAMPLE 1
      +def TestDef(inArg1Str, inGSettings, inLogger):
      +    pass
      +lActivityItem = Orchestrator.ProcessorActivityItemCreate(
      +    inDef = TestDef,
      +    inArgList=[],
      +    inArgDict={"inArg1Str": "ArgValueStr"},
      +    inArgGSettingsStr = "inGSettings",
      +    inArgLoggerStr = "inLogger")
      +# lActivityItem:
      +#   {
      +#       "Def":TestDef,
      +#       "ArgList":inArgList,
      +#       "ArgDict":inArgDict,
      +#       "ArgGSettings": "inArgGSettings",
      +#       "ArgLogger": "inLogger"
      +#   }
      +
      +# 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)
      +# lActivityItem:
      +#   {
      +#       "Def":"TestDefAlias",
      +#       "ArgList":inArgList,
      +#       "ArgDict":inArgDict,
      +#       "ArgGSettings": None,
      +#       "ArgLogger": None
      +#   }
      +
      +
      Parameters
        -
      • inDef

      • -
      • inArgList

      • -
      • inArgDict

      • -
      • inArgGSettingsStr

      • -
      • inArgLoggerStr

      • +
      • inDef – def link or def alias (look gSettings[“Processor”][“AliasDefDict”])

      • +
      • inArgList – Args list for the Def

      • +
      • inArgDict – Args dict for the def

      • +
      • inArgGSettingsStr – Name of def argument of the GSettings dict

      • +
      • inArgLoggerStr – Name of def argument of the logging object

      Returns
      @@ -573,17 +611,30 @@ Create Activity Item for the agent

      pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorAliasDefCreate(inGSettings, inDef, inAliasStr=None)[source]
      -

      Create alias for def (can be used in ActivityItem in field Def)

      +

      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)

      +
      # USAGE
      +from pyOpenRPA import Orchestrator
      +
      +def TestDef():
      +    pass
      +lAliasStr = Orchestrator.ProcessorAliasDefCreate(
      +    inGSettings = gSettings,
      +    inDef = TestDef,
      +    inAliasStr="TestDefAlias")
      +# Now you can call TestDef by the alias from var lAliasStr with help of ActivityItem (key Def = lAliasStr)
      +
      +
      Parameters
      • inGSettings – Global settings dict (singleton)

      • -
      • inDef

      • -
      • inAliasStr

      • +
      • inDef – Def

      • +
      • inAliasStr – String alias for associated def

      Returns
      -

      str Alias

      +

      str Alias string (Alias can be regenerated if previous alias was occupied)

      @@ -591,17 +642,30 @@ Create Activity Item for the agent

      pyOpenRPA.Orchestrator.__Orchestrator__.ProcessorAliasDefUpdate(inGSettings, inDef, inAliasStr)[source]
      -

      Update alias for def (can be used in ActivityItem in field Def)

      +

      Update 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)

      +
      # USAGE
      +from pyOpenRPA import Orchestrator
      +
      +def TestDef():
      +    pass
      +Orchestrator.ProcessorAliasDefUpdate(
      +    inGSettings = gSettings,
      +    inDef = TestDef,
      +    inAliasStr="TestDefAlias")
      +# Now you can call TestDef by the alias "TestDefAlias" with help of ActivityItem (key Def = "TestDefAlias")
      +
      +
      Parameters
      • inGSettings – Global settings dict (singleton)

      • -
      • inDef

      • -
      • inAliasStr

      • +
      • inDef – Def

      • +
      • inAliasStr – String alias for associated def

      Returns
      -

      str Alias

      +

      str Alias string

      @@ -636,11 +700,23 @@ Create Activity Item for the agent

    • inGSettings – Global settings dict (singleton)

    • inRDPSessionKeyStr

    • inCMDStr

    • -
    • inModeStr

    • +
    • inModeStr – Variants: +“LISTEN” - Get result of the cmd command in result; +“CROSSCHECK” - Check if the command was successufully sent +“RUN” - Run without crosscheck and get clipboard

    Returns
    -

    True - CMD was executed successfully

    +

    +
    # OLD > True - CMD was executed successfully
    +
    {

    “OutStr”: <> # Result string +“IsResponsibleBool”: True|False # Flag is RDP is responsible - works only when inModeStr = CROSSCHECK

    +
    +
    +
    +
    +

    }

    +

    @@ -1080,6 +1156,10 @@ Var 2 (Backward compatibility): inGSettings, inRDPSessionKeyStr, inHostStr, inP
    +
    +
    +

    References

    +

    `Python-sphinx`_

    @@ -1089,8 +1169,8 @@ Var 2 (Backward compatibility): inGSettings, inRDPSessionKeyStr, inHostStr, inP