It's all about the answers!

Ask a question

Programmatically read operation behavior (Restrict Change Set Delivery to Component)

Sanjeev Kulkarni (331822) | asked May 05 '15, 9:03 a.m.
We have many streams owned by different Team areas.
Components in the stream are owned by different Project areas (for external access restriction)
Change sets delivery to components of streams is restricted via operation behavior -> Deliver(Server) -> Preconditions and follow up actions -> Restrict Change Set Delivery to Component

I am developing application to display all components of a specific stream along with delivery restrictions enforced on them. This information becomes handy to show/figure who all have access to components, who all can deliver to component.

I am able to get all components of specific stream but currently stuck with second part. Any hint/sample source on how to read Restrict Change Set Delivery to Component precondition is much appreciated.

Accepted answer

permanent link
Martha (Ruby) Andrews (3.0k44351) | answered May 05 '15, 1:13 p.m.
If you are using REST, check out the OperationReport to see if it is what you need:

If you are using the Java API, IClientProcess.getAdvisorDeclarations may be what you need. Here is the javadoc:
     * Returns the collection of advisors declarations which are configured for
     * the given operation relative to the given process area. The returned
     * advisor declarations correspond to the advisors which would be run if an
     * operation with the given id and process area were advised by this
     * process.
     * <p>
     * Note that this method only works for team operations. For project
     * operations, use {@link #getAdvisorDeclarations(String, IProgressMonitor)}
     * instead.
     * @param processArea the starting process area
     * @param operationId the operation id
     * @param monitor the progress monitor or <code>null</code>
     * @return the advisor declarations which are configured for the given
     *         operation relative to the given area
     * @LongOp This is a long operation; it may block indefinitely; must not be
     *         called from a responsive thread.
    IAdvisorDeclaration[] getAdvisorDeclarations(IProcessArea processArea, String operationId, IProgressMonitor monitor) throws TeamRepositoryException;

Hope that helps,

Martha (Ruby) Andrews
Jazz Foundation L3 Development Team Lead
Sanjeev Kulkarni selected this answer as the correct answer

Sanjeev Kulkarni commented May 06 '15, 12:02 p.m.

Thanks Martha this works!

Your answer

Register or to post 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.