Interface Instance

    • Field Detail

      • serialVersionUID

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

      • getID

        UUID getID()
        Returns the (logical) ID of the instance, which is system-wide unique. This ID is likely to change when the instance itself is changed.
        Returns:
        The (logical) instance ID.
      • getLogID

        UUID getLogID()
        Returns the (internal) ID of the instance, which is for internal and log use only. In contrast to the logical ID this ID will always stay the same, even in the case of instance-specific changes.
        Returns:
        The (internal) instance ID for usage in logs and internally.
      • getName

        String getName()
        Returns the name of the instance.
        Returns:
        The name of the instance.
      • isModified

        boolean isModified()
        Returns true if the instance has been modified. This is not restricted to structural changes, therefore the instance will also be modified if e.g. the name changes.
        Returns:
        true if the instance has been modified.
      • isStructurallyModified

        boolean isStructurallyModified()
        Returns true if the instance has been modified structurally. This is restricted to structural changes, therefore the instance will not be structurally modified if e.g. the name only changes.
        Returns:
        true if the instance has been modified structurally.
      • getBaseTemplateID

        UUID getBaseTemplateID()
        Gets the ID of the template, this instance is based on. In case of an unmodified instance this equals Template.getID() from {link #getTemplate()}. In case of a modified template, this ID refers to the old (unchanged) template while getTemplate() is the modified template.
        Returns:
        The ID of the template this instance is based on. In case of a modified instance this differs from the ID of the changed template.
      • getTemplate

        Template getTemplate()
        Returns a reference to the template, which keeps the structural and element data (i.e. all non-instance-specific data). If this instance is a subprocess this template will return the corresponding subprocess template even if this is an embedded subprocess. Use getParentEBPReference() to retrieve the parent template.
        If the instance has been modified, this function will return an InstanceDeltaLayer, else it will return a Template.
        Returns:
        The structural and element data of the instance, either a Template or an InstanceDeltaLayer.
      • getSupervisorAgent

        QualifiedAgent getSupervisorAgent()
        Returns the supervisor agent of the instance.
        Returns:
        The supervisor agent of the instance.
      • getInitiatorAgent

        QualifiedAgent getInitiatorAgent()
        Returns the qualified agent who initiated the instance.
        Returns:
        The initiating agent.
      • getCreationTime

        long getCreationTime()
        Gets the date (as long) this instance has been created.
        Returns:
        The date (as long) this instance has been created.
      • getParentEBPReference

        EBPInstanceReference getParentEBPReference()
        Returns the reference to the super-instance, if this instance is a sub-process.
        Returns:
        A reference to the super instance, in case this is a sub-process.
      • getNodeState

        ProcessConstants.NodeState getNodeState​(int nodeID)
        Returns the state of the node with the given ID. Throws IllegalArgumentException if the node with the nodeID nodeID does not exist.
        Parameters:
        nodeID - The ID of the node.
        Returns:
        The state of the node as byte.
        Throws:
        IllegalArgumentException - if nodeID does not exist.
      • getExecutionMode

        ProcessConstants.ExecutionMode getExecutionMode​(int nodeID)
        Returns the execution mode of the designated node, that is production mode, component test mode or substituted test mode (the component is not called at all but substituted). If the node has not been started yet, null is returned.
        Parameters:
        nodeID - The ID of the node of which to retrieve the execution mode.
        Returns:
        Null, in case the node has not been started yet or the execution mode in which the node is or has been started.
      • getNodeIteration

        int getNodeIteration​(int nodeID)
        If the node is inside of a loop block, this function returns the number of the current iteration. Throws IllegalArgumentException if the node with the nodeID nodeID does not exist.
        Parameters:
        nodeID - The ID of the node.
        Returns:
        The current iteration count.
        Throws:
        IllegalArgumentException - if nodeID does not exist.
      • getNodeLWPInstanceID

        List<UUID> getNodeLWPInstanceID​(int nodeID)
        Returns (a list of) the IDs of the referenced instance of the current iteration, if this light weight process represents one or more (in case of variable parallelism) instances. Throws IllegalArgumentException if the node with the nodeID nodeID does not exist. If the instance has not been started yet, the returned set will be empty.
        The position of the instance ID corresponds to the index for reading elements from input parameter lists as well as for writing values to output parameter lists. TODO RuntimeException, if no LWP? if the instance has not been started yet? cf. Node#getParameterName(int)
        Parameters:
        nodeID - The ID of the node, which has a LWP as executable business process.
        Returns:
        A list of instance IDs for the designated node, if it represents one or more subprocess instances.
        Throws:
        IllegalArgumentException - if nodeID does not exist.
      • getNodeLWPInstanceID

        List<UUID> getNodeLWPInstanceID​(int nodeId,
                                        int iteration)
        Returns (a list of) the IDs of the referenced instance of the designated iteration, if this light weight process represents one or more (in case of variable parallelism) instances. Throws IllegalArgumentException if the node with the ID does not exist. If the instance has not been started yet or the iteration has not been reached, the returned set will be empty.
        The position of the instance ID corresponds to the index for reading elements from input parameter lists as well as for writing values to output parameter lists.
        Parameters:
        nodeId - The ID of the node, which has a LWP as executable business process.
        iteration - The iteration of the node for which to get the LWP(s).
        Returns:
        A list of instance IDs for the designated node and the designated iteration, if the node represents one or more subprocess instances.
        Throws:
        IllegalArgumentException - if nodeID does not exist.
      • getEdgeState

        ProcessConstants.EdgeState getEdgeState​(int srcNodeID,
                                                int destNodeID,
                                                ProcessConstants.EdgeType edgeType)
        Returns the state of the edge. The edge is specified by the IDs of its start and end node and its edge type. The value of the state is calculated on the fly and not stored. Throws IllegalArgumentException if the edge could not be found and therefore the state could not be calculated.
        Parameters:
        srcNodeID - The ID of the start node.
        destNodeID - The ID of the end node.
        edgeType - The type of the edge.
        Returns:
        The edge-state.
        Throws:
        IllegalArgumentException - if no edge could be found.
      • getPerformingAgent

        QualifiedAgent getPerformingAgent​(int nodeID)
        Returns the qualified agent who is executing or has executed the activity, null if no agent has been assigned yet due to the current node state. Throws IllegalArgumentException if the node with the nodeID nodeID does not exist.
        Parameters:
        nodeID - The ID of the node of the activity.
        Returns:
        The executing agent or null in case it is not known yet due to the node state.
        Throws:
        IllegalArgumentException - if the node does not exist.