cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Traceability between PTC Integrity and Enterprise Architect

ptc-5066058
1-Newbie

Traceability between PTC Integrity and Enterprise Architect

Hi,

we want to create a connection between Integrity Items from PTC and packages/ elements from Enterprise Architect. Both tools have IDs with which they can be identified clearly. In the forum I read that there are several possibilities to get data out of PTC Integrity such as using command line scripting, running reports, using gateways, web services, API or trigger scripts.

My question is, which of these possibilities would you suggest when you want to connect one integrity item with one or more Enterprise Architect package/s or element/ s. Is there a way using a standard feature of PTC Integrity which helps the developer to get that task done with less changes in Integrity or do you suggest a self-made program which writes in each tool the specific ID/s from the opponent's tool to help the user for example to find the suitable UML diagram in the Enterprise Architect for an already open requirement integrity item of PTC Integrity faster?

Thanking you in anticipation.

Regards

Dan

14 REPLIES 14
mrump
14-Alexandrite
(To:ptc-5066058)

Hi Dan,

there is a server based "tool" called "IIP" (Integrity Integration Platform) sold by PTC that seems to fit your needs.

Basically it's a web server (tomcat) that plays the "man in the middle" role by utilizing the Integrity and Enterprise Architect web services to syncronize/link Items between different tools.

There are several "adapters" available that implement the connection to 3rd Party tools like Enterprse Architect or DOORS.

As far as I know all you need to add in your Integrity Setup is a "External ID" field.

The mapping is done on the IIP server.

For deeper info you should call you local PTC support team.

HTH Matthias

Hi Matthias,

thx for your answer. Your idea of using the web services sounds great, the only problem is, that our Enterprise Architect is not using a server but a client solution and you said, that both parts communicate via web service, which means a server is inevitable on both sides (or was this conclusion wrong). Furthermore I searched the web for further requirements of IIP and found only the marketing pages of PTC & not helpful pages, but as long as the EA is realized by a client solution, that should be secondary.

That means, the remaining way is using the API of PTC Integrity in combination with command line orders to add information to the desired integrity item/s (is that way makeable or am I reaching a dead end, when I try to add information to two or more integrity items by a cli command). For the first version it would be great if the automated information add from EA to Integrity works, the second one should realize the same thing but from the other direction.

Which further manuals (in addition to the integrations builder guide and the cli reference for workflows documents for the cli commands) would you suggest for solving that task?

Regards

Dan

mrump
14-Alexandrite
(To:ptc-5066058)

Hi Dan,

I'd recommend the Integrity java API (due to personal experience).

During the years I did several tools that exchange data from a 3rd Party SW like MS-Project, Word or Excel in VBA and the CLI underneath, which was sometimes a real pain.

The CLI is often tricky when it comes to formatting/special characters and other things.

You should ask yourself whether you want create a kind of Plugin in EA (if that is possible), a Plugin in Integrity Client (which is possible) or a separate application that utilizes the EA datamodel and the Integrity API or Webservices.

The editing of several Items "at once" is possible in Integrity anyway, all you need are the correct MKS IDs.

Regarding the manuals you've named all the stars. Now all might need to start is some deeper understanding of the interity setup. Your Integrity Admin might help in that.

HTH

Good Luck

Matthias

Hi Matthias,

thx for your answer & sorry for the late reply. In the meantime an add-in on the Enterprise Architect side was created, which reads out the actual id. The further data for the session table should be read out of a field which is already created on the Integrity side. I also tried to get the data with a command via the command line interface and this worked well.

Then I started the API integration work and we made a few decisions:

- Integration should be via Integrity Client (because of the many unique features this scenario has)

- The integration point should be created for the C API because we already use C# for EA part of the work and the integrity part of work (reading out already existing information, saving or deleting data in the integrity) would be also great if realizable with C#

Now I have the following questions:

- Is it possible to use C# program logic for the integration (as result of downward compatibility) or do I have to do this part with good old C program code (or maybe C++)? And if C is the only way to do this (in addition to Java), is Visual Studio 10 Express capable to handle the C code and if not, what counteractions can I do to make Visual Studio happy with C code? The best thing would be, if I can start the commands in C# code but I doubt that this is possible.

- I also found the integrations user guide, but this one seems to be something completly different than the integration builder (with the scenarios, integrations points ....). I also enabled the already existing integration for Visual Studio .Net 2003 in Integrity and didn't realized any changes neither on Integrity side nor on Visual Studio 2010 Express side. But if I understood the user guide right, this integration allows the user to manage the written programs of Visual Studio, that means it's something like a "document management" system for Integrity.

Regards

Dan

mrump
14-Alexandrite
(To:ptc-5066058)

Hi Dan,

lot's of new questions 😉

So here's my state of knowledge:

- there is no C# API , so you have to use good old plan C

- Visual Studio 10 is capable of working with plan C (we use the Ultimate Edition every day), but I have no idea about limits in the Express edition.

- the integration for Visual Studio .Net 2003 like the Inthegartion for e.g. Excel or Eclipse enables a "Plugin"/AddOn for the according 3rd party tool that allows you to use/interact with Integrity via the GUI of the 3rd party tool.

In Visual Studio for example you can checkout or view the members history of your source files through a right click menu in the Visual Studio Solution Tree view.

For Visual Studio 2005 and higher there is a separate installion of the integration necessary (download and run a msi package) that cannot be enabled via the Integrity Client Gui.

HTH Matthias

Have you thought about the webservices as an alternative to the API. I'm not well experienced in C# but I think it must be more comfortable to use C# + webservices than plain C anyhow. Btw. you wouldn't even need an installed client on the machine that runs your tool.

Hi Matthias,

thx for your answers. You said, that your Visual Studio 10 is able to work with C code. How do you manage that, because C# uses managed code and C unmanaged code? I searched the web for answers and found a lot of (more or) less helpful sides until I found a good recommendation for a book that seems to be the "bible" for interoperability.

Link to the guide: http://www.books-by-isbn.com/0-672/067232170X-.NET-and-COM-The-Complete-Interoperability-Guide-0-672-32170-X.html

In that book the author says, that there are four possibilities to have interaction between managed and unmanaged code:

1) Platform Invocation Service (PInvoke)

2) Mixed-Mode Programming Using Managed Extensions to C++

3) Java User Migration Path to .NET (JUMP to .NET)

4) COM Interoperability

Due to the fact, that we use C#, only the PInvoke or the COM Interoperability still remain to get the problem fixed. Which of the two possibilities would you suggest to take or is there an easier way to get that obstacle (using com components in .net applications; it sounds so easy when you say, that your Visual Studio is capable of C) out of the way? If you can suggest a better book or a good web site, that would be great. I also read something about making a reference to .dll file to handle that problem, but I only have header files with the commands I should use to communicate with Integrity.

I also checked the webservice possibility and tried the target namespace from the definitions part of the wsdl and the location in service part of the wsdl (each of them twice; first with the address from the web services and the second time correcting the address with the address, used to open integrity via browser). Both times it wasn't successfull (with our integrity adress, I got the fault messages: 1) http get not supported; 2) the requested resource is not available). Furthermore, at our company we have no web service expert and I am able to read the source code of the web service description language (namespace, coding which is used => literal for integrity web service, message exchange pattern is http get and it's definitely synchronous message transfer, asynchronous wouldn't make much sense here) but never used it in combination with C# (but as long as the namespace for the wsdl element doesn't work, this seems to be secondary).

Regards

Dan

mrump
14-Alexandrite
(To:ptc-5066058)

Hi Dan,

@ webservices:

I only used the SI services in a Eclipse based Java app so far (as I'm not that deep into C#), but the IMHO that's comparable.

You just add the WSDL in the PROJECT/ServiceReference/Add Reference.. Dialog

e.g.

http://<YOUR_INTEGRITY_SERVER>:<YOUR_INTEGRITY_PORT>/webservices/2009/7/Source/

?wsdl"

and then use it your code.

@ plain C in VS2010

We use mixed c and c# projects where the c parts contain the business logic and the UI part is c#. The C part is packed into a dll and used in the C# part.

HTH

Hi Matthias,

@ webservices possibility:

I tried to add the web reference in Visual Studio and used your pattern for the URL with slight changes due to the later Integrity version:

http://server:port/webservices/10/3/Integrity/ or http://server:port/webservices/10/3/Source/.

With both URLs I got a reaction from Visual Studio, unluckily a negative one telling me, that the requested resource is not available (http status 404). I tried the URL with both server adresses (the short cryptic one and the long one with the .com in the adress), the status stayed the same. Seems that the webservice possibility is not realizeable or did I make a fault with the adress? I also tried a normal web url and had a mini webpage in the preview screen of Visual Studio, so Visual Studio works normally.

@ plain C in VS2010 possibility:

You say, that the business logic is in C and packed in a dll and the user interface is made in C#. That looks like you're using the platform invocation service with the following pattern:

[DllImport("cLibrary.dll")]

static extern int cMethod (out int returnValue);

First question is, how did you transfer the api files with .h format into the .dll files? Another question is, are there maybe already existing dll files waiting to use (and I only need to add a reference in Visual Studio)? I searched the Integrity paths on the local client for dlls and found a lot of them in the bin directory and one of them was named mksapi.dll (the same name as the one with the .h format).

Regards

Dan

mrump
14-Alexandrite
(To:ptc-5066058)

Hi Dan,

@webservices:

It is crucial to use the correct path, which cannot be derived from the Server version you use, as not every Integrity Server release comes with a webservice update.

Use the "WebServicesReference_Integrity_10_3.pdf" to lookup the correct path values (for Source it IS the one I wrote above).

KaelLizak
14-Alexandrite
(To:mrump)

Here is a linked version: "Integrity 10.3 Web Services Reference Guide"

Regards,
Kael


Kind Regards,
Kael Lizak

Senior Technical Support Engineer
PTC Integrity Lifecycle Manager

Hi,

sorry for late reply. In the meantime the connection between

Visual Studio and the Integrity web service succeeded. I

also added the namespace of the web service and am able

now to see all the classes and the few interfaces and

enums the web service offers.

Now I would like to create an object for the web service

interaction and I'm not sure, which of them is the right one.

Maybe I also need the credentials() class because Integrity

always asks for user identification, no matter if I use the

client interface or type the command in the command line

interface. I'm also not sure, if CustomQuery is the right

choice to construct a command like

im editissue --field=..... number of integrity item,

great command to change data from the CLI.

A further question is, is there any documentation for the

offered classes by the web service (which could be seen

in the object browser of Visual Studio). Do I need to handle

the log in problem, when I try to view or interact with the

Integrity items by a program or does this Integrity on its

own, whenever it recognizes that the actual user has not

an actual connection to the Integrity Server?

Regards

Dan

Hi,

the current state of the solution is the following one:

- C# in Visual Studio has the correct reference to the webservice of Integrity

and the suitable namespace is also defined.

- A user dialogue, which asks for the credentials (username & password), is

also realized and gives back an error, if something is not correctly typed in.

- If a field type is used in the code, which doesn't exist in Integrity, an

error message is returned. An error message is also returned, when a not

existing or wrong item ID is used in the code. (This conclude, that the

connection to the Integrity webservice probably works, otherwise the

programm wouldn't be able to know, whether the ID or field type is wrong or not.)

The problem at the moment is the following one:

- The input object for getItemsByIDs gets the correct data, but the output object

getItemsByIDsResponse returns only the Integrity ID and nothing else more.

First part of code:

getItemsByIDs gibi = new getItemsByIDs();

GetItemsByIDsType gibit = new GetItemsByIDsType();

gibit.ItemId= new string[] {"2219"};

gibit.Username = client.ClientCredentials.UserName.UserName;

gibit.Password = client.ClientCredentials.UserName.Password;

string[] field = new string[] { "Text" };

gibit.InputField = field;

gibit.Name = "Test";

gibi.arg0 = gibit;

Second part of code embraced in a try catch block to get error messages in case of

false entries back (here should more information return than only the Integrity ID):

getItemsByIDsResponse gibResponse = client.getItemsByIDs(gibi);

Regards

Dan

PS: An idea to improve the forum: Don't make the text box size a little smaller, each time

someone answers, because after enough answers refering to the previous poster the place to

write gets scarce.

I was able to integrate EA with Integrity. It works vey much like the integration with Mathworks Simulink. It requires a surrogate model in Integrity. It allows you to create links from EA to the surrogate and from your Integrity models to the surrogate. Thus a bridge "model document" is used. This requires some modification to the server configuration. PTC has the knowledge to make this happen easily for users - like they did for Simulink - however I think the purchase of their new modeling tool from Atego has meant their support of this effort has waned... This is unfortunate for customers that don't want to purchase new tools for modeling.

Hi All,

if someone really wants to build the integration by hand, what about the following google search results?

1. Java Add-Ins Programmieren für den Enterprise Architect ...

2. Enterprise Architect Datenmodell (EA API) « Enterprise ...

3. SDK for Enterprise Architect

The first two links are in German, but I think the concept is well described. (Otherwise take the third and search for "Java")

EA offers a Java API, why not using it?

And one more question to understand the topic correctly: in your scenario, which is the primary and leading application for all requirements? Is this EA or PTC Integrity?

Regards, Volker

Top Tags