public interface ChangePrimitives
The ProcessChangePrimitive interface provides all basic functions for changing a process (template or instance). These primitive functions do not care about the graph being valid and might leave it invalid. Their purpose is to provide all basic needs for a higher level set of change operations.
If the following descriptions refer to a "process", it is either aTemplate or an Instance.
TODO describe change transactions; usage of topo-IDs, branchIDs,
splitNodeIDs, correspondingBIDs within a transaction is not allowed /
possible. TODO describe the different internal behaviour of the primitives
concerning changes on template and instance level.
########## TODO Add a generic description like the following
If this method is called in the context of an instance specific change, the
changed attribute (including at least the id of the data element) is stored
in the delta layer. In the context of a process type change (Template) - in
addition to storing the changed attribute in the delta layer - the attribute
specified by dataElementProperty is overwritten by the changed
attribute value included in the dataElement object, i.e the
change is materialised (see TWiki "Flexibilitaet" for further detail).
###########
While performing changes it may not be relied on the topological sorting.
This applies to internal functions of template as well as functions using the
topological sorting. Depending on the implementation of the processmodel the
described situation can be pointed out by setting a special "topSortUsable"
flag at the beginning of a change transaction which is reset at the end of
the transaction by endTransaction() .
Note: TODO This part needs further description concerning pre-conditions and effects of the functions! Furthermore its important to describe the differences between the implementation of the change primitives for templates (direct materialisation and delta layer)and instances (only delta layer).
| Modifier and Type | Method and Description |
|---|---|
DataEdge |
addDataEdge(int node,
int dataElement,
DataEdge dataEdge)
Use this method to connect a data element to a node which does not have an
assigned activity yet.
|
DataEdge |
addDataEdge(int node,
int connector,
int dataElement,
DataEdge dataEdge)
This method is called when the node has an assigned activity.
|
DataElement |
addDataElement(DataElement dataElement)
Adds a new data element to the process, using the values of the given
data element object.
|
void |
addDisabledConnector(int nodeID,
int connectorID)
Adds the information that a connector (respectively its corresponding parameter) is disabled to the template
|
Edge |
addEdge(int srcNodeID,
int destNodeID,
Edge edge)
Add an edge between the given nodes, using the values of the
given edge object (e.g. the edge type).
|
void |
addMovedNode(int node)
Adds a moved node as meta-information to a process
Note: This method is not necessary for a correct process representation but
essential for an efficient schema evolution.
|
Node |
addNode(Node node)
Creates a new node in the process, using the data of the given object.
|
void |
endTransaction()
Signals the end of a change transaction and corrects the topological
sorting.
|
void |
reMapDataElement(int dataElementID,
int nodeID,
ActivityConstants.AccessType type,
java.lang.String parameterName)
This method remaps a data element to the given parameter of a node.
|
void |
removeDataEdge(int node,
int dataElement,
ActivityConstants.AccessType dataEdgeType)
Removes the data edge between the given node and data element and of the
given access type from the process.
|
void |
removeDataElement(int dataElementID)
Removes a data element from a process, without caring about existing data
accesses from nodes.
|
void |
removeDisabledConnector(int nodeID,
int connectorID)
Removes the information that a connector (respectively its corresponding parameter) is disabled
|
void |
removeEdge(int srcNodeID,
int destNodeID,
ProcessConstants.EdgeType edgeType)
Removes the edge of the given type between the given nodes.
|
void |
removeNode(int nodeID)
Removes the node with the given ID from the template, without caring about
any possibly affected edges.
|
void |
removeUserAttribute(UserAttributeContainer container,
java.lang.String name)
Removes the User defined Attribute identified by name.
|
void |
setBranchID(int startNodeID,
int endNodeID,
boolean newIDNecessary,
int existingID)
Sets the branch ID attribute of the nodes between
startNodeID
and endNodeID. |
void |
setCorrespondingBlockNode(int split,
int join)
Sets the corresponding block node attribute for the split node with ID
split to the value given by join. |
void |
setInputParameters(java.util.Set<ProcessModelParameter> inputParameters)
Sets the input parameters of the process.
|
void |
setName(java.lang.String name)
Set the name of the process.
|
void |
setNodeType(int nodeID,
ProcessConstants.NodeType type)
Sets the type of the given node.
|
void |
setOutputParameters(java.util.Set<ProcessModelParameter> outputParameters)
Sets the output parameters of the process.
|
void |
setSplitNodeID(int startNodeID,
int endNodeID,
int splitNodeID)
Sets the split node ID attribute of the nodes between
startNodeID
and endNodeID. |
void |
setSupervisorAgent(QualifiedAgent supervisorAgent)
Set the agent ID of the supervisor of the process.
|
void |
startTransaction()
Signals the beginning of a change transaction.
|
DataEdge |
updateDataEdge(int nodeID,
int dataElementID,
ActivityConstants.AccessType accessType,
DataEdge dataEdge,
ProcessConstants.DataEdgeProperty... dataEdgeProperties)
Updates the data edge attribute given by dataEdgeProperty.
|
DataElement |
updateDataElement(DataElement dataElement,
ProcessConstants.DataElementProperty... dataElementProperties)
Updates the data element attributes given by
dataElementProperties. |
Edge |
updateEdge(int srcNodeID,
int destNodeID,
Edge edge,
ProcessConstants.EdgeProperty... edgeProperty)
Updates the edge which is identified by the given source and destination
node IDs and the type of the edge (i.e. stored in the Edge object).
|
void |
updateExecutableBusinessProcess(int nodeID,
ExecutableBusinessProcess ebp,
ProcessConstants.ExecutableBusinessProcessProperty... ebpProperties)
Updates the Executable Business Process of the node with the given ID,
using the values of the given EBP object.
|
Node |
updateNode(Node node,
ProcessConstants.NodeProperty... nodeProperties)
Updates a node object using the data in the given node.
|
void |
updatePluginDataContainer(PluginDataContainer pluginContainer,
java.lang.String extensionPointID,
java.lang.String pluginDataID,
PluginData pluginData)
Sets the plug in data for the extension point in the plug in data
container.
|
void |
updateUserAttribute(UserAttributeContainer container,
java.lang.String name,
java.lang.String value)
Sets the value of the user defined attribute identified by name to
value.
|
void startTransaction()
ChangePrimitives for further information.void endTransaction()
ChangePrimitives for further information.void setName(java.lang.String name)
name - The name of the process.void setSupervisorAgent(QualifiedAgent supervisorAgent)
supervisorAgent - The supervisor agent of the process.void setInputParameters(java.util.Set<ProcessModelParameter> inputParameters)
inputParameters - the input parametersvoid setOutputParameters(java.util.Set<ProcessModelParameter> outputParameters)
outputParameters - the output parametersNode addNode(Node node)
node - The data for the new node.Node updateNode(Node node, ProcessConstants.NodeProperty... nodeProperties)
getExecutableBusinessProcess() of the given node returns
null, the EBP and the parameter/data-connector mapping is removed from the
node as well as all data-connectors which are not connected (i.e marked as
disabled or connect later) with a data edge. #updateExecutableBusinessProcess(int, ExecutableBusinessProcess, ExecutableBusinessProcessProperty[]).node - A temporary node object, containing the new values.nodeProperties - Possible values of NodeProperty are described above.void removeNode(int nodeID)
nodeID - The ID of the node to be removed.void setNodeType(int nodeID,
ProcessConstants.NodeType type)
nodeID - The ID of the node to be changed.type - the type the node is to be setjava.lang.IllegalArgumentException - if nodeID does not existTemplate.getNodeType(int)void setCorrespondingBlockNode(int split,
int join)
split to the value given by join.split - ID of the split node.join - ID of the corresponding join node.void setBranchID(int startNodeID,
int endNodeID,
boolean newIDNecessary,
int existingID)
startNodeID
and endNodeID. startNodeID and endNodeID
have to be on the same branch, nodes which are inside of blocks on that
branch, are not considered.
Preconditions:
- To be able to navigate through the graph, all edges within the given
range must be set.
- For efficient navigation, all split-nodes between startNodeID and
endNodeID must have their corresponding join-node attribute set.
If the parameter newIDNecessary is set to true, a new
branch ID will be created and set (in this case, the value of
existingID will be ignored).
If the parameter newIDNecessary is set to false, the branchID
in the parameter existingID will be set. Note: The given
branchID must already exist!startNodeID - The ID of the node which marks the beginning of the sequence.endNodeID - The ID of the node which marks the end of the sequence.newIDNecessary - If set to true, a new branch ID will be generated and used.existingID - If newIDNecessary is false, this ID will be used.void setSplitNodeID(int startNodeID,
int endNodeID,
int splitNodeID)
startNodeID
and endNodeID. startNodeID and endNodeID
have to be on the same branch, nodes which are inside of blocks on that
branch, are not considered.
Preconditions:
- To be able to navigate through the graph, all edges within the given
range must be set.
- For efficient navigation, all split-nodes between startNodeID and
endNodeID must have their corresponding join-node attribute set.
The ID of the parameter splitNodeID will be set to all of
the described nodes. Note: The node of the given ID must exist in the
process.startNodeID - The ID of the node which marks the beginning of the sequence.endNodeID - The ID of the node which marks the end of the sequence.splitNodeID - The ID of the split node.void reMapDataElement(int dataElementID,
int nodeID,
ActivityConstants.AccessType type,
java.lang.String parameterName)
dataElementID - nodeID - type - parameterName - void addDisabledConnector(int nodeID,
int connectorID)
nodeID - the id of the node where the connector is to be marked as disabledconnectorID - the connector idvoid removeDisabledConnector(int nodeID,
int connectorID)
nodeID - the id of the node where the disabled connector is to be removedconnectorID - the connector idvoid updateExecutableBusinessProcess(int nodeID,
ExecutableBusinessProcess ebp,
ProcessConstants.ExecutableBusinessProcessProperty... ebpProperties)
nodeID - The ID of the node, the given EBP belongs to.ebp - The executable business process.ebpProperties - The properties of the EBP which should be updated.ExecutableBusinessProcessEdge addEdge(int srcNodeID, int destNodeID, Edge edge)
srcNodeID - The source node.destNodeID - The destination node.edge - The object containing the values for the new edge.ProcessConstants.EdgeTypeEdge updateEdge(int srcNodeID, int destNodeID, Edge edge, ProcessConstants.EdgeProperty... edgeProperty)
srcNodeID - The ID of the node the Edge starts at.destNodeID - The ID of the node the Edge ends at.edge - The temporary Edge object conatining the new values.edgeProperty - The values to be updated.void removeEdge(int srcNodeID,
int destNodeID,
ProcessConstants.EdgeType edgeType)
srcNodeID - The ID of the source node.destNodeID - The ID of the destination node.edgeType - The type of the edge.DataElement addDataElement(DataElement dataElement)
ProcessConstants.AdeptDataType.USERDEFINED.
If the value of the USER_ATTRIBUTE property is null, it will be assumed
that the data element does not have any user attribute.
All other attributes must be set.dataElement - DataElement updateDataElement(DataElement dataElement, ProcessConstants.DataElementProperty... dataElementProperties)
dataElementProperties. The values
of the changed attributes are contained in the given dataElement itself.
The given data element is used as a container only.
The following attributes / properties may be updated:
dataElement - The name of the data element.dataElementProperties - A constant describing the changed data element attributevoid removeDataElement(int dataElementID)
dataElementID - The ID of the data element to remove.DataEdge addDataEdge(int node, int connector, int dataElement, DataEdge dataEdge)
node - The node which is accessing the data element.connector - the connector where the data edge is connected todataElement - The data element which will be accesseddataEdge - DataEdge addDataEdge(int node, int dataElement, DataEdge dataEdge)
node - The node which is accessing the data element.dataElement - The data element which will be accesseddataEdge - a temporary data edge object which contains the data edge
attributesDataEdge updateDataEdge(int nodeID, int dataElementID, ActivityConstants.AccessType accessType, DataEdge dataEdge, ProcessConstants.DataEdgeProperty... dataEdgeProperties)
nodeID - The ID of the node which is accessing the dataElement.dataElementID - The ID of the DataElement which is accessed.accessType - Whether the DataElement is read or written.dataEdge - The data edge values which are updated, in a container object.dataEdgeProperties - The properties which are updated.void removeDataEdge(int node,
int dataElement,
ActivityConstants.AccessType dataEdgeType)
node - The node which is accessing the data element.dataElement - The data element which has been accesseddataEdgeType - the type of access (read or write)void updateUserAttribute(UserAttributeContainer container, java.lang.String name, java.lang.String value)
container - The attribute container.name - The name of the user defined attribute to be modified.value - The new value.void removeUserAttribute(UserAttributeContainer container, java.lang.String name)
container - The user attribute container.name - the Name of the User defined attribute to be removedvoid updatePluginDataContainer(PluginDataContainer pluginContainer, java.lang.String extensionPointID, java.lang.String pluginDataID, PluginData pluginData)
pluginData signals that the
plug in with the given plug in ID should be removed (remove). If the
container already contains the given plug in for the given extension point,
the already existent pluginData is replaced with the given pluginData
(update). If it does not exist the pluginData is added to the given
extension point (add). Plug in data containers are e.g. Node, ...pluginContainer - the plug in container object where the method is
performed onextensionPointID - the extension point ID where the plug in data should
be updated (added/removed) namepluginDataID - the ID of the plug in datapluginData - the object which holds the pluginData or null to remove
from the extension point.void addMovedNode(int node)
moveNodes .node - The name of the moved node