MDriven Designer and Modlr extensions–exporting data
No edit summary
(Adding page to Category:TOC because it contains a TOC.)
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
As you model along with Modlr in VisualStudio or by using AppComplete you collect a lot of knowledge about the domain you are modeling.


I have heard from many a need to access this information in some simple export format so that it might be shared with other tools or people. I have seen this need as well – but nevertheless – it has been hard to decide how such an export mechanism should be constructed to solve all conceivable needs in one glorious stroke.
<html>
<div class="outdated-alert">
<p> <span> ❗🕜 Warning: </span> This article may contain outdated information. Consider before using any descriptions/solutions, otherwise, it may still be helpful. <a href="https://wiki.mdriven.net/index.php/MDriven_Product_Line#Synonyms_and_name_changes"> <span> Help: Synonyms and name changes </a>
</p>
</div>
</html>


But as the need to export came up once more – and I could not find a way to wiggle out of solving it – I created this solution here that I actually like a lot.
== Updated intro to this article ==
When working with plugins use MDrivenDesigner, use the menu file/plugins/open new meta-model for plugins - now you have the extended modelLayer MDriven Meta-model.  


The solution uses many of the model driven concepts that  →MDriven has introduced earlier.
== Old intro ==
As you model along with Modlr in VisualStudio or by using AppComplete, you collect a lot of knowledge about the domain you are modeling.


The meta model we use to hold the model you design we call ExtendedModelLayer. There also is a meta model called ModelLayer – this model holds the knowledge about content in the model – like classes, attributes, associations and state machines. The ExtendModelLayer adds diagrams, viewmodels, report definitions, Enterprise architecture information and so on.
I have heard from many a need to access this information in a simple export format so that it might be shared with other tools or people. It has been hard to decide how such an export mechanism should be constructed to solve all conceivable needs in one glorious stroke.


== The goal ==
As the need to export came up once more – and I was hard-pressed to resolve it – I created this solution and I am pleased with it.
 
The solution uses many of the model-driven concepts that MDriven introduced earlier.
 
The meta-model you use to hold the model you design is called ExtendedModelLayer. There is also a meta-model called ModelLayer. This model holds the knowledge about content in the model – like classes, attributes, associations, and state machines. The ExtendModelLayer adds diagrams, ViewModels, report definitions, Enterprise architecture information, and so on.
 
== The Goal ==
This is what I want you to be able to do:
This is what I want you to be able to do:


1. Define viewmodels with UI-hints on the extendedmodellayer model
1. Define ViewModels with UI hints on the extendedmodellayer model.


2. Show those derived UI’s from AppComplete and/or Modlr so that they get data from YOUR model
2. Show those derived UIs from AppComplete and/or Modlr so that they get data from YOUR model.


3. Export any grid in such a derived UI to ODS-format-file (open document spreadsheet – works in excel and others)
3. Export any grid in such a derived UI to ODS-format-file (open document spreadsheet – works in Excel and others).


== How it is done ==
== How It Is Done ==
1. Open AppComplete and click new (! Yes new, you do not do this in YOUR model – it is NEW model of its own)
1. Open AppComplete and click new (Yes, new! You do not do this in YOUR model – it is a NEW model of its own).


2. Right click package, import/export, Import from EcoSpace in Assembly (new function)
2. Right-click package, import/export, and Import from EcoSpace in Assembly (new function).
[[File:Modlr -1.png|none|thumb|538x538px]]
[[File:Modlr -1.png|none|thumb|538x538px]]


3.  Locate the ExtendedModelLayer assembly in the install folder (C:\Program Files (x86)\ →MDriven\ECO\6.0\Modlr)
3.  Locate the ExtendedModelLayer assembly in the install folder (C:\Program Files (x86)\ →MDriven\ECO\6.0\Modlr).


[[File:Modlr -2.png|none|thumb|634x634px]]
[[File:Modlr -2.png|none|thumb|634x634px]]


4. Then you get all the packages and their content imported into your new model
4. Then, get all the packages and their content imported into your new model.
[[File:Modlr -3.png|none|thumb|433x433px]]
[[File:Modlr -3.png|none|thumb|433x433px]]


5. Now you can create view models for ExtendedModelLayer… Wow – you can do everything… Like finding all classes with more than 3 attributes:
5. Now you can create ViewModels for ExtendedModelLayer. You can do everything, including finding all classes with more than 3 attributes:
<blockquote><em><strong>Class.allinstances-&gt;select(c|c.Feature-&gt;filterontype(Attribute)-&gt;size&gt;3)</strong></em>
<blockquote><em><strong>Class.allinstances-&gt;select(c|c.Feature-&gt;filterontype(Attribute)-&gt;size&gt;3)</strong></em>


Line 38: Line 50:
<em><strong>Span.allinstances-&gt;orderby(name)</strong></em>
<em><strong>Span.allinstances-&gt;orderby(name)</strong></em>


Remember that these ViewModels will execute on the ExtendedModelLayer that holds the instances that make up YOUR model. You decide what you want to see and how it should be presented. Maybe you want a list of all constraints you have? Or on things that has a certain TaggedValue set? Gone are the days when you needed to ask us politely to expose some information a certain way – now you are empowered to get ANY AND ALL DATA you want.</blockquote>
Remember that these ViewModels will execute on the ExtendedModelLayer that holds the instances that make up YOUR model. You decide what you want to see and how it should be presented. Maybe you want a list of all the constraints you have? Or of things that have a certain TaggedValue set? Gone are the days when you needed to ask us politely to expose some information – now you are empowered to get ANY AND ALL DATA you want.</blockquote>


6. Save the modlr file into %ProgramData%\CapableObjects\Plugins  (C:\ProgramData\CapableObjects\Plugins on my machine)
6. Save the Modlr file to: %ProgramData%\CapableObjects\Plugins  (C:\ProgramData\CapableObjects\Plugins on my machine).


[[File:Modlr -4.png|none|thumb|474x474px]]
[[File:Modlr -4.png|none|thumb|474x474px]]


7. Now restart AppComplete or Modlr (Visual Studio), open a model and right click modlr tree:
7. Now restart AppComplete or Modlr (Visual Studio), open a model, and right-click Modlr tree:


[[File:Modlr -5.png|none|thumb|490x490px]]
[[File:Modlr -5.png|none|thumb|490x490px]]


8. And a form comes up, executes your viewmodel definition on the extendedmodellayer that holds your model:
8. A form comes up, and executes your ViewModel definition on the extendedmodellayer that holds your model:
[[File:Modlr -6.png|none|thumb|494x494px]]
[[File:Modlr -6.png|none|thumb|494x494px]]


9. It also holds Buttons at the bottom that creates ods files for you, so that you can get the values into excel:
9. It also holds Buttons at the bottom that create ods files for you, so that you can get the values in Excel:
[[File:Modlr -7.png|none|thumb|448x448px]]
[[File:Modlr -7.png|none|thumb|448x448px]]


And that is it.
That is it.


== Conclusion ==
== Conclusion ==
Along with the plugin interface this ViewModel plugin expose every tiny detail of your model. With AppComplete and Modlr you are never locked in. You can harvest all the information for any need you see fit – after all it is your model.
Along with the plugin interface, this ViewModel plugin exposes every tiny detail of your model. With AppComplete and Modlr, you are never locked in. You can harvest all the information for any need you see fit – after all, it is your model.


Loading the ExtendedModelLayer into Modlr enables you to familiarize  yourself with the meta model we use. Have fun.
Loading the ExtendedModelLayer into Modlr enables you to familiarize yourself with the meta-model we use.  


== Continued ==
== Continued ==
I got a request to dump all processes and processteps from the EAInformation in Modlr.
I got a request to dump all processes and process steps from the EAInformation in Modlr.


Following the steps from above I created a ViewModel for ExtendedModelLayer:
Following the steps above, I created a ViewModel for ExtendedModelLayer:
[[File:Modlr -8.png|none|thumb]]
[[File:Modlr -8.png|none|thumb]]


I save this modlr file under C:\ProgramData\CapableObjects\Plugins
I save this Modlr file under: C:\ProgramData\CapableObjects\Plugins


And while I have it open I start a new instance of AppComplete load the model that wanted to dump the processes:
While I have it open, I start a new instance of AppComplete and load the model that wanted to dump the processes:
[[File:Modlr -9.png|none|thumb]]
[[File:Modlr -9.png|none|thumb]]


Line 75: Line 87:
[[File:Modlr -10.png|none|thumb]]
[[File:Modlr -10.png|none|thumb]]


Cool – if I do not like the result fix it in AppComplete #1,  save, restart AppComplete#2 and try again:
Great. If you do not like the result, fix it in AppComplete #1,  save, restart AppComplete#2, and try again:
[[File:Modlr -11.png|none|thumb]]
[[File:Modlr -11.png|none|thumb]]


Better, Now I can press the “… To Excel” button:
Better. Now I can press the “… To Excel” button:
[[File:Modlr -12.png|none|thumb]]
[[File:Modlr -12.png|none|thumb]]


And I have the selected data in a ods file that opens with Excel
I have the selected data in an ods file that opens with Excel.


You can access ALL DATA in the extendedmodellayer so that is ALLDATA in that builds up your model.
You can access ALL DATA in the extendedmodellayer so that is ALLDATA that builds up your model.


Once you have created one of these reports it works for ALL MODELS you have now and in the future.
Once you have created one of these reports, it works for ALL MODELS you have now and in the future.
[[Category:MDriven Designer]]
[[Category:MDriven Designer]]
{{Edited|July|12|2024}}
[[Category:TOC]]

Latest revision as of 13:47, 26 March 2024

❗🕜 Warning: This article may contain outdated information. Consider before using any descriptions/solutions, otherwise, it may still be helpful. Help: Synonyms and name changes

Updated intro to this article

When working with plugins use MDrivenDesigner, use the menu file/plugins/open new meta-model for plugins - now you have the extended modelLayer MDriven Meta-model.

Old intro

As you model along with Modlr in VisualStudio or by using AppComplete, you collect a lot of knowledge about the domain you are modeling.

I have heard from many a need to access this information in a simple export format so that it might be shared with other tools or people. It has been hard to decide how such an export mechanism should be constructed to solve all conceivable needs in one glorious stroke.

As the need to export came up once more – and I was hard-pressed to resolve it – I created this solution and I am pleased with it.

The solution uses many of the model-driven concepts that MDriven introduced earlier.

The meta-model you use to hold the model you design is called ExtendedModelLayer. There is also a meta-model called ModelLayer. This model holds the knowledge about content in the model – like classes, attributes, associations, and state machines. The ExtendModelLayer adds diagrams, ViewModels, report definitions, Enterprise architecture information, and so on.

The Goal

This is what I want you to be able to do:

1. Define ViewModels with UI hints on the extendedmodellayer model.

2. Show those derived UIs from AppComplete and/or Modlr so that they get data from YOUR model.

3. Export any grid in such a derived UI to ODS-format-file (open document spreadsheet – works in Excel and others).

How It Is Done

1. Open AppComplete and click new (Yes, new! You do not do this in YOUR model – it is a NEW model of its own).

2. Right-click package, import/export, and Import from EcoSpace in Assembly (new function).

Modlr -1.png

3.  Locate the ExtendedModelLayer assembly in the install folder (C:\Program Files (x86)\ →MDriven\ECO\6.0\Modlr).

Modlr -2.png

4. Then, get all the packages and their content imported into your new model.

Modlr -3.png

5. Now you can create ViewModels for ExtendedModelLayer. You can do everything, including finding all classes with more than 3 attributes:

Class.allinstances->select(c|c.Feature->filterontype(Attribute)->size>3)

or all ViewModels in order by name:

Span.allinstances->orderby(name)

Remember that these ViewModels will execute on the ExtendedModelLayer that holds the instances that make up YOUR model. You decide what you want to see and how it should be presented. Maybe you want a list of all the constraints you have? Or of things that have a certain TaggedValue set? Gone are the days when you needed to ask us politely to expose some information – now you are empowered to get ANY AND ALL DATA you want.

6. Save the Modlr file to: %ProgramData%\CapableObjects\Plugins  (C:\ProgramData\CapableObjects\Plugins on my machine).

Modlr -4.png

7. Now restart AppComplete or Modlr (Visual Studio), open a model, and right-click Modlr tree:

Modlr -5.png

8. A form comes up, and executes your ViewModel definition on the extendedmodellayer that holds your model:

Modlr -6.png

9. It also holds Buttons at the bottom that create ods files for you, so that you can get the values in Excel:

Modlr -7.png

That is it.

Conclusion

Along with the plugin interface, this ViewModel plugin exposes every tiny detail of your model. With AppComplete and Modlr, you are never locked in. You can harvest all the information for any need you see fit – after all, it is your model.

Loading the ExtendedModelLayer into Modlr enables you to familiarize yourself with the meta-model we use.

Continued

I got a request to dump all processes and process steps from the EAInformation in Modlr.

Following the steps above, I created a ViewModel for ExtendedModelLayer:

Modlr -8.png

I save this Modlr file under: C:\ProgramData\CapableObjects\Plugins

While I have it open, I start a new instance of AppComplete and load the model that wanted to dump the processes:

Modlr -9.png

Right-click any node in the tree and pick the “Plugin Views” and the correct ViewModel:

Modlr -10.png

Great. If you do not like the result, fix it in AppComplete #1,  save, restart AppComplete#2, and try again:

Modlr -11.png

Better. Now I can press the “… To Excel” button:

Modlr -12.png

I have the selected data in an ods file that opens with Excel.

You can access ALL DATA in the extendedmodellayer so that is ALLDATA that builds up your model.

Once you have created one of these reports, it works for ALL MODELS you have now and in the future.

This page was edited 24 days ago on 03/26/2024. What links here