Author Topic: Automate Requirements Import in EA (Pro cloud server)  (Read 590 times)

piku

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Automate Requirements Import in EA (Pro cloud server)
« on: October 19, 2019, 06:01:45 am »
Hello All,
I need to automate requirements import to enterprise architect.
If excel file or (sql table from other system) has new requirements then create them in EA, if they already exist in EA then update them.

I was thinking of using OSLC API feature in EA pro cloud server but i am not sure how exactly i can do it.
I got this link (http://localhost:port/model/oslc/cf/) to create new requirements from documentation.
But how can i pass values? how can i update existing requirements? It can not be a manual process.
I am planning to use powershell or sql or C# app to make api calls.
Thank you so much for your help.


Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 6830
  • Karma: +65/-7
    • View Profile
Re: Automate Requirements Import in EA (Pro cloud server)
« Reply #1 on: October 21, 2019, 08:56:55 am »
https://www.sparxsystems.com/enterprise_architect_user_guide/15.0/model_repository/oslc_quick_ref.html

Go down the page until you see Creation Factory - Resource (Package/Element).
Eve

support@sparxsystems.com

piku

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Automate Requirements Import in EA (Pro cloud server)
« Reply #2 on: October 22, 2019, 03:47:20 am »
Thanks for your reply. I have to update thousands of values using excel file. Do i have to pass them one by one? Or is there a way to make a post using values in a files?

<?xml version="1.0" encoding="UTF-8"?>

<rdf:RDF xmlns:oslc_am="http://open-services.net/ns/am#"

                 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

                 xmlns:dcterms="http://purl.org/dc/terms/"

                 xmlns:foaf="http://xmlns.com/foaf/0.1/"

                 xmlns:ss="https://sparxsystems.com.au/oslc_am#">

     <oslc_am:Resource>

          <!--Required Properties-->

          <dcterms:title>NAME</dcterms:title>

          <dcterms:type>ENTERPRISE ARCHITECT TYPE</dcterms:type>

          <ss:parentresourceidentifier>GUID OF CONTAINING PACKAGE/ELEMENT WITH GUID PREFIX</ss:parentresourceidentifier>

          <!--Required in a Security Enabled Model-->

          <ss:useridentifier>USER AUTHENTICATION TOKEN</ss:useridentifier>

          <!--Optional Properties-->

          <dcterms:subject>KEYWORDS</dcterms:subject>

          <dcterms:creator>

               <foaf:Person>

                    <foaf:name>AUTHOR</foaf:name>

               </foaf:Person>

          </dcterms:creator>

          <dcterms:description>NOTES</dcterms:description>

          <ss:alias>ALIAS</ss:alias>

          <ss:status>STATUS</ss:status>

          <ss:complexity>COMPLEXITY</ss:complexity>

          <ss:stereotype>

               <ss:stereotypename>

                    <ss:name>STEREOTYPE</ss:name>

               </ss:stereotypename>

          </ss:stereotype>

          <ss:phase>PHASE</ss:phase>

          <ss:version>VERSION</ss:version>

          <ss:difficulty>DIFFICULTY</ss:difficulty>

          <ss:priority>PRIORITY</ss:priority>

          <ss:language>LANGUAGE</ss:language>

     </oslc_am:Resource>

</rdf:RDF>

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 6830
  • Karma: +65/-7
    • View Profile
Re: Automate Requirements Import in EA (Pro cloud server)
« Reply #3 on: October 28, 2019, 09:06:08 am »
How to make a HTTP POST request will depend on the language you are writing in.

But you could equally use EA's API directly to create the objects or use the Data Miner in EA 15 to make it easier. (There's an example data miner script that imports from excel in the example model)
Eve

support@sparxsystems.com

piku

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Automate Requirements Import in EA (Pro cloud server)
« Reply #4 on: October 29, 2019, 05:10:39 am »
Thanks. Can we automate that import using data miner feature? Can i schedule it to run?
« Last Edit: November 02, 2019, 05:32:22 am by piku »