It's all about the answers!

Ask a question

Archive the local DNG Baseline via OSLC API


Chandan M B (1133674) | asked Jan 31, 1:56 a.m.
edited Jan 31, 1:58 a.m.

 Hi ,


 I am trying to archive the local DNG baseline via OSLC API. Response based on the DNG Baseline Stream doesn't contain any information like <oslc:archived>false </oslc:archived>


Headers:
Accept : application/rdf+xml
OSLC-Core-Version : 2.0

Response :
<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:prov="http://www.w3.org/ns/prov#" xmlns:oslc_config="http://open-services.net/ns/config#" xmlns:acc="http://open-services.net/ns/core/acc#"
  xmlns:process="http://jazz.net/ns/process#">
  <oslc_config:Configuration rdf:about="https://xxx/rm/cm/baseline/_g-xnwMACEe6JT7lLBUUFRA">
    <oslc_config:streams rdf:resource="https://xxx/rm/cm/baseline/_g-xnwMACEe6JT7lLBUUFRA/streams" />
    <oslc_config:acceptedBy rdf:resource="http://open-services.net/ns/config#Configuration" />
    <oslc_config:previousBaseline rdf:resource="https://xxx/rm/cm/baseline/_TgFX8OrmEeq8Ge3glPWmUQ" />
    <oslc_config:component rdf:resource="https://xxx/rm/cm/component/_Gbfn0NHsEeiOUZ-yH9N-tg" />
    <prov:wasDerivedFrom rdf:resource="https://xxx/rm/cm/stream/_Gbj5RtHsEeiOUZ-yH9N-tg" />
    <oslc_config:selections rdf:resource="https://xxx/rm/configSelections/baseline/_g-xnwMACEe6JT7lLBUUFRA" />
    <process:projectArea rdf:resource="https://xxx/rm/process/project-areas/_GaRf0NHsEeiOUZ-yH9N-tg" />
    <acc:accessContext rdf:resource="https://xxx/rm/acclist#_GaRf0NHsEeiOUZ-yH9N-tg" />
    <dcterms:creator rdf:resource="https://xxx/jts/users/cmysore" />
    <oslc_config:overrides rdf:resource="https://xxx/rm/cm/stream/_Gbj5RtHsEeiOUZ-yH9N-tg" />
    <oslc_config:baselineOfStream rdf:resource="https://xxx/rm/cm/stream/_Gbj5RtHsEeiOUZ-yH9N-tg" />
    <dcterms:title rdf:parseType="Literal">TM XXX (RM) Master (20240131-0732)</dcterms:title>
    <dcterms:identifier>_g-xnwMACEe6JT7lLBUUFRA</dcterms:identifier>
    <oslc:serviceProvider rdf:resource="https://xxx/rm/oslc_rm/_GaRf0NHsEeiOUZ-yH9N-tg/services.xml" />
    <rdf:type rdf:resource="http://open-services.net/ns/config#Baseline" />
    <dcterms:created rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2024-01-31T06:32:33.087Z</dcterms:created>
  </oslc_config:Configuration>
</rdf:RDF>

One answer



permanent link
Ralph Schoon (63.1k33646) | answered Jan 31, 10:47 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Jan 31, 10:47 a.m.

 I think there are several issues here. Archiving does not necessarily mean that there is just an obvious attribute added. 

In addition, as far as I know, you must not just archive an arbitrary configuration. If you do so, you can mess up your data and end up with dangling configurations that lost an ancestor.
In addition, there is no OSLC API to archive configurations. It is an internal API.
I am not sure I should do that but you can find details about the internal API (disclaimer: I am not responsible for you using internal API and potentially harm your system.):

com.ibm.rm.typemanagement/src/main/java/com/ibm/requirement/typemanagement/oslc/client/automation/commands/ArchiveConfigurationCmd.java
com.ibm.rm.typemanagement/src/main/java/com/ibm/requirement/typemanagement/oslc/client/dngcm/InternalConfigurationArchiveApi.java
   



Comments
Chandan M B commented Feb 02, 3:01 a.m.

  Thanks Ralph. How do I access/refer this source code ?


Ralph Schoon commented Feb 02, 5:09 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I thought I put the links in, apparently not. The project is here: https://github.com/jazz-community/dng-type-system-management 

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.