It's all about the answers!

Ask a question

What is the difference between "Deliver (server)" operation and "Deliver Phase 2" one ?


Yasuyuki Kubota (341015) | asked Jan 30 '14, 8:30 p.m.
I supposed to implement a server side operation participant by a deliver operation.
I wonder which operation Id is better.
What is the difference between "Deliver (server)" and "Deliver Phase 2"?

Accepted answer


permanent link
Shuhichi Saitoh (20048) | answered Jan 31 '14, 4:21 a.m.
I found the description the difference of those 2 operations in the javadoc of ISCMDelta class.
Seems that, if you need the "contents" or the "properties" or the full path of the file is required to implement the behavior you need to use phase 2. Otherwise you can use phase1 so that you may save the computer power when your process adviser stops the farther operation.


The followings are the quote from the javadoc of v4.0.2 SDK
com.ibm.team.scm.common.process.IScmDelta

Phase 1

Process operation that occurs before the change history of a stream is modified, allowing for an advisor to quickly fail an operation before the new state of the stream is calculated. Provides a listing of change sets being added or removed. Runs before OPERATION_MODIFICATION .

This advisors corresponds to the "Phase 1" advisors shown in the user interface.

Advisor authors should use this when success/failure can be determined by examining change sets or items linked to change sets. It is faster to fail this operation than to wait for OPERATION_MODIFICATION to be computed.

Advisor authors should not use this operation to examine the contents of change sets (eg, file states, names, or properties). Use OPERATION_MODIFICATION instead. Computing the end state of a set of change set addition and removals is tricky and should not be done in process advisors.

Because this operation requires little computation, advisor authors should this whenever possible.

Expect deltas including: IChangeHistoryRemoveOperandDelta and IChangeHistoryAddOperandDelta .


Phase 2

ID of process operation that occurs after a stream's change history has been modified. Contains a detailed description of the file system changes caused applying a set of operands. Runs after OPERATION_OPERANDS .

This advisors corresponds to the "Phase 2" advisors shown in the user interface.

Advisor authors should use this when success/failure depends on the contents of files, properties, or the shape of the file system in a stream.

Authors should not use this operation when success/failure can be determined without looking at the contents of the file system. If success can be determined by looking at items, then OPERATION_OPERANDS should be used instead. Expect deltas including: IChangeHistoryModificationDelta .


Yasuyuki Kubota selected this answer as the correct answer

3 other answers



permanent link
Geoffrey Clemm (30.0k23035) | answered Jan 31 '14, 3:04 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I have always assumed that the purpose of these two operations is to allow you to have one group of follow-up actions that are performed first.   So if you don't care whether your follow-up is performed in the first group or the second group, you can flip a coin to decide which operation to use.  If someone believes that assumption is incorrect, please post a correction.

permanent link
Adam Wereszczynski (92811532) | answered Jan 31 '14, 3:28 a.m.
Hi Yasuki,

This subject is described in Source control process recipes for Rational Team Concert

Deliver (server)
Runs: Before delivery of baselines, change sets, or on a component replacement.
Affects: All components in streams owned by the process area.
The Deliver (server) operation runs on the server before change sets are added or removed from a component.
The operation is run on the set of change sets that are being added to (or removed from) a component, which is computationally less expensive than the subsequent Deliver Phase 2 (server) operation.

Deliver Phase 2 (server)

Runs:
Before the delivery of baselines and change sets, or on a component replacement.
Affects:
All components in streams owned by the process area.
The Phase 2 delivery operation occurs before a deliver, but after the server has calculated the computationally intensive before/after states of each item that will be modified.

permanent link
Yasuyuki Kubota (341015) | answered Jan 31 '14, 4:33 a.m.
Saitoh-san,
Thanks for your detailed information.I finally understand well.
I chose "Deliver Phase 1" because my operation participant don't need  the contents of files, properties, or the shape of the file system.

Your answer


Register or to post your answer.