Daisy-chaining deliver participant foiled by auto-complete
So I have a phase 2 deliver participant whose intent is to capture a workspace-to-stream deliver event and automatically deliver those same changesets to one or more other streams.
IScmDeltaSource sourceData = (IScmDeltaSource)(operation.getOperationData()); Iterable<IChangeHistoryAddOperandDelta> deltas = sourceData.getDeltas( IChangeHistoryAddOperandDelta.class );Is there any way to do this without the user having to manually complete changesets before delivering? |
One answer
Long story short is that you will not be able to do this from within the 'process advisor' code. You cannot perform 'write' operations like this during an advisor because the advisor itself will not complete it's 'write' operations until the end of it's operation/transaction. For example, a delivery of open change sets may have occurred, at which point advisors are run to 'check' (read) various states to determine if everything is "acceptable" to continue. Once all the advisor checks 'pass', then the deliver operation/transaction completes, which would 'write' to the database the new states of the change sets (which will be closed on delivery) and it would also record the actual delivery in the target stream, etc.. Given all this, it makes sense that a StaleDataExceptions or similar issues would happen if you tried various 'write' operations from within the running advisor.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.