How must a delivery session to deliver one stream to another in DNG via API have to looked like?
A change set in stream A was created. This change set is delivered via API to the stream A. The task tracker response of the delivery session is: completed and passed. Afterward the stream A is delivered via API to stream B. This works fine, if it is a new requirement artifact (also completed and passed). But if the requirement artifact was changed before on stream B, the delivery from stream A to stream B failed, if the delivery option "dominant source attribute" is used.
Here is the code to update the before created delivery session:
PUT https://example/rm/delivery-sessions/_WnjtkKoPEe6yg5uwBuHkhQ
OSLC-Core-Version: 2.0
Accept: application/rdf+xml
Content-Type: application/rdf+xml
Configuration-Context: https:/example/rm/cm/stream/_QznE4NzuEe2T6KW9b8u7AA
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:oslc="http://open-services.net/ns/core#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:dng_config ="http://jazz.net/ns/rm/dng/config#">
<dng_config:DeliverySession rdf:about="https://example/rm/delivery-sessions/_WnjtkKoPEe6yg5uwBuHkhQ">
<dng_config:deliverySessionState rdf:resource="http://jazz.net/ns/rm/dng/config#delivered"/>
<dng_config:source rdf:resource=" https://example/rm/cm/stream/_QznE4NzuEe2T6KW9b8u7AA "/>
<dng_config:target rdf:resource="https://example/rm/cm/stream/_y2jtMNzrEe2T6KW9b8u7AA"/>
<dng_config:DeliveryPolicy rdf:about="http://jazz.net/ns/rm/dng/config#DeliveryPolicy">
<dng_config:dominantSourceAttribute rdf:resource="https://example/rm/types/AD_uxZHl9kaEe2T6KW9b8u7AA"/>
<dng_config:dominantSourceAttribute rdf:resource="https://example/rm/types/AD_uxZHmtkaEe2T6KW9b8u7AA"/>
<dng_config:dominantSourceAttribute rdf:resource="https://example/rm/types/AD_uxZHmNkaEe2T6KW9b8u7AA"/>
<dng_config:dominantSourceAttribute rdf:resource="https://example/rm/types/AD_uxZHmdkaEe2T6KW9b8u7AA"/>
<dng_config:dominantSourceAttribute rdf:resource="https://example/rm/types/AD_uxZHm9kaEe2T6KW9b8u7AA"/>
<dng_config:dominantSourceAttribute rdf:resource="https://example/rm/types/AD_uxZHltkaEe2T6KW9b8u7AA"/>
<dng_config:dominantSourceAttribute rdf:resource="https://example/rm/types/AD_uxZHlNkaEe2T6KW9b8u7AA"/>
<dng_config:dominantSourceAttribute rdf:resource="https://example/rm/types/AD_JJaLkNzpEe2T6KW9b8u7AA"/>
<dng_config:dominantSourceAttribute rdf:resource="https://example/rm/types/AD_uxZHldkaEe2T6KW9b8u7AA"/>
</dng_config:DeliveryPolicy>
</dng_config:DeliverySession>
</rdf:RDF>
One answer
With the help of a colleague I have found out how it works. This line
<dng_config:DeliveryPolicy rdf:about="http://jazz.net/ns/rm/dng/config#DeliveryPolicy">
have to be changed to:
<dng_config:policy>
<dng_config:DeliveryPolicy>
<rdf:type rdf:resource="http://jazz.net/ns/rm/dng/cm#SelectiveAttributeDeliveryPolicy"/>
With this change it seems, the delivery works. All deliveries I tried have "passed" yet.
Perhaps you can update the document page: https://jazz.net/wiki/bin/view/Main/DNGConfigManagement accordingly?
Comments
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Jan 31, 7:50 a.m.It would be useful to get more information than "failed". What is the information in the task tracker? I think the merge conflict might not be treated correctly.
I don't know from https://jazz.net/wiki/bin/view/Main/DNGConfigManagement if you have to send the OSLC header. Can't tell from the specification. Should not make a difference, but I have seen issues with incorrect headers in the past.