Interface Template

    • Field Detail

      • serialVersionUID

        static final long serialVersionUID
        Generated ID for serialisation.
        See Also:
        Constant Field Values
    • Method Detail

      • getID

        UUID getID()
        Returns the ID of the template. The ID is system-wide unique.
        Returns:
        The template id.
      • getName

        String getName()
        Returns the name of the process.
        Returns:
        The name of the process.
      • getDescription

        String getDescription()
        Returns the description of the process.
        Returns:
        The description of the process.
      • getConfigurationDescription

        ConfigurationDescription getConfigurationDescription()
        Gets the configuration description for this process template, that is a description of all configuration values that are needed or supported in the configuration. This also provides whether a configuration value is mandatory and its type.
        Returns:
        The description for all configuration values of this process template, that is, the name of the configuration entries, their type and whether they are mandatory.
      • getConfiguration

        Configuration getConfiguration()
        Gets the configuration of this process template that corresponds to the configuration description. All mandatory configuration entries need to have an appropriate value. These configuration also needs to provide values for mandatory configuration values of activities that are retrieved from the process configuration (see ActivityConfiguration).
        Returns:
        The configuration values set for this process template based on the configuration description and providing all values for all mandatory entries.
      • getTestConfiguration

        Configuration getTestConfiguration()
        Gets the (stand-alone) test configuration of this process template. These configuration values only apply when the process template is executed in test mode, that is the operation is provided this configuration instead of the normal configuration. This test configuration is already merged with the normal (merged) configuration. Note that the test configuration allows to override fixed values of the normal configuration.
        Returns:
        The configuration values set for the test mode of the operation of this process template providing all values for all mandatory entries. This will also contain the values of the normal (merged) configuration.
      • getProcessType

        String getProcessType()
        Returns the process type, which is a short term which kind of schema this template represents.
        Returns:
        The type of the process, the template is representing.
      • getVersion

        String getVersion()
        Returns the logic version of the template, which distinguishes between, for instance, the major and minor versions (1.1.x vs. 1.x.y). The version has merely a semantic meaning.
        Returns:
        A string representing a logical version number to be able to distinguish between minor and major changes.
      • getSupervisorAgent

        QualifiedAgent getSupervisorAgent()
        Returns the supervisor agent of the process template.
        Returns:
        The supervisor agent of the process template.
      • getParameters

        Set<ProcessModelParameter> getParameters​(ActivityConstants.AccessType accessType)
        Returns the input or output parameters of the process. The actual content of the set depends on the parameter accessType which determines, if the parameters for READ or WRITE access are required.
        Parameters:
        accessType - the type of the parameter, i.e. READ or WRITE access
        Returns:
        The input or output parameters.
      • getDeltaLayer

        TemplateDeltaLayer getDeltaLayer()
        Returns the delta layer of the template. The delta layer stores the differences between two template versions. See the description of TemplateDeltaLayer for further detail.
        Returns:
        The delta layer of the template.
      • getInstanceNameTemplate

        String getInstanceNameTemplate()
        Gets a (string) template for the name of instances created on this process template. When instantiating this template, the variables in the returned string are replaced and the result is used as the name of the created process instance. Note that this name usually does have variables referring to data elements but this is not necessary. A statically defined instance name is also fine.
        If this instance name template is not set at all, the method returns null and during execution a default value is used.
        Returns:
        A string as a template for the names of the process instance of this process template, or null if not set.
      • getNode

        Node getNode​(int nodeID)
        Returns the node with the given ID. If the template does not contain a node with the given id, the method returns null.
        Parameters:
        nodeID - The id of the node.
        Returns:
        The node with the given ID.
      • getEdge

        Edge getEdge​(int srcNodeID,
                     int destNodeID,
                     ProcessConstants.EdgeType type)
        Returns the edge which is identified by the given source nodeID, destination nodeID and the edge type. If the template does not contain the specified edge, the method returns null.
        Parameters:
        srcNodeID - The source node of the edge.
        destNodeID - The destination node of the edge.
        type - The type of the edge, e.g. control edge.
        Returns:
        The edge identified by the argument.
      • getDataElement

        DataElement getDataElement​(int dataElementID)
        Returns the data element with the given ID. If the template does not contain a data element with the given id, the method returns null.
        Parameters:
        dataElementID - The ID of the data element.
        Returns:
        The data element with the given ID.
      • getDataEdge

        DataEdge getDataEdge​(int nodeID,
                             int dataElementID,
                             ActivityConstants.AccessType type)
        Returns the data edge which is identified by the given node, the data element and the direction (reading or writing). If the template does not contain the specified data-edge, the method returns null.
        Parameters:
        nodeID - The node which reads or writes the data element.
        dataElementID - The data element being accessed by the node.
        type - The access type of the node (reading, or writing)
        Returns:
        The described data edge.
      • getDataElement

        DataElement getDataElement​(int nodeID,
                                   int connector)
        The data element which is associated to the given node and the given connector of the node. For further detail concerning the connector, please refer to Node. If the template does not contain a data element specified by nodeID and connector, the method returns null.
        Parameters:
        nodeID - The node which accesses the data element.
        connector - The connector of the given node, which is associated with the data element.
        Returns:
        The associated data element.
      • getStartNode

        Node getStartNode()
        Returns the start node of the process.
        Returns:
        The start node of the process.
      • getEndNode

        Node getEndNode()
        Returns the end node of the process.
        Returns:
        The end node of the process.
      • getNodes

        Set<Node> getNodes()
        Returns a set of all nodes which are in the template.
        Returns:
        All nodes of the graph.
      • getDataElements

        Set<DataElement> getDataElements()
        Returns all data elements of the template.
        Returns:
        All data elements of the template.
      • getEdgeStructure

        Set<StructuredEdge> getEdgeStructure​(ProcessConstants.EdgeType... edgeTypes)
        Convenient method which returns all edges including their structural data. This method is intended e.g. to easily export the data.
        Parameters:
        edgeTypes - The edge types to consider.
        Returns:
        All edges including structural data.
      • getDataEdgeStructure

        Set<StructuredDataEdge> getDataEdgeStructure()
        Convenient method which returns all data edges including their structural data. This method is intended e.g. to easily export the data.
        Returns:
        All data edges including structural data.
      • getNodeType

        ProcessConstants.NodeType getNodeType​(int nodeID)
        Returns the constant representing the type of the designated node.
        Parameters:
        nodeID - The ID of the node.
        Returns:
        The type of the node, for instance Start, End, Split or Join.
        See Also:
        ProcessConstants.NodeType
      • getNodeTopologicalID

        int getNodeTopologicalID​(int nodeID)
        Returns corresponding topological ID of the node. The topological sorting is used to have a unambiguously ID within the graph. It counts from left to right and from top to down in case of split nodes.
        Parameters:
        nodeID - The (static) ID of the node.
        Returns:
        The topological ID of the node.
      • getNodeIDForTopologicalID

        int getNodeIDForTopologicalID​(int topologicalNodeID)
        Returns the static node ID for the given topological node ID. This is the inverse of getNodeTopologicalID(int).
        Parameters:
        topologicalNodeID - The topological ID of the node.
        Returns:
        The (static) node ID for the given topological node ID.
      • getNodeBranchID

        int getNodeBranchID​(int nodeID)
        Returns the ID of the branch the given node belongs to. Different branches occur by a split node which separates the control flow into two new branches.
        Parameters:
        nodeID - The id of the node.
        Returns:
        The id of the branch.
      • getNodeSplitNodeID

        int getNodeSplitNodeID​(int nodeID)
        Returns the ID of the first split node of the branch of the given node, following the control flow backward. I.e. the node which is the "starter" of the branch of the current stored in the template and does not need to be calculated dynamically. TODO attach image
        Parameters:
        nodeID - The id of the node.
        Returns:
        The ID of the first split node following the control flow backward.
      • getNodeCorrespondingBlockNodeID

        int getNodeCorrespondingBlockNodeID​(int nodeID)
        Returns the ID of the corresponding block node.
        There are always two nodes in a block which are the first and the last node of the block. E.g. the node which represents an and-split, and the the one which represents an and-join (same for other block building nodes). If, and only if, the current node builds a block (e.g. split or join), this function returns the corresponding block building node at the other end. Nodes subject to have a corresponding block node: split, join, loop.
        Parameters:
        nodeID - The id of the node.
        Returns:
        The ID of the corresponding block node.
      • getDataElementsForNode

        int[] getDataElementsForNode​(int nodeId,
                                     ActivityConstants.AccessType... accessType)
        Gets the IDs of all data elements which are accessed by the designated node with the designated access types.
        Parameters:
        nodeId - The ID of the node which accesses the data elements.
        accessType - The types of access of the node (e.g. reading and/or writing).
        Returns:
        The IDs of all data elements which are accessed by the node.
      • getNodesForDataElement

        int[] getNodesForDataElement​(int deId,
                                     ActivityConstants.AccessType... accessType)
        Gets the IDs of all nodes accessing the designated data element with the designated access types.
        Parameters:
        deId - The ID of the data element which is accessed.
        accessType - The types of access of the node (e.g. reading and/or writing).
        Returns:
        The IDs of the nodes which access the designated data element.
      • getConnector

        int getConnector​(int nodeID,
                         int dataElementID,
                         ActivityConstants.AccessType dataEdgeType)
        Returns the connector of the given node which accesses the given data element (reading or writing). See Node for further details.
        Parameters:
        nodeID - The ID of the node.
        dataElementID - The ID of the data element.
        dataEdgeType - The type of the data edge which is connected to the returned connector.
        Returns:
        The connector which is represented by its ID or CommonConstants.INT_ID_NOT_EXISTING.
      • getUnconnectedConnectors

        int[] getUnconnectedConnectors​(int nodeID,
                                       ActivityConstants.AccessType dataEdgeType)
        (convenience method, calculated on the fly)
        Parameters:
        nodeID - The ID of the node.
        dataEdgeType - The type of the data edge which need to be connected.
        Returns:
        An array of connectors of a node, which still need to be connected.
      • getDisabledConnectors

        int[] getDisabledConnectors​(int nodeID,
                                    ActivityConstants.AccessType accessType)
        (needs to be stored)
        Parameters:
        nodeID - The ID of the node.
        accessType - The activity related access type that could be disabled
        Returns:
        An array of connectors of the given node, which have been disabled by the user. Only activity related connectors could be disabled, connectors of system access types will never be disabled.
      • getNodeIDsWithActivityTemplate

        int[] getNodeIDsWithActivityTemplate​(UUID activityTemplateVersionID)
        Returns all nodes which are linked with the given activity.
        Parameters:
        activityTemplateVersionID - The ID of the activity template.
        Returns:
        The ids of all nodes which are linked with the given activity.
      • getNodeIDsInArea

        int[] getNodeIDsInArea​(int first,
                               int last,
                               boolean includeBlocks)
        Returns the IDs of the nodes which are in the area given by the ID of a first and a last node on a branch. If the parameter includeBlocks is set to true, the result set will contain the nodes which are on block within the given area. Else, it will only contain nodes on the same branch (i.e. nodes having the same branch ID). Note: First and last node must be on the same branch, i.e. their branch ID must be the same. Otherwise, an IllegalArgumentException may be thrown. Node: The area is returned excluding the boundaries: (first,last).
        Parameters:
        first - The first node of the area.
        last - The last node of the area.
        includeBlocks - If true, the result includes nodes on blocks which are in the area, too.
        Returns:
        All IDs of nodes in the given area.
      • getSuccByEdgeType

        int[] getSuccByEdgeType​(int nodeID,
                                ProcessConstants.EdgeType... type)
        Returns the IDs of the nodes, which are direct successors of the node, following edges of the given types. If no edge type is given, any kind of edge is considered.
        Parameters:
        nodeID - The ID of the node.
        type - The edge types to consider.
        Returns:
        A set of nodes.
        See Also:
        ProcessConstants.EdgeType
      • getPredByEdgeType

        int[] getPredByEdgeType​(int nodeID,
                                ProcessConstants.EdgeType... type)
        Returns the IDs of the nodes, which are direct predecessors of the node, using edges of the given types. If no edge type is given, any kind of edge is considered.
        Parameters:
        nodeID - The ID of the node.
        type - The edge types to consider.
        Returns:
        A List of nodes.
        See Also:
        Node
      • isTransPredOf

        boolean isTransPredOf​(int currentNodeID,
                              int potentialPredecessorID,
                              ProcessConstants.EdgeType... edgeType)
        Returns true, if this node is a (transitive) predecessor of the given node, respecting the given edge type. If no edge type is given, any kind of edge is considered (at the moment control and sync-edges only).
        Parameters:
        currentNodeID - The node.
        potentialPredecessorID - The potential predecessor.
        edgeType - The edge types to consider.
        Returns:
        True, if this node is a predecessor of the given node.
      • getMinBlock

        int[] getMinBlock​(Set<Node> nodes)
        Returns the minimal block of the given set of nodes. TODO add description / image (or refer to a description)
        Parameters:
        nodes - The set of nodes, the minimal block will be build upon.
        Returns:
        The start and end node id of the corresponding minimal block.