diff --git a/Sources/GuideSphinx/Orchestrator/06_Defs Managers.rst b/Sources/GuideSphinx/Orchestrator/06_Defs Managers.rst new file mode 100644 index 00000000..060b8528 --- /dev/null +++ b/Sources/GuideSphinx/Orchestrator/06_Defs Managers.rst @@ -0,0 +1,52 @@ +#################################### +6. Defs Managers +#################################### + +************************************************** +Process (General) +************************************************** + +.. code-block:: python + + # EXAMPLE + from pyOpenRPA.Orchestrator import Orchestrator + lProcess = Orchestrator.Managers.Process(inAgentHostNameStr="PC-DESKTOP",inAgentUserNameStr="ND", inProcessNameWOExeStr="notepad",inStartCMDStr="notepad") + + +.. automodule:: pyOpenRPA.Orchestrator.Managers.Process + :members: + :autosummary: + + +************************************************** +Process (Details) +************************************************** + +.. automodule:: pyOpenRPA.Orchestrator.Managers.Process + :members: + :autosummary: + + +************************************************** +ControlPanel (General) +************************************************** + +.. code-block:: python + + # EXAMPLE + from pyOpenRPA.Orchestrator import Orchestrator + lCP = Orchestrator.Managers.ControlPanel(inControlPanelNameStr="TestTTT",inRefreshHTMLJinja2TemplatePathStr="ControlPanel\\test.html", inJinja2TemplateRefreshBool = True) + + +.. automodule:: pyOpenRPA.Orchestrator.Managers.ControlPanel + :members: + :autosummary: + + +************************************************** +ControlPanel (Details) +************************************************** + +.. automodule:: pyOpenRPA.Orchestrator.Managers.ControlPanel + :members: + :autosummary: diff --git a/Sources/pyOpenRPA/Orchestrator/Managers/Process.py b/Sources/pyOpenRPA/Orchestrator/Managers/Process.py index 2e06c386..e1845b2a 100644 --- a/Sources/pyOpenRPA/Orchestrator/Managers/Process.py +++ b/Sources/pyOpenRPA/Orchestrator/Managers/Process.py @@ -35,6 +35,7 @@ class Process(): __Orchestrator__.GSettingsGet()["ManagersProcessDict"][(inAgentHostNameStr.upper(), inAgentUserNameStr.upper(), inProcessNameWOExeStr.upper())]=self lActivityDict = __Orchestrator__.ProcessorActivityItemCreate(inDef=self.StatusCheck,inArgList=[]) __Orchestrator__.ProcessorActivityItemAppend(inActivityItemDict=lActivityDict) + def Manual2Auto(self) -> str: """ Remove Manual flag from process (if exists) - it will allow the schedule operations via def StatusCheckStart(self): def StatusCheckStorForce(self): def StatusCheckStopSafe(self): @@ -46,9 +47,7 @@ class Process(): if self.mStatusStr=="3_STOP_SAFE_MANUAL": self.mStatusStr = "2_STOP_SAFE"; lLogBool=True if self.mStatusStr=="5_STARTED_MANUAL": self.mStatusStr = "4_STARTED"; lLogBool=True # Log info about process - if lLogBool == True: - lL = __Orchestrator__.OrchestratorLoggerGet() - lL.info(f"Managers.Process: {self.mProcessNameWOExeStr} change status to {self.mStatusStr})") + if lLogBool == True: self.StatusChangeLog() return self.mStatusStr def Start(self, inIsManualBool = True) -> str: @@ -75,8 +74,7 @@ class Process(): else: self.mStatusStr = "4_STARTED" # Log info about process - lL = __Orchestrator__.OrchestratorLoggerGet() - lL.info(f"Managers.Process: {self.mProcessNameWOExeStr} change status to {self.mStatusStr})") + self.StatusChangeLog() return self.mStatusStr def StopSafe(self, inIsManualBool = True) -> str: @@ -110,8 +108,7 @@ class Process(): else: self.mStatusStr = "0_STOPPED" # Log info about process - lL = __Orchestrator__.OrchestratorLoggerGet() - lL.info(f"Managers.Process: {self.mProcessNameWOExeStr} change status to {self.mStatusStr})") + self.StatusChangeLog() return self.mStatusStr def RestartSafe(self, inIsManualBool = True): @@ -134,6 +131,17 @@ class Process(): """ pass + def StatusChangeLog(self): + """ + Lof information about status change + + :return: + """ + # Log info about process + lL = __Orchestrator__.OrchestratorLoggerGet() + lL.info(f"Managers.Process ({self.mAgentHostNameStr}, {self.mAgentUserNameStr}, {self.mProcessNameWOExeStr}): Status has been changed to {self.mStatusStr})") + + def StatusCheck(self): """ Check if process is alive. The def will save the manual flag is exists. @@ -154,9 +162,7 @@ class Process(): if self.mStatusStr == "4_STARTED": self.mStatusStr = "0_STOPPED"; lLogBool=True if self.mStatusStr is None: self.mStatusStr = "0_STOPPED"; lLogBool=True # Log info about process - if lLogBool == True: - lL = __Orchestrator__.OrchestratorLoggerGet() - lL.info(f"Managers.Process: {self.mProcessNameWOExeStr} change status to {self.mStatusStr})") + if lLogBool == True: self.StatusChangeLog() return self.mStatusStr def StatusCheckStart(self): """ diff --git a/Wiki/ENG_Guide/html/01_HowToInstall.html b/Wiki/ENG_Guide/html/01_HowToInstall.html index d8024268..ba6e0828 100644 --- a/Wiki/ENG_Guide/html/01_HowToInstall.html +++ b/Wiki/ENG_Guide/html/01_HowToInstall.html @@ -115,6 +115,7 @@
  • 3. gSettings Template
  • 4. How to use
  • 5. UAC - User Access Control
  • +
  • 6. Defs Managers
  • AGENT

    AGENT

    AGENT

    AGENT

    AGENT

    AGENT

    AGENT

    AGENT

    AGENT

    AGENT

    AGENT

    AGENT

    AGENT