compress Customised audit rules for own module

1 year 8 months ago #4448 by pan
Hello ua138,

It is not possible to customize the audit rules for modules.

I think the best way would be for you to implement your own audit specific to your module.

Please Log in or Create an account to join the conversation.

11 months 6 days ago - 11 months 6 days ago #4875 by ua138
Hi pan,

How would you suggest I should create my own audit? Do the modelio module development libraries provide some sort of classes I can use? or is this something I would need to be creating from scratch?

Thank you for your help.

Please Log in or Create an account to join the conversation.

11 months 5 days ago #4877 by pan
Hi ua138,

Exactly you have to implement your own audit. It is not possible to extend the Modelio audit system.
Please note that it is possible to listen model modifications. Depending on these modifications, you can launch some model checks and launch your own audit. You can create your own audit tab

This page can help you for understanding the listener mechanism:
forge.modelio.org/projects/modelio3-modu...wiki/model_listening

Do you need more information?

Please Log in or Create an account to join the conversation.

10 months 2 weeks ago #4918 by ua138
Thanks for your response pan. Could you please give me a hint on how can I create a custom tab using a modelio module? I understand how can I do it with the property pages, but is it possible to add an additional tab?

Thanks again

Please Log in or Create an account to join the conversation.

10 months 2 weeks ago #4930 by pan
Hi ua138,

This page forge.modelio.org/projects/modelio3-modu...module_property_page explains how to create a property page. Instead of creating a class implementing IModulePropertyPage, you can create a class implementing IModulePropertyCustomPanel. As an exemple you can see ElementFormPropertyPanel which implements IModulePropertyCustomPanel.
IModulePropertyPage and IModulePropertyCustomPanel inherit from IModulePropertyPanel . So you can create a customized panel.

Please Log in or Create an account to join the conversation.

8 months 1 week ago - 8 months 1 week ago #5059 by ua138
Hi pan,

I have managed to follow your instructions and create an additional tab. Although my main goal is to imitate the existing Audit tab, but with my own custom rules, I tried to implement a class extending the ElementFormPropertyPanel you mentioned. Just to see what it displays. The ElementFormPropertyPanel is an abstract class, that requires the implementation of two main functions: isRelevantFor and initFactory. Particularly, the initFactory method requires the implementation of the IFieldFactory interface. I have found an existing class, AbstractFieldFactory, that implements part of this interface. Extending this AbstractFieldFactory class, I have managed to create my own field factory. Nevertheless, my current example does not display anything on the tab.



I feel quite lost on how should I implement this. Just with a simple table in which I can customise the column names should suffice. Similarly to the default PropertiesPage, but customising the column names. Could you kindly offer me some more guidance on how could I implement this?. I attach the files of the example I mention.

Thank you very much in advance.

File Attachment:

File Name: AuditPrope...java.txt
File Size:1 KB


File Attachment:

File Name: AuditField...java.txt
File Size:2 KB


File Attachment:

File Name: MyFormFiel...java.txt
File Size:1 KB
Attachments:

Please Log in or Create an account to join the conversation.

Moderators: tmachmaab
Time to create page: 0.155 seconds
^ Back to Top