Book a Demo

Author Topic: How to serialize validation results into a file?  (Read 4592 times)

R_S

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
How to serialize validation results into a file?
« on: February 05, 2012, 10:37:51 pm »
Hi fans of EA,
I want to write the results of the model validation into a text file.
So I checked the automation interface but didn't find any proper methods for doing so.

Maybe someone can give me a hint regrading the following questions:
How do I start the model validation programatically?
How do I write the results of the model validation to a file? I looked for a broadcast message for the model validation output window, but did not find a suitable one.

R_S

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: How to serialize validation results into a fil
« Reply #1 on: February 28, 2012, 06:39:47 am »
Does anybody know how to write the output window into an output file?

stao

  • EA User
  • **
  • Posts: 137
  • Karma: +0/-0
    • View Profile
Re: How to serialize validation results into a fil
« Reply #2 on: February 28, 2012, 06:52:27 am »
to run the validation via automation interface
use the project interface.

Repository.GetProjectInterface()

http://www.sparxsystems.com/enterprise_architect_user_guide/9.2/automation/project_2.html

Project.ValidatePackage(string PackageGUID)

via Project.PublishResult(...) i would try to get the result of every rule
and serialize it to your file

R_S

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: How to serialize validation results into a fil
« Reply #3 on: February 29, 2012, 04:46:53 am »
Well but how do i intercept calls to PublishResult?

stao

  • EA User
  • **
  • Posts: 137
  • Karma: +0/-0
    • View Profile
Re: How to serialize validation results into a fil
« Reply #4 on: February 29, 2012, 05:05:56 am »
Good Question.
Perhaps you can try to get the active output tab handle directly via c#
(dont even know if that is possible)
Maybe somehow you can try to extract the information stored in the output tab.

Another possibility will be to deploy your own validation addin.

After every check you can write your information how and where you need it.

R_S

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: How to serialize validation results into a fil
« Reply #5 on: February 29, 2012, 07:18:54 am »
Yeah, you can access the output tab by right clicking on it and even save the log to the file. But there seems to be no way doing it via c#...