Sunday, June 21, 2009

Separation of Tagged Values with same name

In forum of components4oaw.sf.net a user posted the problem that all tagged values of the same name have the same value, although they are of different stereotypes.

After some research work and different kind of code work I found out, that EA doesn't support different tagged values with same name of different stereotype correctly.
You're able to separate them in the view for tagged values by selecting option "Show Fully Qualified Tags", but in COM interface these fully qualified name is not visible.

I hope, Sparx Systems will add a this feature very soon.

Friday, April 24, 2009

See you at SEConf 2009 in Vienna!

I will be at the SEConf 2009 in vienna between 15. and 17. June 2009.

On June 15. I will lead a workshop "Introduction in oAW and Topcased".
I can not use EA due to EA is not Open Source.

On June 16. I will have a presentation about using MDSD reducing complexity in the usage of Hibernate

Workshop and presentation will be in German.

Hope to see you there.

Thursday, April 23, 2009

BUG in DbConnect of UML2Exporter Release 1.6.1

There is a critical bug in the exporter concerning db based repositories of EA. Sorry for that.

When using a db connect definition in parameter DbConnect you will get an error message "File not found ....". It will be fixed in the next release.

Workaround:
Open EA and open your project with "Connect to server".
Save the project as a shortcut --> Menu "File / Save Project as ..."

This way you generate a shortcut file to your database.
Now use this shortcut file in the UML2Exporter as EAP-File.
Then it works!

Sunday, April 19, 2009

Customized Toolbox for your UML profile

When working with a UML profile in a diagram you have to select the profile toolbox first before you can create elements by drag&drop. When switching to another diagram and returning you have to select the profile toolbox again.

With MDG Technology of EA you can define your profile(s) as a new technology and add it to your EA installation. With MDG technology you can
  1. create diagrams with ID of your technology
  2. specify a toolboxes containing all the drawing elements needed
  3. adding common elements of uml to your toolbox
  4. defining own graphical representation for each stereotype
  5. preparing patterns for designing
  6. and some more
For complete overview see online help of EA.

Defining a MDG Technology is a little bit tricky. Here are the steps required to define your own technology.
  • Define the UML profile (as usual)
  • Define a new profile for diagram types (see online help)
  • Define a new profile for profile toolbox (see online help)
  • Define a new MDG technology and deploy it to your EA installation (see online help)

After fulfilling all required steps successfully you can create diagrams of your technology with your toolboxes and every time this diagram is selected the toolboxes are selected to.

Thursday, April 09, 2009

Stereotypes have no tagged values

When working with model sometime it happens, that you have to add a stereotype to an existing class by selecting from list in property dialog or by enter stereotype name in editbox. When going back to diagram you will see, that the tagged values are not listed in tagged value view.


How to solve this?

Change to Resource view and select the stereotype from profile.


Click right mouse button and select "Select Tagged Values and Constraints ..."

Press OK and all missing tagged values of the selected stereotype are applied to the model elements. This procedure doesn't remove tagged values not used any more. These have to be removed manually.

Tuesday, April 07, 2009

Starting oAW workflow out of EA

Enterprise Architect has a feature for developing, compiling and debugging source code. This is based on executing commands directly or on a command script.

When activating menu "Project --> Build and Run --> Package build scripts" or just press Shift+F12 following dialog opens.
Here you can add a script definition or a call to a command file.

I created a command file containing all the steps required to execute a workflow from batch file:
  1. Setup class path
  2. Call worflow with java command
Command file could look like this:
echo off
set BASEDIR=.
cd C:\Personal\Programs\oaw431
set CLASSPATH=.;

set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\org.openarchitectureware.adapter.emf.check_4.3.1.jar;

set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\org.openarchitectureware.base_4.3.1.jar;

set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\org.openarchitectureware.core.emftools_4.3.1.jar;

set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\org.openarchitectureware.core.expressions_4.3.1.jar;

set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\org.openarchitectureware.core.workflow_4.3.1.jar;

set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\org.openarchitectureware.core.xpand2_4.3.1.jar;

set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\org.openarchitectureware.emftools_4.3.1.jar;

set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\org.openarchitectureware.uml2.adapter.plugin_4.3.1.jar;

set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\org.openarchitectureware.uml2.adapter_4.3.1.jar;

set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\org.openarchitectureware.util.stdlib_4.3.1.jar;

set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\org.openarchitectureware.workflow_4.3.1.jar;

set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\org.eclipse.emf.ecore_2.4.1.jar;

set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\org.eclipse.emf.ecore.xmi_2.4.1.jar;

set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\org.eclipse.emf.common_2.4.0.jar;

set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\org.eclipse.emf.mapping.ecore2xml_2.4.0.jar;
set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\org.eclipse.uml2_2.1.0.jar;
set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\org.eclipse.uml2.uml_2.2.1.jar;

set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\org.eclipse.uml2.common_1.4.0.jar;

set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\org.eclipse.uml2.uml.resources_2.2.0.jar;

set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\org.eclipse.ant.core_3.2.0.jar;

set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\commons-lang-2.3.jar;

set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\org.apache.log4j_1.2.13.jar;
set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\org.apache.commons.cli_1.0.0.jar;
set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\org.apache.commons.logging_1.0.4.jar;
set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\org.eclipse.text_3.4.0.jar;
set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\org.eclipse.jdt.core_3.4.2.jar;
set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\org.eclipse.equinox.common_3.4.0.jar;
set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\stringtemplate-3.0.jar;
set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\antlr-runtime-3.0.jar;
set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\ea_com_interface-1.6.1-RC1.jar;
set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\ea_toolsupport-1.6.1-RC1.jar;

set CLASSPATH=%CLASSPATH%%BASEDIR%\lib\eaapi.jar;
set CLASSPATH=%CLASSPATH%%BASEDIR%\src\workflow;

java -cp %CLASSPATH% org.openarchitectureware.workflow.WorkflowRunner workflow.oaw


An example command file you will find here.

When everything is configured correctly you can start workflow within EA by pressing Ctrl+Shift+F12. Output looks like following.

Sunday, November 30, 2008

Stereotypes for Requirement, Issue or Feature

In a comment of the last posting, corvo asked to extend the metatypes Requirement, Issue or Feature with own stereotypes in a profile and add additional information in tagged values.

Due to Requirements, Issues and Features are not part of the UML metamodel, these stereotypes couldn't be created in a UML profile. There is no way to express these extensions in UML. The using of the EA profile is a work arround, which creates classes for Requirements, Issues and Featurs with corresponding stereotypes containing all the predefined properties of these elements.

The metamodel of EA is not compatible with UML2.