Product Line Architecture Merge
As a deployed system evolves overtime new features may be added, obsolete features may be removed and existing features may be upgraded. As a result, in an evolving product line architecture, an architect may wish to capture changes made to different components and then propagate them to others. The PLADiff component can be used to capture changes between two architectures or between two different versions of the same architecture. PLADiff outputs a PLA diff document that describes the captured changes. This document is used by PLAMerge in order to move features from one variant of a product line architecture to another variant or propagating changes across different versions (or branches of development). The PLAMerge component is able to merge the captured differences to an architecture in terms of architectural elements (as defined by xADL 2.0) at design time.
The PLAMerge component starts at a specified location (either a Type or an ArchStructure) and
adds and removes the respective elements to the location as described in the
PLA diff document. The merging algorithm first makes the appropriate changs to the root DiffPart
.
It finds the proper location based on the Location
element defined in the
PLA diff document. Then the algorithm processes the corresponding adds and removes within that Diff Location
.
If the current DiffPart
has another DiffPart
embedded in it, then the merge algorithm processes
that DiffPart
recursively. It searches through the elements in the current location and finds the new
component that it must modify specified by the Location
element. Once found, the subsequent adds and removes
are made within this location. This processes continues recursively till all DiffParts
are processed.
The PLAMerge component issues warnings in the following three cases:
If any of these cases occur, a warning is issued and the architect is notified about where such an event has occurred. It becomes the responsibility of the architect to properly respond to the warnings according to his/her desired goals.
In addition to the adding and removing of elements from an architecture, the
PLAMerge fixes any broken links. The key thing to
note is that our merge process is description based and elements such as Signature Interface Mappings
and
Links
connect to elements based on their IDs. During the merge, when adding or removing SIMs or Links or changing elements
where the SIMs or Links are connected, their corresponding IDs change. As a result, the XML links between such elements are broken.
Therefore, as a final resort PLAMerge iterates through all possible broken Signature Interface Mappings
and Links
and fixes their XML links.
The PLAMerge component can be invoked through the UI driver or manually by sending the
PerformPLAMergeMessage
request.
PerformPLAMergeMessagepublic PerformPLAMergeMessage(String diffURL, String archURL, String startingID, boolean isStructural, String componentID)
|
Then to invoke PLAMerge:
|
When the merge process has completed, it will send out the following message:
PLAMergeStatusMessagepublic PLAMergeStatusMessage(String mergeArchURL, String componentID, int currentValue, int upperBound, boolean isDone, boolean errorOccurred, Exception error)
|
Please note that although the message can contain progress information (currentValue
and upperBound
), these fields currently are not used. The PLAMerge component does not
report on its progress during the merge process but only sends out this message when it has finished. All of these values can be obtained through a simple get operation, getX()
where X is the field name.
For example, getMergeArchURL()
would get the mergeArchURL value, getComponentID()
would get the componentID value, and so forth.
Additional questions about the PLAMerge component should be sent to Chris Van der Westhuizen.