Class AssignEmptyEmbeddedSubprocess


  • public class AssignEmptyEmbeddedSubprocess
    extends Object
    Change operation for the creation/assignment of an empty embedded subprocess on a node. Call isPossible first to check if the assignment is valid, than call perform operation to execute the change. TODO Refactor; use a common interface for change operations.
    • Constructor Detail

      • AssignEmptyEmbeddedSubprocess

        public AssignEmptyEmbeddedSubprocess()
    • Method Detail

      • isPossible

        public static boolean isPossible​(Template template,
                                         int nodeID)
        Checks if the assignment of an empty embedded subprocess is valid (concerning structural correctness) for the given template.
        Parameters:
        template - the template where the method is performed on
        nodeID - the ID of the node where the empty embedded subprocess should be assigned
        Returns:
        returns True if the mapping is valid
      • isPossible

        public static boolean isPossible​(Template template,
                                         int nodeID,
                                         CheckReport checkReport)
        Checks if the assignment of an empty embedded subprocess is valid (concerning structural correctness) for the given template. If the check fails the reason is stored in the given checkReport (provided that checkReport is not null)
        Parameters:
        template - the template where the method is performed on
        nodeID - the ID of the node where the empty embedded subprocess should be assigned
        checkReport - an (empty) checkReport object which contains the reason why the isPossible failed (i.e. in the case the method returns false), may be null
        Returns:
        returns True if the mapping is valid
      • isPossible

        public static boolean isPossible​(Instance instance,
                                         int nodeID)
        Checks if the assignment of an empty embedded subprocess is valid (concerning structural and state-based correctness) for the given instance.
        Parameters:
        instance - the changeable instance where the method is performed on
        nodeID - the ID of the node where the empty embedded subprocess should be assigned
        Returns:
        returns True if the mapping is valid
      • isPossible

        public static boolean isPossible​(Instance instance,
                                         int nodeID,
                                         CheckReport checkReport)
        Checks if the assignment of an empty embedded subprocess is valid (concerning structural and state-based correctness) for the given instance. If the check fails the reason is stored in the given checkReport (provided that checkReport is not null)
        Parameters:
        instance - the changeable instance where the method is performed on
        nodeID - the ID of the node where the empty embedded subprocess should be assigned
        checkReport - an (empty) checkReport object which contains the reason why the isPossible failed (i.e. in the case the method returns false), may be null
        Returns:
        returns True if the mapping is valid
      • performOperation

        public static void performOperation​(SessionToken session,
                                            ChangeableTemplate template,
                                            int nodeID)
        Creates and assigns an empty embedded subprocess to a node in the given template.
        Parameters:
        session - The session which is used to check for access rights on this method.
        template - the template where the method is performed on
        nodeID - the ID of the node where the EBP is to be assigned
      • performOperation

        public static void performOperation​(SessionToken session,
                                            ChangeableTemplate template,
                                            int nodeID,
                                            UpdateManager updateManager)
        Creates and assigns an empty embedded subprocess to a node in the given template (with updateManager).
        Parameters:
        session - The session which is used to check for access rights on this method.
        template - the changeable template where the method is performed on
        nodeID - the ID of the node where the EBP is to be assigned
        updateManager - the manager who controls the update of the visual graph components. (maybe null)
      • performOperation

        public static void performOperation​(SessionToken session,
                                            ChangeableInstance instance,
                                            int nodeID)
        Creates and assigns an empty embedded subprocess to a node in the given instance.
        Parameters:
        session - The session which is used to check for access rights on this method.
        instance - the changeable instance where the method is performed on
        nodeID - the ID of the node where the EBP is to be assigned
      • performOperation

        public static void performOperation​(SessionToken session,
                                            ChangeableInstance instance,
                                            int nodeID,
                                            UpdateManager updateManager)
        Creates and assigns an empty embedded subprocess to a node in the given instance (with updateManager).
        Parameters:
        session - The session which is used to check for access rights on this method.
        instance - the changeable instance where the method is performed on
        nodeID - the ID of the node where the EBP is to be assigned
        updateManager - the manager who controls the update of the visual graph components. (maybe null)
      • performOperation

        protected static void performOperation​(SessionToken session,
                                               ChangePrimitives processGraph,
                                               int nodeID,
                                               UpdateManager updateManager)
        Worker method to do the structural changes for both changeable templates and changeable instances.
        Parameters:
        session - The session which is used to check for access rights on this method.
        processGraph - an instance of type ChangeableTemplate or ChangeableInstance
        nodeID - the ID of the node where the subprocess is to be assigned
        updateManager - the manager who controls the update of the visual graph components. (maybe null)