WorkflowEngine run [message #660691] |
Mon, 21 March 2011 08:41 |
Dennis Melzer Messages: 244 Registered: July 2009 |
Senior Member |
|
|
Hello,
i use Enterprise Architect and the UML2 Exporter to generate my java classes.
i have 3 mwe files. The first generate the profile.uml the second the model.uml and the third uses this files and generate the java code. If i execute the files in that order, all works.
But now i want to create a class which do all stuff.
public class Generator {
private static String workflowFile = "workflow.mwe";
private static String profileUMLFile = "ProfileUML2Export.mwe";
private static String modelUMLFile = "ModelUML2Export.mwe";
private static Map<String, String> properties;
public static void main(String[] args) throws Exception {
properties = loadProperties();
executeWorkflow(profileUMLFile);
executeWorkflow(modelUMLFile);
executeWorkflow(workflowFile);
}
private static void executeWorkflow(String fileName) {
Map<String, ?> slotContents = new HashMap<String, String>();
new WorkflowEngine().run(fileName, new NullProgressMonitor(),
properties, slotContents);
}
Then i get follow error message
0 INFO --------------------------------------------------------------------------------------
125 INFO EMF Modeling Workflow Engine 1.0.0, Build v201011090319
125 INFO (c) 2005-2009 openarchitectureware.org and contributors
125 INFO --------------------------------------------------------------------------------------
125 INFO running workflow: src\tools\model\workflow\ProfileUML2Export.mwe
125 INFO }
2281 DEBUG Checking configuration of: EA_Xmi2ProfileExporter
2281 INFO EA_Xmi2ProfileExporter
2281 INFO UML2ProfileExporter for EA (2.0-SNAPSHOT)
2281 INFO OutputFile : xyz.profile.uml
16234 INFO Start XML2.0-output ...
18906 INFO XML2.0-Export done.
18906 INFO workflow completed in 16625ms!
19906 INFO --------------------------------------------------------------------------------------
19906 INFO EMF Modeling Workflow Engine 1.0.0, Build v201011090319
19906 INFO (c) 2005-2009 openarchitectureware.org and contributors
19906 INFO --------------------------------------------------------------------------------------
19906 INFO running workflow: src\tools\model\workflow\ModelUML2Export.mwe
19906 INFO
Checking configuration of: EA_Xmi2Exporter
22655 INFO EA_Xmi2Exporter
22655 INFO UML2Exporter for EA (2.0-SNAPSHOT)
22655 INFO EAP-File : xyz.EAP
22655 INFO Package : com
22655 INFO OutputFile : model\model.uml
36655 INFO Start XML2.0-output ...
Xmi20Writer: Model or Profile not set.
36843 INFO XML2.0-Export done.
36843 INFO workflow completed in 14188ms!
36843 ERROR [ERROR]: Start package is not a profile!(Element: -UNKNOWN-; Reported by: -UNKNOWN-)
36843 INFO --------------------------------------------------------------------------------------
36843 INFO
Mhm i dont understand the error message "Start package is not a profile"
Has anbody an idea?
[Updated on: Mon, 21 March 2011 09:17] Report message to a moderator
|
|
|
|
|
|
Re: WorkflowEngine run [message #660791 is a reply to message #660746] |
Mon, 21 March 2011 15:51 |
Dennis Melzer Messages: 244 Registered: July 2009 |
Senior Member |
|
|
Christian Dietrich wrote on Mon, 21 March 2011 09:01 | Hi,
and the same stuff works if you run the workflows manually?
does it work if you run 3 java classes / one per workflow in a row?
can you compare the workflow logs? does
Xmi20Writer: Model or Profile not set.
come when you start the workflow via rightclick?
~Christian
|
Hi,
yes the same stuff works, if i start the workflows via rightclick.
The logs are the same except the error message Xmi20Writer: Model or Profile not set. This error message come if i use my Starter class. The same problem with the Anttask.
Perhaps a refresh is missed. It happens only if execute the generation for the profile and the model in 1 workflow or start it togehter in 1 process.
Like
private static void executeWorkflow() {
new WorkflowEngine().run("ProfileUML2Export.mwe", new NullProgressMonitor(), properties, slotContents);
new WorkflowEngine().run("ModelUML2Export.mwe", new NullProgressMonitor(), properties, slotContents);
}
standalone it works...
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03413 seconds