visio 2010 UML Change shape from Class to Interface - uml

*edit: I understand that stackoverflow has banned all questions regarding using Microsoft's Visio. I'm a bit surprised by that, but if someone would bend the rules and help me out I'd greatly appreciate it.
I already tried looking at microsoft's website and other forums on the internet and I'm not finding what I'm looking for. Perhaps there is someone here who knows about Visio 2010.
I dragged and dropped a static structure shape for a UML Class onto my drawing area, and I filled out all the data in it. I then realized that I needed to change it from a class to interface shape. I thought I could simply right click and change this, but no. I tried going to drawing options, but all that does is change it for the future so that it will automatically create an interface shape when I drag and drop.
Isn't there any way to take data from these shapes so I can reuse it again without having to retype it all over in the data fields?
I tried creating a shape data set like msdn blog talks about. I chose to "create from an existing set"---thinking that this means creating from my already existing data from my class shape. Unfortunately this wasn't this case, and it ended up being completely empty....for some reason.
I would think it would be silly that someone would have to manually recreate all the class info all over again, simply because they wanted to change the shape of a UML static structure.

You are not changing the shape, you are changing the meaning of the model entity - their meaning is different therefore the shape cannot be changed.
If you are only using your diagram for display purposes, you can add a new <<interface>> stereotype that can be applied to classes, and apply this stereotype to the classes you want to refactor. Otherwise, sadly, you'll have to write it all again.

You can try the following (worked for me):
Create a new interface and name it whatever you like
In the Model Explorer drag and drop all methods, etc. from your class to your interface.
Drag the interface you just created from the Model Explorer to the actual document (You'll get the interface in a lollipop representation)
Add the interface to your class (the line end of the lollipop has to be attached to class)
By doing this you can quickly create an interface and move the methods from the class to the interface. Also, when the lollipop interface is attached to the class, all methods are added to the class, too.

Related

Sparx Enterprise Architect: Show programming language in component diagram

I am using Sparx Enterprise Architect and am somehow confused that I did not find any hint on the internet regarding the following question: How can I show the programming language of a component in the component diagram?
It is clear to me that I could use custom stereotypes but this is not a good idea as it prevents me from using "real" stereotypes later on.
The reason is simply that you can not show it using EA's GUI. You would need to stereotype the element and come up with a shape script to display the language with a
print("#language#");
somewhere.
To assign a shape script to a stereotype there are two ways, the quick and dirty and the difficult one. Here's the q&d one:
Under Configure/UML Types you can add a new 'wild' stereotype. That is one with no profile. EA will show that as <none> when applied. Think of a fitting name and choose Edit with the shape script:
Here can enter the new shape script (since this depends very much here's a simple one):
shape main {
Rectangle(0, 0, 100, 100);
println("#name#");
println("#language#");
}
Save the edit and close the dialog. Once you assign the stereotype to an element it will render like this:
I know this is not pretty and you need to dig into shape scripts to make it useful, but that can't be avoided.
So the difficult, but better and preferred, way is to create your own profile containing the stereotype along with the shape script. The above would just be a way of testing it but finally you would need to create your profile and put it in a MDG. Since this is a quite complex task it won't go here into this answer (no, I'm not Fermat, but you need quite some effort to get that far).
There is no standardized way to show the programming language of a component in UML. There are several ways you can do it, for example:
Stereotype. This will not prevent you from adding other stereotypes in the future. Multiple stereotypes are shown comma separated: «stereotype1, stereotype2»
Generalization. You can define a component called 'JavaComponent' and let all Java components inherit from this base component.
Note. You can attach a note to the component specifying the language.

Extending PXMappedCacheExtension

Does anyone have an example of how to add a field to a Mapped cache extension? I am trying to extend the SalesPrice functionality in 2019R1. It looks a lot like a DAC... but something tells me I cant simply just make an extension for it..
Thanks
Please see below the diagram showing how it works.
In short, you create a generic graph and a class inherited from PXMapppedCacheExtension which will have all the fields that you need for your reusable logic.
Then you declare the mapping to the class and the implementation of the generic graph.
Please find the complete description by the following link.

Output UML element Enterprise Architect

In Enterprise Architect I'm trying to model my Business Process through the Eriksson-Penker Business Modelling Profile which looks like this:
Everything goes well except for the Output element on the bottom right.
For some reason it doesn't exist in the Toolbox:
How can I get this Output Element here? I'm searching and searching in different toolboxes but I can't find it. Some help would be much appreciated!
This is a simple Object. Choose Other/UML/Object/Object from the toolbox and name it Output. It will appear underlined as in your diagram.
P.S. I see that the EP toolbox has an Object already. Use that in you're done.
Just found out that if you choose 'New Model from Pattern' in the project browser, browse to 'Business' and then select the Eriksson-Penker Diagram that it makes the entire diagram for you and you only have to change the descriptions. So case closed!

How do I using Application Designer, add Failure Class field from different Maximo table to Work Order Tracking?

We want to "Categorize" our work orders more systematically. So far, we've been using Description, but we feel it is not a reliable way. We were hoping to use Failure Class as a starting point, but we find that having on a different tab discourages technicians and the help desk from classifying the work order.
Is it possible to add/duplicate the Failure Class field to Work Order Tracking screen?
Normally, I wouldn't ask, but was not clear if this was possible because Failure Class, Codes, and Tracking are different tables in Maximo. So, I wasn't sure how this would work exactly...
The simple answer is to use Application Designer's copy / paste functionality to duplicate the field. The specific field in question is on the top level of the Work Order Tracking application and facilitates interaction with the FAILURECODE attribute of the Main Object of the application, which is WORKORDER. Therefore, a copy / paste operation should be all you need. (Note: Application Designer's copy / paste functionality is used via that application's toolbar buttons, not Ctrl+C / Ctrl+V.) And if using Application Designer's copy / paste functionality doesn't work to your satisfaction, I would recommend exporting the XML for the application, copying the line of XML as desired and giving it a unique id, and importing the updated XML back in to Maximo. (Application Designer has toolbar buttons for exporting and importing an application's XML.)
You mentioned difficulty getting users to fill it in as a driver for asking the question. Another solution, which you can do as well as or instead of copying the field, is to specify the Failure Class on each Asset. Then, when an Asset is put on a Work Order, its Failure Class will be copied over, saving the users work and risk of not choosing correctly. And another idea is to highlight the Failure tab until a Failure Class is supplied.
And you also mentioned that the driver behind getting them to fill in the Failure Class, and etc, was to help categorize work. To that point, you should know that Failure Classes, in specific, and Failure Codes, in general, are intended to be used to help you determine what's going wrong with your assets, how often, and how the problems are being fixed. So, using them to categorize work is a bad idea. Instead, you should be using the Work Type field and Classifications, because categorizing work is what these are meant to be used for. The Work Type field is already on the Work Order tab, and Classifications fields are on the Specifications tab. You could copy the Classifications fields the same as I directed above for the Failure Class field.

How to define alternate part shapes in Orchard

Here is my scenario...
Using Orchard CMS 1.7.1 I have created a custom Content Type named 'VistaImage' using the Orchard UI. This Content Type defines one field based on a Media Library Picker Field, this field is also named 'VistaImage'.
A Projection of groups of Vista Images are placed in the 'Featured' Zone as a Widget reference and works well.
Using the Shape Tracer on the resulting page(s), the shape hierarchy looks as follows:
Zone [Featured]
Widget
List
Content Alt: Content-VistaImage
Fields_MediaLibraryPicker Alt: Fields.MediaLibraryPicker-VistaImage
Media
Parts_Image_Summary
What I want to do is to provide alternative shapes from the Content shape downwards. This is easy enough for Content itself and for Fields_MediaLibraryPicker (as the Shape Tracer automatically provides applicable alternatives (as indicated above)).
My problem comes in providing alternatives for the Media and Parts_Image_Summary parts.
Looking at the documentation for Alternates on the Orchard web site, I thought that if I created a new shape in my Theme at at /Views/Parts/Image.Summary-VistaImage.cshtml this would get referenced, but it does not (though if I remove the '-VistaImage' the shape does get used, but this would, I believe change this shape for every Content Type, which is not what I want to do).
Any advice/direction on how I should approach this requirement would be apprciated.
Thanks.
From personal experience, when you get that low level in the shapes, alternatives don't work very well, if at all. The only way I best deal with those scenarios is to choose the next applicable shape above it, and do an if statement to determine if its the content you want, in which case to remove the default shape display and implement your own hard-coded layout.
eg if the shape simplay says #display(Model.whatever) and you know that displays is garbage for you, look into the model.
For example, I had trouble creating a 4 leveled menu for bootstrap as it only typically deals with 2 levels, so i manipulated the lowest level shape. I.e:
if{Model.Items.Any()}{
//code to generate another submenu for that menuItem
}
This may not even be the most correct way to address this, just the solution I found has worked.
So in your case I'd use VS debug and breakpoint where the mediafield picker is rendered, and find out if the model holds any information letting you know it's your VistaImage content.

Resources