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 Summary
Constructors Constructor Description AssignExecutableBusinessProcess()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.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.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.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.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.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).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.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).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.
-
-
-
Method Detail
-
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 onnode
- the node where the EBP should be assignedebp
- an activity or lightweight process which should be assigned to thenode
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 onnode
- the node where the EBP should be assignedebp
- an activity or lightweight process which should be assigned to thenode
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 elementsparamsWithExistingDataElements
- 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 elementscheckReport
- 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 onnode
- the node where the EBP should be assignedebp
- an activity or lightweight process which should be assigned to thenode
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 onnode
- the node where the EBP should be assignedebp
- an activity or lightweight process which should be assigned to thenode
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 elementsparamsWithExistingDataElements
- 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 elementscheckReport
- 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 onnode
- the node where the EBP is to be assignedebp
- an activity or lightweight process which is to be assigned to thenode
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 elementsparamsWithExistingDataElements
- 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 onnode
- the node where the EBP is to be assignedebp
- an activity or lightweight process which is to be assigned to thenode
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 elementsparamsWithExistingDataElements
- 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 elementsupdateManager
- 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 onnode
- the node where the EBP is to be assignedebp
- an activity or lightweight process which is to be assigned to thenode
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 elementsparamsWithExistingDataElements
- 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 onnode
- the node where the EBP is to be assignedebp
- an activity or lightweight process which is to be assigned to thenode
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 elementsparamsWithExistingDataElements
- 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 elementsupdateManager
- 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 ChangeableInstancenode
- the node where the EBP is to be assignedebp
- an activity or lightweight process which is to be assigned to thenode
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 elementsparamsWithExistingDataElements
- 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 elementsupdateManager
- the manager who controls the update of the visual graph components. (maybe null)
-
-