Closed osanimmnt closed 3 years ago
Hi, could you provide some details about the issue?
Hi, could you provide some details about the issue?
Sure. details added
@jbsarrodie Can you say what the main issues are regarding coArchi and Specializations? Are there any quick fixes we can apply to coArchi to handle them?
@osanimmnt What version of Archi 4.9 is this? Beta 1?
@osanimmnt Does the error occur on commit, or when you push and then refresh on another machine?
Hi,
First, as written on the forum:
For those interrested in the new specialization mecanism in Archi 4.9: note that there is no support planned for it in coArchi (this will have to wait for coArchi 2 which will certainly take several months to be out). This doesn't mean you can't use both, but in case of conflicts there will be no mean to decide which "version" to keep, and thus this will most certainly block the merge process and thus the publication of changes on the remote server. You've been warned ;-)
@jbsarrodie Can you say what the main issues are regarding coArchi and Specializations? Are there any quick fixes we can apply to coArchi to handle them?
I'll look at it. I think it should be quite easy to make it work (slight changes in the underlying GRAFICO engine), except for conflict handling which would require changes on the UI itself (to show concept's specialization and to expose specialization's definition)
@jbsarrodie Thanks. If you can give me the analysis and what's needed, I'll implement it.
r when you push and then refresh on another machine?
nop, commit is ok. it it when someone try to refresh model in other computer
@osanimmnt Thanks for the info.
As Archi 4.9 is still in beta and we haven't yet implemented support for Specializations in coArchi it's best not to use Specializations in models shared with coArchi.
I create this Specialization and i assigned to a node:
commit ok.
and when someone else refresh model get this:
@osanimmnt Thanks for the info.
As Archi 4.9 is still in beta and we haven't yet implemented support for Specializations in coArchi it's best not to use Specializations in models shared with coArchi.
:'( so bad, because it is a great functionallity to create very good views the users love!
@jbsarrodie Exporting to Grafico the reference to the Profile is using an absolute file href:
<archimate:BusinessRole
xmlns:archimate="http://www.archimatetool.com/archimate"
name="Business Role"
id="id-e3873a0fb2db49d7bd8b8d42f46d6326">
<profiles
href="file:/C:/Users/Phillipus/AppData/Roaming/Archi4/model-repository/archisurance1/model/folder.xml#id-5348a711271e41f0b2d77c791046fde6"/>
</archimate:BusinessRole>
But when referencing from an object from a View it's not using file:/
:
<archimateElement
xsi:type="archimate:BusinessActor"
href="BusinessActor_id-fe9cddb8e22d420ba22e2c475520b97a.xml#id-fe9cddb8e22d420ba22e2c475520b97a"/>
I can't remember why or how this happens?
I think the place to look is in GraficoExporter#createAndSaveResource
:
URI key = file.getName().equals(IGraficoConstants.FOLDER_XML) ?
URI.createFileURI(file.getAbsolutePath()) : URI.createFileURI(file.getName());
URI.createFileURI(file.getAbsolutePath()) : URI.createFileURI(file.getName());
URI value = URI.createFileURI(file.getAbsolutePath());
fResourceSet.getURIConverter().getURIMap().put(key, value);
folder.xml
files are stored with absolute file paths, and other resources with file name. Therefore references to profiles in the main folder.xml
file are absolute.
Adding this line solves the problem:
if(object instanceof IArchimateModel) {
key = URI.createFileURI(file.getName());
}
<archimate:BusinessRole
xmlns:archimate="http://www.archimatetool.com/archimate"
name="Business Role"
id="id-e3873a0fb2db49d7bd8b8d42f46d6326">
<profiles
href="folder.xml#id-5348a711271e41f0b2d77c791046fde6"/>
</archimate:BusinessRole>
But don't know yet whether href="folder.xml#id-5348a711271e41f0b2d77c791046fde6"
will resolve when importing...
But don't know yet whether href=\"folder.xml#id-5348a711271e41f0b2d77c791046fde6\" will resolve when importing...
I think it wont because of the "folder.xml" in the fragment. There's some slight changes needed. Nothing complicated, I just need some time to work on it :-)
I think it wont because of the "folder.xml" in the fragment. There's some slight changes needed. Nothing complicated, I just need some time to work on it :-)
No it doesn't resolve. I'll wait until you get some time ;-)
did you find the error?
did you find the error?
Yes. As you can see from the previous comments, we're working on it.
I'll wait until you get some time ;-)
Done in edb69c8ef046c72dd2b17933f65ec84e811e2aeb
Thanks!
One question regarding this in resolveProxies()
:
if(eObject instanceof IArchimateConcept) {
...
...
} else if(eObject instanceof IArchimateRelationship) {
If eObject
is an IArchimateRelationship
it will execute the first block as it inherits from IArchimateConcept
. Maybe remove the else
?
And resolvedPrimaryProfile
might be null and concept.getProfiles();
might return an empty list?
Ok, see this as a POC ;-)
I'll fix it completely tomorrow.
Ok, see this as a POC ;-)
Aha! :-)
Should be good with 3ba562babe8753a5375a53f46bdba700c84ac042 (I've force pushed an amended commit)
My OCD is playing up again...
import com.archimatetool.model.IProfiles;
<------------------ 😟
I wasn't aware of Iterator#set
. Interesting!
My OCD is playing up again...
import com.archimatetool.model.IProfiles;
<------------------ 😟
Should be good now ;-)
Should be good now ;-)
Phew, I can stop shaking now... 😄
Merged to master
.
I downloaded and installes and new version of archimate and new version of plug-ins but the error pesist.
I downloaded and installes and new version of archimate and new version of plug-ins but the error pesist.
Could you double check the version of Archi and your plugins and test with a new model (not one containing specialization but exported using an old version of the plugin).
the archi version:
plug-in versions:
yes, I tried everything without specialization and it worked properly. but, when I added some especialization I published and all good, but, when I tried to refresh model from other PC I get that error
Can you publish a model on a github repository so that I can try to import it ?
The repo is empty, can you publish into it (it might require you to setup the proxy)
try with this one: https://github.com/osanimmnt/Testing2Specialization you should get this one:
I've just tried (using a newly downloaded version of Archi for Linux and coArchi) and everything is fine: I can import this model successfully.
yes, I tried everything without specialization and it worked properly. but, when I added some especialization I published and all good, but, when I tried to refresh model from other PC I get that error
Thinking about it: you have the latest versioni of Archi and coArchi on the PC from which you published the model, but do you also have the latest version of coArchi on the other PC ?
yes, it is the same. could you please share your plug-ins versions?
can you check? I tried with th other computar the test I shared to you and I get the same error, did you try?
yes, it is the same. could you please share your plug-ins versions?
That's the latest version published on archimatetool.com (Archi 4.9.0 and coArchi 0.8.0).
Yes, I have the same. Did you try to get from repository I shared?
Yes, I have the same. Did you try to get from repository I shared?
yes, that was my point in a previous comment: I can get it without any issue and can see defined specializations and their usage.
Can you see the same image and icons I shared in previous message?
Can you see the same image and icons I shared in previous message?
yes
I uninstalled everything and I deleted all old folder and now it is working!! Thanks! you can close this bug now!
Great!
Don't hesitate to reopen if needed.
Version of Archi, Operating System
Windows 10
Version of this plug-in
0.7.1
Any other plug-ins installed?
Archi Excel Plug-in 0.1.0 Archi Scripting 1.1.1 Icon Plug for ArchimateTool 1.0.11
Expected Behaviour
when commit all is ok
Actual Behaviour
Steps to Reproduce the Behaviour