Class WorkflowHelper


  • public class WorkflowHelper
    extends java.lang.Object

    Überschrift: WorkflowHelper.

    Beschreibung: Hilfsklasse für Workflow-Operationen.

    Copyright: Copyright (c) ELO Digital Office GmbH 2018

    • Constructor Summary

      Constructors 
      Constructor Description
      WorkflowHelper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int addWorkflowNode​(IXconnect ixConnect, int flowId, de.elo.ix.client.WFTypeZ flowType, int nodeType, java.lang.String nodeName, int userId, int xPos, int yPos)
      Fügt den Workfowknoten an der angegebenen Position in den Workflow ein und liefert die ID des neuen Workflow-Knotens zurück.
      static void addWorkflowNodeAssoc​(IXconnect ixConnect, int flowId, de.elo.ix.client.WFTypeZ flowType, int startNodeId, int endNodeId)
      Fügt eine Verbindung zwischen den angegebenen Workflow-Knoten ein.
      static de.elo.ix.client.StartAdHocWorkflowInfo createStartWorkflowInfo​(java.lang.String startNodeName, boolean forValidation, boolean serialFlow, boolean deactivateNodes, java.lang.String cancelUserId, java.lang.String finishUserId)
      Erzeugt ein Objekt für den Start eines Adhoc Workflows mit den angegebenen Daten.
      static void deleteReminders​(IXconnect ixConnect, int objId)
      Löscht die Wiedervorlagen mit dem angegebenen Archveintrag.
      static void deleteWorkflowNode​(IXconnect ixConnect, int flowId, de.elo.ix.client.WFTypeZ flowType, int nodeId)
      Löscht den angegebenen Workflow-Knoten.
      static void deleteWorkflowNodeAssoc​(IXconnect ixConnect, int flowId, de.elo.ix.client.WFTypeZ flowType, int startNodeId, int endNodeId)
      Löscht die angegebene Knotenverbindung im angegebenen Workflow.
      static void execDeleteWorkflowNode​(IXconnect ixConnect, int flowId, de.elo.ix.client.WFTypeZ flowType, int nodeId)
      Löscht den angegebenen Workflow-Knoten.
      static void execDeleteWorkflowNodeAssoc​(IXconnect ixConnect, int flowId, de.elo.ix.client.WFTypeZ flowType, int startNodeId, int endNodeId)
      Löscht die angegebene Knotenverbindung im angegebenen Workflow.
      static java.io.File exportWorkflowTemplate​(IXconnect ixConnect, int flowTemplId, java.io.File targetDir)
      Exportiert die Workflow-Vorlage im angegebenen Zielverzeichnis und liefert die erstellte EWF-Datei zurück.
      static void forwardNode​(IXconnect ixConnect, de.elo.ix.client.WFCollectNode node, java.lang.String comment)
      Leitet die Workflow Bearbeitung vom angegebenen Workflowknoten weiter.
      static java.lang.String getDesc​(de.elo.ix.client.UserTask task)
      Liefert den Zusatztext der angegebenen Aufgabe zurück.
      static int getFirstSuccNodeId​(de.elo.ix.client.WFDiagram wfDiagram, int nodeId)
      Liefert die ID des ersten Nachfolgerknotens zurück.
      static java.lang.String getFormName​(IXconnect ixConnect, int flowId, int nodeId)
      Liefert die Formularbezeichnung des angegebenen Workflow Knotens zurück.
      static java.lang.String getFormNameFromUrl​(java.lang.String requestUri)
      Liefert den JSP-Formularnamen aus der angegebenen Request-URL zurück.
      static de.elo.ix.client.WFNode getMaxNode​(de.elo.ix.client.WFNode[] nodes)
      Liefert den Knoten mit der größten KnotenId zurück.
      static int getMaxNodeId​(de.elo.ix.client.WFNode[] nodes)
      Liefert die größte KnotenId aus den angegebenen Workflow-Knoten zurück.
      static java.lang.String getName​(de.elo.ix.client.UserTask task)
      Liefert die Bezeichnung der angegebenen Aufgabe zurück.
      static de.elo.ix.client.WFNode getNodeById​(de.elo.ix.client.WFDiagram flow, int nodeId)
      Liefert den Workflow-Knoten mit der angegebenen ID zurück.
      static de.elo.ix.client.WFNode getNodeById​(IXconnect ixConnect, int flowId, int nodeId)
      Liefert den Workflowknoten mit der angegebenen ID zurück.
      static int getNodesCount​(IXconnect ixConnect, int flowId)
      Liefert die Anzahl der Knoten im angegebenen Workflow zurück.
      static java.util.ArrayList<de.elo.ix.client.WFNode> getNodesRange​(IXconnect ixConnect, int flowId, int startNodeId, int endNodeId)
      Liefert eine Liste mit Workflow Knoten, deren IDs zwischen den angegebenen IDs liegen.
      static java.lang.String getObjId​(de.elo.ix.client.UserTask task)
      Liefert die Objekt ID der angegebenen Aufgabe zurück.
      static int getReceiverId​(de.elo.ix.client.UserTask task)
      Liefert den Empfänger der angegebenen Aufgabe zurück.
      static java.util.List<de.elo.ix.client.Reminder> getReminders​(IXconnect ixConnect, int userId)
      Liefert alle Wiedervorlagen vom Indexserver zurück.
      static de.elo.ix.client.WFNode getSuccessor​(IXconnect ixConnect, int flowId, int nodeId)
      Liefert den Nachfolgerknoten des angegebenen Workflow Knotens zurück.
      static de.elo.ix.client.WFNode[] getSuccessors​(IXconnect ixConnect, int flowId, int nodeId)
      Liefert eine Liste mit den Nachfolgerknoten des angegebenen Workflow Knotens zurück.
      static int getVersionsCount​(IXconnect ixConnect, int flowId)
      Liefert die Anzahl der Versionen der angegebenen Workflow-Vorlage zurück.
      static java.lang.String getWfBaseUrl​(IXconnect ixConnect)
      Liefert die Haupt URL vom Workflow Server zurück.
      static java.util.List<de.elo.ix.client.WFDiagram> getWorkflows​(IXconnect ixConnect, de.elo.ix.client.FindWorkflowInfo findWorkflowInfo)
      Liefert die Workflows für die angegebenen Suchkriterien zurück.
      static de.elo.ix.client.WFDiagram importWorkflowTemplate​(IXconnect ixConnect, java.io.File ewfFile)
      Importiert die angegebene EWF-Datei im Index Server.
      static boolean isWorkflowCacheEnabled​(IXconnect ixConnect)
      Meldet zurück, ob der Workflow Cache aktiviert wurde.
      static void resetWorkflowNode​(de.elo.ix.client.WFNode node)
      Setzt die Datumseigenschaften des angegebenen Workflow-Knotens zurück.
      static void setSessionStartDocMaskWorkflows​(IXconnect ixConnect, boolean startWorkflows)
      Setzt die Option für den automatischen Start von Workflows, die in einer Verschlagwortungsmaske hinterlegt sind.
      static void terminateWorkflows​(IXconnect ixConnect, int objId)
      Beendet alle aktiven Workflows des angegebenen Archiveintrags.
      static boolean userHasTaskForSord​(IXconnect ixConnect, java.lang.String userName, int flowId, int objId)
      Meldet zurück, ob der Benutzer einen Workflow für den angegebenen Archiveintrag bekommen hat.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WorkflowHelper

        public WorkflowHelper()
    • Method Detail

      • addWorkflowNode

        public static int addWorkflowNode​(IXconnect ixConnect,
                                          int flowId,
                                          de.elo.ix.client.WFTypeZ flowType,
                                          int nodeType,
                                          java.lang.String nodeName,
                                          int userId,
                                          int xPos,
                                          int yPos)
                                   throws java.lang.Exception
        Fügt den Workfowknoten an der angegebenen Position in den Workflow ein und liefert die ID des neuen Workflow-Knotens zurück.
        Parameters:
        ixConnect - Index Server Verbindung
        flowId - WorkflowId
        flowType - Workflowtyp
        nodeType - Knotentyp
        nodeName - Knotennamen
        userId - BenutzerId
        xPos - Horizontale Knotenposition
        yPos - Vertikale Knotenposition
        Returns:
        Id des neuen Knotens
        Throws:
        java.lang.Exception
      • addWorkflowNodeAssoc

        public static void addWorkflowNodeAssoc​(IXconnect ixConnect,
                                                int flowId,
                                                de.elo.ix.client.WFTypeZ flowType,
                                                int startNodeId,
                                                int endNodeId)
                                         throws java.lang.Exception
        Fügt eine Verbindung zwischen den angegebenen Workflow-Knoten ein.
        Parameters:
        ixConnect - Index Server Verbindung
        flowId - WorkflowId
        flowType - Workflow-Type
        startNodeId - Startknoten der Verbindung
        endNodeId - Endknoten der Verbindung
        Throws:
        java.lang.Exception
      • deleteWorkflowNodeAssoc

        public static void deleteWorkflowNodeAssoc​(IXconnect ixConnect,
                                                   int flowId,
                                                   de.elo.ix.client.WFTypeZ flowType,
                                                   int startNodeId,
                                                   int endNodeId)
                                            throws byps.RemoteException,
                                                   java.lang.Exception
        Löscht die angegebene Knotenverbindung im angegebenen Workflow.
        Parameters:
        ixConnect - Index Server Verbindung
        flowId - WorkflowId
        flowType - Workflow-Typ
        startNodeId - Id des Startknotens der Knotenverbindung
        endNodeId - Id des Endknotens der Knotenverbindung
        Throws:
        byps.RemoteException
        java.lang.Exception
      • execDeleteWorkflowNodeAssoc

        public static void execDeleteWorkflowNodeAssoc​(IXconnect ixConnect,
                                                       int flowId,
                                                       de.elo.ix.client.WFTypeZ flowType,
                                                       int startNodeId,
                                                       int endNodeId)
                                                throws byps.RemoteException
        Löscht die angegebene Knotenverbindung im angegebenen Workflow.
        Parameters:
        ixConnect - Index Server Verbindung
        flowId - WorkflowId
        flowType - Workflow-Typ
        startNodeId - Id des Startknotens der Knotenverbindung
        endNodeId - Id des Endknotens der Knotenverbindung
        Throws:
        byps.RemoteException
      • deleteWorkflowNode

        public static void deleteWorkflowNode​(IXconnect ixConnect,
                                              int flowId,
                                              de.elo.ix.client.WFTypeZ flowType,
                                              int nodeId)
                                       throws java.lang.Exception
        Löscht den angegebenen Workflow-Knoten.
        Parameters:
        ixConnect - Index Server Verbindung
        flowId - WorkflowId
        flowType - Workflowtyp
        nodeId - KnotenId
        Throws:
        java.lang.Exception
      • execDeleteWorkflowNode

        public static void execDeleteWorkflowNode​(IXconnect ixConnect,
                                                  int flowId,
                                                  de.elo.ix.client.WFTypeZ flowType,
                                                  int nodeId)
                                           throws byps.RemoteException,
                                                  java.lang.Exception
        Löscht den angegebenen Workflow-Knoten.
        Parameters:
        ixConnect - Index Server Verbindung
        flowId - WorkflowId
        flowType - Workflow-Typ
        nodeId - KnotenId
        Throws:
        byps.RemoteException
        java.lang.Exception
      • getNodesCount

        public static int getNodesCount​(IXconnect ixConnect,
                                        int flowId)
                                 throws byps.RemoteException,
                                        java.lang.Exception
        Liefert die Anzahl der Knoten im angegebenen Workflow zurück.
        Parameters:
        ixConnect - Index Server Verbindung
        flowId - WorkflowId
        Returns:
        Anzahl der Knoten
        Throws:
        byps.RemoteException
        java.lang.Exception
      • getNodesRange

        public static java.util.ArrayList<de.elo.ix.client.WFNode> getNodesRange​(IXconnect ixConnect,
                                                                                 int flowId,
                                                                                 int startNodeId,
                                                                                 int endNodeId)
                                                                          throws java.lang.Exception
        Liefert eine Liste mit Workflow Knoten, deren IDs zwischen den angegebenen IDs liegen.
        Parameters:
        ixConnect - Index Server Verbindung
        flowId - Workflow ID
        startNodeId - Startindex
        endNodeId - Endindex
        Returns:
        Liste Mit Workflow Knoten
        Throws:
        java.lang.Exception
      • getVersionsCount

        public static int getVersionsCount​(IXconnect ixConnect,
                                           int flowId)
                                    throws byps.RemoteException,
                                           java.lang.Exception
        Liefert die Anzahl der Versionen der angegebenen Workflow-Vorlage zurück.
        Parameters:
        ixConnect - Index Server Verbindung
        flowId - ID der Workflow-Vorlage
        Returns:
        Anzahl der Versionen
        Throws:
        byps.RemoteException
        java.lang.Exception
      • getNodeById

        public static de.elo.ix.client.WFNode getNodeById​(IXconnect ixConnect,
                                                          int flowId,
                                                          int nodeId)
                                                   throws java.lang.Exception
        Liefert den Workflowknoten mit der angegebenen ID zurück.
        Parameters:
        ixConnect - Index Server Verbindung
        flowId - Workflow ID
        nodeId - Knoten ID
        Returns:
        Workflow-Knoten oder null
        Throws:
        java.lang.Exception
      • getNodeById

        public static de.elo.ix.client.WFNode getNodeById​(de.elo.ix.client.WFDiagram flow,
                                                          int nodeId)
                                                   throws java.lang.Exception
        Liefert den Workflow-Knoten mit der angegebenen ID zurück.
        Parameters:
        flow - Workflow-Diagramm
        nodeId - Knoten ID
        Returns:
        Workflow-Knoten oder null
        Throws:
        java.lang.Exception
      • getSuccessor

        public static de.elo.ix.client.WFNode getSuccessor​(IXconnect ixConnect,
                                                           int flowId,
                                                           int nodeId)
                                                    throws java.lang.Exception
        Liefert den Nachfolgerknoten des angegebenen Workflow Knotens zurück.
        Parameters:
        ixConnect - Index Server Verbindung
        flowId - Workflow ID
        nodeId - Knoten ID
        Returns:
        Nachfolgerknoten oder null
        Throws:
        java.lang.Exception
      • getSuccessors

        public static de.elo.ix.client.WFNode[] getSuccessors​(IXconnect ixConnect,
                                                              int flowId,
                                                              int nodeId)
                                                       throws java.lang.Exception
        Liefert eine Liste mit den Nachfolgerknoten des angegebenen Workflow Knotens zurück.
        Parameters:
        ixConnect - Index Server Verbindung
        flowId - Workflow ID
        nodeId - Knoten ID
        Returns:
        Liste mit Nachfolgerknoten oder null
        Throws:
        java.lang.Exception
      • getFirstSuccNodeId

        public static int getFirstSuccNodeId​(de.elo.ix.client.WFDiagram wfDiagram,
                                             int nodeId)
                                      throws java.lang.Exception
        Liefert die ID des ersten Nachfolgerknotens zurück.
        Parameters:
        wfDiagram - Workflow Diagramm
        nodeId - Knoten ID
        Returns:
        ID des ersten Nachfolgerknotens oder -1
        Throws:
        java.lang.Exception
      • getWorkflows

        public static java.util.List<de.elo.ix.client.WFDiagram> getWorkflows​(IXconnect ixConnect,
                                                                              de.elo.ix.client.FindWorkflowInfo findWorkflowInfo)
                                                                       throws java.lang.Exception
        Liefert die Workflows für die angegebenen Suchkriterien zurück.
        Parameters:
        ixConnect - Index Server Verbindung
        findWorkflowInfo - Suchkriterien
        Returns:
        Liste mit Workflows
        Throws:
        java.lang.Exception
      • getReminders

        public static java.util.List<de.elo.ix.client.Reminder> getReminders​(IXconnect ixConnect,
                                                                             int userId)
                                                                      throws java.lang.Exception
        Liefert alle Wiedervorlagen vom Indexserver zurück.
        Parameters:
        ixConnect - Index Server Verbindung
        userId - Benutzer-ID
        Returns:
        Liste mit den Wiedervorlagen
        Throws:
        java.lang.Exception
      • getName

        public static java.lang.String getName​(de.elo.ix.client.UserTask task)
                                        throws java.lang.Exception
        Liefert die Bezeichnung der angegebenen Aufgabe zurück.
        Parameters:
        task - Aufgabe
        Returns:
        Bezeichnung der Aufgabe
        Throws:
        java.lang.Exception
      • getDesc

        public static java.lang.String getDesc​(de.elo.ix.client.UserTask task)
                                        throws java.lang.Exception
        Liefert den Zusatztext der angegebenen Aufgabe zurück.
        Parameters:
        task - Aufgabe
        Returns:
        Zusatztext der Aufgabe
        Throws:
        java.lang.Exception
      • getObjId

        public static java.lang.String getObjId​(de.elo.ix.client.UserTask task)
                                         throws java.lang.Exception
        Liefert die Objekt ID der angegebenen Aufgabe zurück.
        Parameters:
        task - Aufgabe
        Returns:
        ID der Aufgabe
        Throws:
        java.lang.Exception
      • getReceiverId

        public static int getReceiverId​(de.elo.ix.client.UserTask task)
                                 throws java.lang.Exception
        Liefert den Empfänger der angegebenen Aufgabe zurück.
        Parameters:
        task - Aufgabe
        Returns:
        Empfänger der Aufgabe
        Throws:
        java.lang.Exception
      • resetWorkflowNode

        public static void resetWorkflowNode​(de.elo.ix.client.WFNode node)
                                      throws java.lang.Exception
        Setzt die Datumseigenschaften des angegebenen Workflow-Knotens zurück.
        Parameters:
        node - Workflow-Knoten
        Throws:
        java.lang.Exception
      • getMaxNodeId

        public static int getMaxNodeId​(de.elo.ix.client.WFNode[] nodes)
                                throws java.lang.Exception
        Liefert die größte KnotenId aus den angegebenen Workflow-Knoten zurück.
        Parameters:
        nodes - Liste mit Workflow-Knoten
        Returns:
        Größe KnotenId
        Throws:
        java.lang.Exception
      • getMaxNode

        public static de.elo.ix.client.WFNode getMaxNode​(de.elo.ix.client.WFNode[] nodes)
                                                  throws java.lang.Exception
        Liefert den Knoten mit der größten KnotenId zurück.
        Parameters:
        nodes - Liste mit Workflowknoten
        Returns:
        Knoten mit größter ID
        Throws:
        java.lang.Exception
      • importWorkflowTemplate

        public static de.elo.ix.client.WFDiagram importWorkflowTemplate​(IXconnect ixConnect,
                                                                        java.io.File ewfFile)
                                                                 throws java.lang.Exception
        Importiert die angegebene EWF-Datei im Index Server.
        Parameters:
        ixConnect - Index Server Verbindung
        ewfFile - EWF-Datei
        Returns:
        importierte Workflow-Vorlage
        Throws:
        java.lang.Exception
      • exportWorkflowTemplate

        public static java.io.File exportWorkflowTemplate​(IXconnect ixConnect,
                                                          int flowTemplId,
                                                          java.io.File targetDir)
                                                   throws java.lang.Exception
        Exportiert die Workflow-Vorlage im angegebenen Zielverzeichnis und liefert die erstellte EWF-Datei zurück.
        Parameters:
        ixConnect - Index Server Verbindung
        flowTemplId - ID der Workflow Vorlage
        targetDir - Zielverzeichnis
        Returns:
        Exportierte EWF-Datei
        Throws:
        java.lang.Exception
      • terminateWorkflows

        public static void terminateWorkflows​(IXconnect ixConnect,
                                              int objId)
                                       throws java.lang.Exception
        Beendet alle aktiven Workflows des angegebenen Archiveintrags.
        Parameters:
        ixConnect - Index Server Verbindung
        objId - ID des Archiveintrags
        Throws:
        java.lang.Exception
      • deleteReminders

        public static void deleteReminders​(IXconnect ixConnect,
                                           int objId)
                                    throws java.lang.Exception
        Löscht die Wiedervorlagen mit dem angegebenen Archveintrag.
        Parameters:
        ixConnect - Index Server Verbindung
        objId - ID des Archiveintrags
        Throws:
        java.lang.Exception
      • getFormName

        public static java.lang.String getFormName​(IXconnect ixConnect,
                                                   int flowId,
                                                   int nodeId)
                                            throws java.lang.Exception
        Liefert die Formularbezeichnung des angegebenen Workflow Knotens zurück.
        Parameters:
        ixConnect - Index Server Verbindung
        flowId - Workflow ID
        nodeId - ID des Workflow Knotens
        Returns:
        Formularbezeichnung des Knotens
        Throws:
        java.lang.Exception
      • getFormNameFromUrl

        public static java.lang.String getFormNameFromUrl​(java.lang.String requestUri)
                                                   throws java.lang.Exception
        Liefert den JSP-Formularnamen aus der angegebenen Request-URL zurück.
        Parameters:
        requestUri - komplette URL ohne Parameter
        Returns:
        Formularname ohne ".JSP" Anteil
        Throws:
        java.lang.Exception
      • getWfBaseUrl

        public static java.lang.String getWfBaseUrl​(IXconnect ixConnect)
                                             throws java.lang.Exception
        Liefert die Haupt URL vom Workflow Server zurück.
        Parameters:
        ixConnect - Index Server Verbindung
        Returns:
        Haupt URL vom Workflow Server
        Throws:
        java.lang.Exception
      • isWorkflowCacheEnabled

        public static boolean isWorkflowCacheEnabled​(IXconnect ixConnect)
                                              throws java.lang.Exception
        Meldet zurück, ob der Workflow Cache aktiviert wurde.
        Parameters:
        ixConnect - Index Server Verbindung
        Returns:
        Workflow Cache wurde aktiviert
        Throws:
        java.lang.Exception
      • forwardNode

        public static void forwardNode​(IXconnect ixConnect,
                                       de.elo.ix.client.WFCollectNode node,
                                       java.lang.String comment)
                                throws java.lang.Exception
        Leitet die Workflow Bearbeitung vom angegebenen Workflowknoten weiter.
        Parameters:
        ixConnect - Index Server Verbindung
        node - Workflow Knoten
        comment - Kommentar
        Throws:
        java.lang.Exception
      • createStartWorkflowInfo

        public static de.elo.ix.client.StartAdHocWorkflowInfo createStartWorkflowInfo​(java.lang.String startNodeName,
                                                                                      boolean forValidation,
                                                                                      boolean serialFlow,
                                                                                      boolean deactivateNodes,
                                                                                      java.lang.String cancelUserId,
                                                                                      java.lang.String finishUserId)
                                                                               throws java.lang.Exception
        Erzeugt ein Objekt für den Start eines Adhoc Workflows mit den angegebenen Daten.
        Parameters:
        startNodeName - Bezeichnung des Startknotens
        forValidation - Zur Überprüfung
        serialFlow - Serielle Bearbeitung
        deactivateNodes - Personenknoten deaktivieren
        cancelUserId - Benutzer ID beim Abbruch des Workflows
        finishUserId - Benutzer ID beim Beenden des Workflows
        Returns:
        Objekt für den Start eines Adhoc Workflows
        Throws:
        java.lang.Exception
      • setSessionStartDocMaskWorkflows

        public static void setSessionStartDocMaskWorkflows​(IXconnect ixConnect,
                                                           boolean startWorkflows)
                                                    throws java.lang.Exception
        Setzt die Option für den automatischen Start von Workflows, die in einer Verschlagwortungsmaske hinterlegt sind.
        Parameters:
        ixConnect - Index Server Verbindung
        startWorkflows - Workflows automatisch starten
        Throws:
        java.lang.Exception
      • userHasTaskForSord

        public static boolean userHasTaskForSord​(IXconnect ixConnect,
                                                 java.lang.String userName,
                                                 int flowId,
                                                 int objId)
                                          throws java.lang.Exception
        Meldet zurück, ob der Benutzer einen Workflow für den angegebenen Archiveintrag bekommen hat.
        Parameters:
        ixConnect - Index Server Verbindung
        userName - Benutzername
        flowId - Workflow ID
        objId - Objekt ID des Archiveintrags
        Returns:
        Benutzer hat einen Workflow bekommen
        Throws:
        java.lang.Exception