I use Modelio 3.2 and i have a problem with default stereotype.
For instance, when i create two use cases and i add an "extends" links in the use cases (on an existing use case diagram, where i already create an "extends" links in the past... without problem), i have the following error :
E208: The dependency between the ''UseCaseDependency' {f06da9f2-e719-434f-b5cb-8dbf36d692be} UseCaseDependency' and '{1}' use cases is not stereotyped <> or <>.
A UseCaseDependency must be stereotyped <> or <>.
I think the modelio project is corrupted, because i try on an other computer and i have the same error.
How resolve this bug ?
Thanks
In the Configuration > Modules entry could you check ig the 8.3.00.9022 version of Modeler Module is well started!? If not add it and try again.
Related
In my Liferay module, I want to use Liferay's SomeConvenientClass.
What is the recommended way to find out what module provides that class?
So that I can quickly add it to my build.gradle.
Ideally it should either:
return the module's group/name/version,
or say with certitude that this class does not exist in Liferay or is not exported.
Until now I go by trial-and-error and copy/paste from build.gradle files found in the wild, but I am looking for a more reliable method.
I have Liferay installed, and the source code of the exact same Liferay version, if that helps.
I tried mvnrepository but it does not seem to return anything, example: https://mvnrepository.com/search?q=AuditMessageProcessor
Have you tried http://search.maven.org/#advancedsearch ?
For example:
http://search.maven.org/#search|ga|1|c:"AuditMessageProcessor"
This is more an option than a real thing, but this is how I normally do:
be familiar with package naming conventions used by liferay and
inside apps: api, service, web...
be familiar with the bundle structure used by liferay, as their
use of resource folders, which are not so obvious sometimes...
With that in mind, normally on github is enough to navigate: portal->(kernel/impl/services/apps)->app service/api/web...
But this is a natural process that comes when you spend your day inside the code.
Normally, online jar locators help, but quite often I just rely on my IDE.
On my IDE I have all set-up with Spring dependency management, after I extracted the dependencies using Gogo shell with a running bundle. With Gogo you will not find classes, but modules and packs will be listed. (Gogo is probably what you are looking for btw, as it is able to list with version numbers)
Bottom line, if you need a list as a picture of a running environment, use Gogo.
With regards to the master code, just do not trust it! When it comes to modularity and bundles versioning Liferay is pretty messy (read The dependency management problem here: https://www.e-systems.tech/blog/-/blogs/liferay-digital-experience-platform-review-7-0-ga4).
For your step 7, you will need to chose an api version and code against it. The apis are more stable. You can impose a limit for compatibility on you bnd file, which will cause the system to issue warnings. On your environment, you can catch api changes earlier, let's say, you can ask gradle to use a module with an version number but any patch (using the "+" sing), when you build with a fresh cache or if you change gradle resolution strategy to download you dependencies more frequently, if the build breaks, well, you will see it.
Helpful start point: https://dev.liferay.com/pt/develop/reference/-/knowledge_base/7-0/using-the-felix-gogo-shell
This is how I do, it is slow and manual, so don't hesitate to suggest other methods.
Download Liferay's source code if you don't have it already.
Run find . -name SomeConvenientClass.java. If nothing is found, you can be sure the class is not part of Liferay.
In the path to the class, find the src folder level, and go just under that, so for instance if it is modules/apps/collaboration/document-library/document-library-web/src/main/java/com/liferay/document/library/web/portlet/action/DLViewMVCRenderCommand.java then go to modules/apps/collaboration/document-library/document-library-web/.
Hopefully there is a bnd.bnd file there, open it.
If the package of the class is not in the Export-Package section, then either give up (duplicate Liferay's code into your module), or use some dark tricks. If you believe the class should be exported, you can explain your case at https://issues.liferay.com/browse/LPS-70480 for future generations to enjoy.
Module name is the value of Bundle-SymbolicName.
Version is the value of Bundle-Version.
Group is probably com.liferay, although sometimes it is com.liferay.portal, not sure how to tell.
Build. Sometimes it fails because Maven repositories are missing a version, for instance com.liferay.document.library.web 1.0.11 is not available despite being used by DXP fix pack 30. Not sure what to do in such cases except choosing a "similar" version and hoping for the best.
I imported my Java code in Enterprise Architect with the code engineering tool. If I add a class in the class diagram editor (UML) it automatically adds the associations and the generalizations but not the dependencies. Is it possible to setup EA that it also includes the existing dependencies from source code (local variables, parameters etc)?
There is one option you can set which controls this in EA 10: look at Tools -- Options -- Source Code Engineering. The last of the list of check boxes is called "Create dependencies for operation returns and parameter types."
This solves the problem as far as parameters are concerned (you'd have to reimport the code, of course), but I haven't tested it to see how it deals with local variables. I'm guessing it doesn't create dependencies for those.
We work with 2 organizations. One test and one production, the test is where we do all the work on an unmanaged solution. Than we export it managed and import on the production. This has worked without a problem so far. But when I tried it now I get the following error:
A managed solution cannot overwrite a {0} component on the target system that has an unmanaged base instance. The most likely scenario for this error is that an unmanaged solution has installed a new unmanaged {0} component on the target system, and now a managed solution from the same publisher is trying to install that same {0} component as managed. This will cause an invalid layering of solutions on the target system and is not allowed.
I assume this means something has changed on production and now can't be overwritten by the solution from the test environment. So I figured, no biggy, I'll just delete this from the test and try again. However the problem is it says that the issue is in Mappings, an Attribute map between quotedetail and salesorderdetail. These two have no relationship... So I went looking in the customization.xml and found the mapping.
Here I found this:
<EntityMap>
<EntitySource>quotedetail</EntitySource>
<EntityTarget>salesorderdetail</EntityTarget>
<AttributeMaps>
<AttributeMap>
<AttributeSource>ave_finishingid</AttributeSource>
<AttributeTarget>ave_finishingid</AttributeTarget>
</AttributeMap>
</AttributeMaps>
</EntityMap>
finishing is a custom entity, which does contain a 1:N relation to both entities. So I tried to delete these relationships but I simply can't. It keeps giving me the error:
Cannot Delete Component because one or more components require it. But there are no dependencies left on the relationships. I've deleted everything from forms, views, charts, even navigations... Still nothing when I select the relationship and click on show dependencies, it says there are none... I'm at a loss here on what to do.. I need to export the solution to production asap but am not allowed to edit the customization.xml, cause I figured I'ld just delete the entitymap there and it would work, which is probably true but also unsupported... Anyone have any ideas on what else I can do??
You need to check not just "Custom" relationships, but All relationships. If you are exporting from that environment to generate the solution, then there has to be a relationship otherwise that xml node would not exist.
Also, you should be able to "View Details" when it says "Cannot delete component because one or more components require it". This will tell you exactly what the problem is, so you can remedy it, and re-export.
I recently installed Papyrus and attempted to follow the tutorial for creating a model and generating Java code off it.
Unfortunately, I'm pretty much stuck right at the beginning. In the class definition, I added a static operation for main, and I'm able to specify its argument as an array:
in args: <Undefined> [*]
Unfortunately, it does not allow me to specify the type to be String. That is, I would like to specify it as follows:
in args: String [*]
No matter how I enter the type (or any type for that matter), the type reverts back to <Undefined>. I suspect something is wrong or missing with a profile it is supposed to use. Unfortunately, the documentation for this tool is rather sparse, and I cannot find an answer or solution to this.
Anyone has run into this same problem as well???
Have you imported the UML Primitive types package? This should allow you to define the type of the argument to Integer, String or Boolean.
In the model explorer, right click on your model, then choose 'Import package from registered library'
In the window that pops up pick 'UMLPrimitiveTypes' (or the Java ones, if you prefer that).
After this, it should work.
In the latest version of Papyrus, you have to go to model explorer, right click on your model and then choose Import. After that select "Import Registered Package." That will bring up a dialog with a list of registered packages. From that you can select either "UMLPrimitiveTypes" or "JavaPrimitiveTypes"
Papyrus consider that modeling is independent of languages and therefore no java type are usually possible. This is fully logical in a MDA approach but not in the real life :-)
There is an accelero plugin which is supposed to generate code from a diagram but it doesn't work with the latest Helios build so.....
The best is to do you class diagram and then manually code the related code. I am sure that your code will be better than the one you could get from accelero :-)
It's very simple, you can do it by just clicking on the attribute properties, then select type option, In the menu bar select Tree, then Primitive Types.
The String class is not able to see in java primitive types, you need import a package from java core library.
There is a java profile and library/package in Papyrus Software Designer extention.
You may install it via the market place.
More details: https://wiki.eclipse.org/Java_Code_Generation
EDIT: might be fixed in latest Xcode 4.0.2 (just released) - I'm downloading this out now, and will re-edit once I've tested it.
Create two entities (call them "Manager" and "Employee", to stick with Apple's docs).
Create a relationship, "worksFor" from Manager (1) to Employee (many), and mark it as "not optional". (you'll probably need to create 2 relationships, mark 1 as inverse of other)
Hook up an interface using IB, according to Apple's original docs (NB: these don't work any more, but here's an almost exact recreation of the basic setup in Xcode4: http://rgprojection.blogspot.com/2011/04/xcode-4-and-core-data-macos-x.html) and use Bindings (as described in the linked post) to create/add/delete the objects.
Now try to save. ERROR: "worksFor is a required property".
In previous versions of Xcode, this worked as expected: you'd told Xcode that there was a bidirectional relationship, you told it that it was required, and so when it added the "Employee" to the "Manager", it automatically hooked-up the inverse.
Has anyone else worked out how to make Xcode4 do what it's supposed to? Is it an Xcode4 bug? I know that some of the CoreData support in Xcode4 has been deleted, with no replacement (yet), so I'm wondering if this has been deleted too?!
EDIT: here's another project, one I made from scratch, same problem. Although (xcode4 bug, definitely!) this time I created the Relationship in the "grid" editor view rather than the "tree graphical" view... and the generated source code for objects was different (should not be the case, obviously)
second project screenshot
EDIT2: StackOverflow was showing the screenshot above, but has now removed it, you'll have to click on the link. Sorry.
I haven't seen the problem you describe and I've created several data models under Xcode4. It appears to work just like it did in previous versions in that regard. I think you've got something else going on.
Xcode 4.0.2 seems to have fixed the problem - everything works as expected now, with no changes to code :)