Class AssignExecutableBusinessProcess

java.lang.Object
de.aristaflow.adept2.core.changeoperations.AssignExecutableBusinessProcess

public class AssignExecutableBusinessProcess extends Object
Change operation for the assignment of an executable business process (activity or sub-process/lightweight-process) to 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 Details

    • AssignExecutableBusinessProcess

      public AssignExecutableBusinessProcess()
  • Method Details

    • isPossibleId

      public static boolean isPossibleId(Template template, Node node, ExecutableBusinessProcess ebp, Map<ActivityConstants.AccessType,Map<ProcessModelParameter,ProcessConstants.DataMappingType>> paramsWithoutExistingDataElements, Map<ActivityConstants.AccessType,Map<ProcessModelParameter,Integer>> paramsWithExistingDataElements)
      Checks if the assignment of the EBP - especially the mappings in the given maps - are valid (concerning structural correctness) for the given template.
      Parameters:
      template - the template where the method is performed on
      node - the node where the EBP should be assigned
      ebp - an activity or lightweight process which should be assigned to the node
      paramsWithoutExistingDataElements - a map which uses AccessType.READ/WRITE to specify if the inner map contains input or output parameters. The inner map contains only those parameters and their DataMappingType which are not mapped to already existing data elements.
      paramsWithExistingDataElements - a map which uses AccessType.READ/WRITE to specify if the inner map contains a mapping between input or output parameters and already existing data elements
      Returns:
      returns True if the mapping is valid
    • isPossibleId

      public static boolean isPossibleId(Template template, Node node, ExecutableBusinessProcess ebp, Map<ActivityConstants.AccessType,Map<ProcessModelParameter,ProcessConstants.DataMappingType>> paramsWithoutExistingDataElements, Map<ActivityConstants.AccessType,Map<ProcessModelParameter,Integer>> paramsWithExistingDataElements, CheckReport checkReport)
      Checks if the assignment of the EBP - especially the mappings in the given maps - are 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
      node - the node where the EBP should be assigned
      ebp - an activity or lightweight process which should be assigned to the node
      paramsWithoutExistingDataElements - a map which uses AccessType.READ/WRITE to specify if the inner map contains input or output parameters. The inner map contains only those parameters and their DataMappingType which are not mapped to already existing data elements
      paramsWithExistingDataElements - a map which uses AccessType.READ/WRITE to specify if the inner map contains a mapping between input or output parameters and already existing data elements
      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
    • isPossibleId

      public static boolean isPossibleId(ChangeableInstance instance, Node node, ExecutableBusinessProcess ebp, Map<ActivityConstants.AccessType,Map<ProcessModelParameter,ProcessConstants.DataMappingType>> paramsWithoutExistingDataElements, Map<ActivityConstants.AccessType,Map<ProcessModelParameter,Integer>> paramsWithExistingDataElements)
      Checks if the assignment of the EBP - especially the mappings in the given maps - are valid (concerning structural and state-based correctness) for the given instance.
      Parameters:
      instance - the changeable instance where the method is performed on
      node - the node where the EBP should be assigned
      ebp - an activity or lightweight process which should be assigned to the node
      paramsWithoutExistingDataElements - a map which uses AccessType.READ/WRITE to specify if the inner map contains input or output parameters. The inner map contains only those parameters and their DataMappingType which are not mapped to already existing data elements.
      paramsWithExistingDataElements - a map which uses AccessType.READ/WRITE to specify if the inner map contains a mapping between input or output parameters and already existing data elements
      Returns:
      returns True if the mapping is valid
    • isPossibleId

      public static boolean isPossibleId(ChangeableInstance instance, Node node, ExecutableBusinessProcess ebp, Map<ActivityConstants.AccessType,Map<ProcessModelParameter,ProcessConstants.DataMappingType>> paramsWithoutExistingDataElements, Map<ActivityConstants.AccessType,Map<ProcessModelParameter,Integer>> paramsWithExistingDataElements, CheckReport checkReport)
      Checks if the assignment of the EBP - especially the mappings in the given maps - are 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
      node - the node where the EBP should be assigned
      ebp - an activity or lightweight process which should be assigned to the node
      paramsWithoutExistingDataElements - a map which uses AccessType.READ/WRITE to specify if the inner map contains input or output parameters. The inner map contains only those parameters and their DataMappingType which are not mapped to already existing data elements
      paramsWithExistingDataElements - a map which uses AccessType.READ/WRITE to specify if the inner map contains a mapping between input or output parameters and already existing data elements
      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, Node node, ExecutableBusinessProcess ebp, Map<ActivityConstants.AccessType,Map<ProcessModelParameter,ProcessConstants.DataMappingType>> paramsWithoutExistingDataElements, Map<ActivityConstants.AccessType,Map<ProcessModelParameter,Integer>> paramsWithExistingDataElements)
      Assigns an executable business process to a node in the given template using the given maps to create a correct mapping between parameters and dataElements via connectors.
      Parameters:
      session - The session which is used to check for access rights on this method.
      template - the template where the method is performed on
      node - the node where the EBP is to be assigned
      ebp - an activity or lightweight process which is to be assigned to the node
      paramsWithoutExistingDataElements - a map which uses AccessType.READ/WRITE to specify if the inner map contains input or output parameters. The inner map contains only those parameters and there DataMappingType which are not mapped to already existing data elements
      paramsWithExistingDataElements - a map which uses AccessType.READ/WRITE to specify if the inner map contains a mapping between input or output parameters and already existing data elements
    • performOperation

      public static void performOperation(SessionToken session, ChangeableTemplate template, Node node, ExecutableBusinessProcess ebp, Map<ActivityConstants.AccessType,Map<ProcessModelParameter,ProcessConstants.DataMappingType>> paramsWithoutExistingDataElements, Map<ActivityConstants.AccessType,Map<ProcessModelParameter,Integer>> paramsWithExistingDataElements, UpdateManager updateManager)
      Assigns an executable business process to a node in the given template using the given maps to create a correct mapping between parameters and dataElements via connectors (with updateManager).
      Parameters:
      session - The session which is used to check for access rights on this method.
      template - the template where the method is performed on
      node - the node where the EBP is to be assigned
      ebp - an activity or lightweight process which is to be assigned to the node
      paramsWithoutExistingDataElements - a map which uses AccessType.READ/WRITE to specify if the inner map contains input or output parameters. The inner map contains only those parameters and there DataMappingType which are not mapped to already existing data elements
      paramsWithExistingDataElements - a map which uses AccessType.READ/WRITE to specify if the inner map contains a mapping between input or output parameters and already existing data elements
      updateManager - the manager who controls the update of the visual graph components. (maybe null)
    • performOperation

      public static void performOperation(SessionToken session, ChangeableInstance instance, Node node, ExecutableBusinessProcess ebp, Map<ActivityConstants.AccessType,Map<ProcessModelParameter,ProcessConstants.DataMappingType>> paramsWithoutExistingDataElements, Map<ActivityConstants.AccessType,Map<ProcessModelParameter,Integer>> paramsWithExistingDataElements)
      Assigns an executable business process to a node in the given instance using the given maps to create a correct mapping between parameters and dataElements via connectors.
      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
      node - the node where the EBP is to be assigned
      ebp - an activity or lightweight process which is to be assigned to the node
      paramsWithoutExistingDataElements - a map which uses AccessType.READ/WRITE to specify if the inner map contains input or output parameters. The inner map contains only those parameters and there DataMappingType which are not mapped to already existing data elements
      paramsWithExistingDataElements - a map which uses AccessType.READ/WRITE to specify if the inner map contains a mapping between input or output parameters and already existing data elements
    • performOperation

      public static void performOperation(SessionToken session, ChangeableInstance instance, Node node, ExecutableBusinessProcess ebp, Map<ActivityConstants.AccessType,Map<ProcessModelParameter,ProcessConstants.DataMappingType>> paramsWithoutExistingDataElements, Map<ActivityConstants.AccessType,Map<ProcessModelParameter,Integer>> paramsWithExistingDataElements, UpdateManager updateManager)
      Assigns an executable business process to a node in the given instance using the given maps to create a correct mapping between parameters and dataElements via connectors (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
      node - the node where the EBP is to be assigned
      ebp - an activity or lightweight process which is to be assigned to the node
      paramsWithoutExistingDataElements - a map which uses AccessType.READ/WRITE to specify if the inner map contains input or output parameters. The inner map contains only those parameters and there DataMappingType which are not mapped to already existing data elements
      paramsWithExistingDataElements - a map which uses AccessType.READ/WRITE to specify if the inner map contains a mapping between input or output parameters and already existing data elements
      updateManager - the manager who controls the update of the visual graph components. (maybe null)
    • performOperation

      protected static void performOperation(SessionToken session, ChangePrimitives processGraph, Node node, ExecutableBusinessProcess ebp, Map<ActivityConstants.AccessType,Map<ProcessModelParameter,ProcessConstants.DataMappingType>> paramsWithoutExistingDataElements, Map<ActivityConstants.AccessType,Map<ProcessModelParameter,Integer>> paramsWithExistingDataElements, 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
      node - the node where the EBP is to be assigned
      ebp - an activity or lightweight process which is to be assigned to the node
      paramsWithoutExistingDataElements - a map which uses AccessType.READ/WRITE to specify if the inner map contains input or output parameters. The inner map contains only those parameters and there DataMappingType which are not mapped to already existing data elements
      paramsWithExistingDataElements - a map which uses AccessType.READ/WRITE to specify if the inner map contains a mapping between input or output parameters and already existing data elements
      updateManager - the manager who controls the update of the visual graph components. (maybe null)