cancel
Showing results for 
Search instead for 
Did you mean: 

Enforcing project structure

former_member217396
Participant
0 Kudos

Hi,

what is the best practice to enforce the project structure in PowerDesginer.

Let say, we have definer a project structure using folders.

This looks like thins:

Level 1

   Level 1 SubLevel 1

      Level 1 SubLevel 2

Additional we have defined (using the Model Category Set Properties) the diagrams available.

- Diagram Level 1

- Diagram SubLevel 1

- Diagram SubLevel 2

We have defined one diagram per project level.

Now, what we want to enforce is, that:

- only Diagram Level 1 can be created in the folder Level1

- only Diagram SubLevel 1 only in the folder Level 1 SubLevel 1

How to do that? How to prevent users from creating wrong diagrams in wrong folders?

Regards,

Rafal

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member185199
Contributor
0 Kudos

are you speaking of folders in the workspace???

or in repository/ filesystem?
or inside of 1 model?

former_member217396
Participant
0 Kudos

Hi Dirk,

sorry, I'm talking about ProjectFolders:

Regards,

Rafal

former_member185199
Contributor
0 Kudos

Try to attach stereotype or keywords to your different levels and compare on create time these with akeyword or stereotype you gave the diffrent diagram types

former_member217396
Participant
0 Kudos

OK, but how to define event handlers for diagrams? I did it few times for classes in the BPM diagrams (directly in the *.xpl files), but here ... do I have to do it somehow in the extension files for the particular diagram types?

Could you guide me how to do this pls? For workspace folders, I can set a stereotype, but for a model/report not. Both do contain keywords, so probably this is the way to go.

But still, the question is:

1. How to assign a keyword to a model/report via configuration?

2. How to compare (at run-time) the keywords of the folder and model/diagram?

3. Is there a possibility to limit the list of available models (new model menu) depending on the currently selected folder?

former_member217396
Participant
0 Kudos

Anyone has an idea?

former_member185199
Contributor
0 Kudos

i dont know the modeltypes you working with, but in an EAM you could attach an handler to the model, you could for example "miss"use the check:

right click on model: (in the extensionfile)

you get a check:

and add an checkscript like this:

Function %Check%(obj)

   ' Implement your check on <obj> here

   ' and return True if check passed

   ' or  return False if not.

 

   if .......

   ' check here somehow the level of the model

 

      %Check% = True

   else

      %Check% = false

   end if

 

End Function

i dont have time to proof this but might work

HTH

Message was edited by: dirk jaeckel