extend the on click event of relationship

Started by charbel, October 05, 2014, 02:18:47 AM

Previous topic - Next topic

charbel

Ok.

1. User creates a Business Actor in a View using the palette
2. A node is also created in the corresponding view, for example according to each business actor i need a
   technology node so it will not be on the same, it will be on the tehcnology view. yes i need to create it just in
   the model.
3. then i need to save the whole model in order to get the XMI extension

The idea of this, it's just to help the designer of the technology layer by creating some elements automatically.

do you need more clarification?

charbel

#31
Your help is highly appreciated since it's a major point to continue my research.
It remains just 5 days for me.

Thank you


Phil Beauvoir

I'm sorry, but I still do not know what you are trying to do. Your points (2) and (3) are confusing. Why don't you explain what it is step by step? Do you want two boxes to be drawn on the same view? If so, where?

What do you mean by "I need a technology node so it will not be on the same, it will be on the technology view." What technology view?

Then you say "I need to create it just in the model." So you don't want it added in the view?

"Then I need to save the whole model in order to get the XMI extension" What "XMI extension"?

I'm sorry but I don't think I can help you with this.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

charbel

I'm really sorry, maybe I explain wrong.
What I need is: For example I'm creating a business actor by drag a drop from the palette in order to create a model, after the creation of the business actor, I need to get automatically two technology nodes from the technology layer. these technology nodes could be created below the bsuiness actor created.
In another way, I need to know in java how to call a technology node during the dragging an drop from the palette of business actor.

Imagine your self you are using the archi tool and you are creating a business actor to create a specific model, what I need is to get automatically one or two technology nodes in the same model view.

Hope it's more clear now.

Sorry but really i need your help

Phil Beauvoir

It's a bad UI decision. The palette should only be used for what it is intended - one item created. Maybe what you are trying to do is create a view from a template? Re-think your approach. Using the palette in this way would be a very bad user experience! How would one then create a Business Actor without the nodes being added!
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

charbel

I will tell you exactly what I have.
I have succeeded before to add dialog box in java when I'm using a realtion ship and I got a dialog box to enter a value, this value should respect a specific number for example. these values are 10 and 50 so I should enter a number between 10 and 50. once I enter a number between 10 and 50 so I can create the realtionship between any two business actor in the business layer.
What I need now is to call a technology node after using this realtionship. so just I need to assure that I can throw automatically some elements from other layers once I create any element from a specific layer.

There is a scientific idea from this, i have published till now three publications using ArchiMate and Archi tool, this is what I need.

Any feedback?

charbel

#36
Attached is an image of How I have implemented what I explained in my previous post. I succeeded to extend ArchiMate and I got a generated design tool  using new relation ship with constraint (10 and 50).
In order to implement the idea (look the the images) I wrote inside CreateEditPart () the following:

int min = 10;
      int max = 50;       
      JFrame frame = new JFrame();
      String ValString = JOptionPane.showInputDialog(frame,"Length of marine cable should be between 10 and 50 meters:");
      int ValInt = Integer.parseInt(ValString);
      if (ValInt < max && ValInt > min){
         JOptionPane.showMessageDialog(null,"You are able to connect a Smart Sensor to a Fusion
                                                                              Server");
return new ExtensionConnectionEditPart();

      }
      JOptionPane.showMessageDialog(null,"You are not able to connect a Smart Sensor to a Fusion Server");
      return null;
   }

My question is what I have to write in jave to call for example a technology node automatically?

charbel


Phil Beauvoir

As I said, I don't really know how to achieve what you want to do, and I think it's a bad idea from the point of view of the user anyway.

The only thing I can suggest is to take a look at the class:

com.archimatetool.editor.diagram.commands.CreateDiagramArchimateObjectCommand

and see how new objects are created there, and also in its super class:

com.archimatetool.editor.diagram.commands.CreateDiagramObjectCommand

If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.