Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » WorkflowEngine run
WorkflowEngine run [message #660691] Mon, 21 March 2011 08:41 Go to next message
Dennis Melzer is currently offline Dennis MelzerFriend
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 #660734 is a reply to message #660691] Mon, 21 March 2011 12:33 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

where does the Workflow Enginge class come from? I only know org.eclipse.emf.mwe.core.WorkflowRunner

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: WorkflowEngine run [message #660743 is a reply to message #660734] Mon, 21 March 2011 12:57 Go to previous messageGo to next message
Dennis Melzer is currently offline Dennis MelzerFriend
Messages: 244
Registered: July 2009
Senior Member
Hi,

from org.eclipse.emf.mwe.core.WorkflowEngine, the WorkflowRunner ist depcracted. But with both classes the same Problem

[Updated on: Mon, 21 March 2011 12:58]

Report message to a moderator

Re: WorkflowEngine run [message #660746 is a reply to message #660743] Mon, 21 March 2011 13:01 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
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


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Mon, 21 March 2011 13:05]

Report message to a moderator

Re: WorkflowEngine run [message #660791 is a reply to message #660746] Mon, 21 March 2011 15:51 Go to previous messageGo to next message
Dennis Melzer is currently offline Dennis MelzerFriend
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...
Re: WorkflowEngine run [message #660795 is a reply to message #660791] Mon, 21 March 2011 16:08 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

did you try what is suggested here: http://www.openarchitectureware.org/forum/viewtopic.php?show topic=4777
(the cleanup thing)

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: WorkflowEngine run [message #660881 is a reply to message #660795] Tue, 22 March 2011 09:07 Go to previous messageGo to next message
Dennis Melzer is currently offline Dennis MelzerFriend
Messages: 244
Registered: July 2009
Senior Member
Yes did it, but same problem

ProfileExportMWE, i export only 1 Profile,i executed it within and without cleanup

<workflow>

	<property file="workflow.properties" />

	<bean class="org.eclipse.xtend.typesystem.uml2.Setup" standardUML2Setup="true" />

	<component class="net.cmp4oaw.uml2export.mwe.EA_Xmi2ProfileExporter" >
		<EapFile value="${eap.file}" />
		<ModelFile value="${uml.dir}${profile.name}.profile.uml" />
		<ChangedOnly value="${UML2Exporter.ChangedOnly}" />
		<convertUMLTypes value="${UML2Exporter.convertUMLTypes}" />
		<Cleanup value="${UML2Exporter.Cleanup}"/>
	</component>
</workflow>


ModelMWE only 1 Model, i executed it within and without cleanup
<workflow>

	<property file="workflow.properties" />
	
	<bean class="org.eclipse.emf.mwe.utils.StandaloneSetup" platformUri=".."/>	
	<bean class="org.eclipse.xtend.typesystem.uml2.Setup" standardUML2Setup="true" />
		
	<component class="net.cmp4oaw.uml2export.mwe.EA_Xmi2Exporter" >
		<EapFile value="${eap.file}" />
		<ModelFile value="${uml.dir}model.uml" />
		<PackageName value="Views/Model View/com" />
		<Profile value="${uml.dir}${profile.name}.profile.uml" />
		<PackageProfile name="com" value="${profile.name}" />
		<ChangedOnly value="${UML2Exporter.ChangedOnly}" />
		<convertUMLTypes value="${UML2Exporter.convertUMLTypes}" />
		<Cleanup value="${UML2Exporter.Cleanup}"/>
	</component>
</workflow>
Re: WorkflowEngine run [message #660886 is a reply to message #660881] Tue, 22 March 2011 09:15 Go to previous messageGo to next message
Dennis Melzer is currently offline Dennis MelzerFriend
Messages: 244
Registered: July 2009
Senior Member
i created a workflow with both exporter same problem via righclick

<workflow>
	<property file="workflow.properties" />
	
	<bean class="org.eclipse.emf.mwe.utils.StandaloneSetup" platformUri=".."/>
	<bean class="org.eclipse.xtend.typesystem.uml2.Setup" standardUML2Setup="true" />
	
		<!-- Metamodel-Definition -->
	<bean id="UmlMM" class="org.eclipse.xtend.typesystem.uml2.UML2MetaModel"/>
	<bean id="${profile.name}MM" class="org.eclipse.xtend.typesystem.uml2.profile.ProfileMetaModel">
		<profile value="${uml.dir}${profile.name}.profile.uml" />
	</bean>
	<bean id="EmfMM" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel" 
		metaModelPackage ="org.eclipse.emf.ecore.EcorePackage"/>

	<component class="net.cmp4oaw.uml2export.mwe.EA_Xmi2ProfileExporter" >
		<EapFile value="${eap.file}" />
		<ModelFile value="${uml.dir}${profile.name}.profile.uml" />
		<PackageName value="Views/Profile View/PricePilotDSL" />
		<ChangedOnly value="${UML2Exporter.ChangedOnly}" />
		<convertUMLTypes value="${UML2Exporter.convertUMLTypes}" />
		<Cleanup value="${UML2Exporter.Cleanup}"/>
	</component>

	<component class="net.cmp4oaw.uml2export.mwe.EA_Xmi2Exporter" >
		<EapFile value="${eap.file}" />
		<ModelFile value="${uml.dir}model.uml" />
		<PackageName value="Views/Model View/com" />
		<Profile value="${uml.dir}${profile.name}.profile.uml" />
		<PackageProfile name="com" value="${profile.name}" />
		<ChangedOnly value="${UML2Exporter.ChangedOnly}" />
		<convertUMLTypes value="${UML2Exporter.convertUMLTypes}" />
		<Cleanup value="${UML2Exporter.Cleanup}"/>
	</component>


Error.
Xmi20Writer: Model or Profile not set.
33500 ERROR Workflow interrupted. Reason: Errors during validation.
33500 ERROR [ERROR]: Start package is not a profile!(Element: -UNKNOWN-; Reported by: -UNKNOWN-)


Re: WorkflowEngine run [message #660893 is a reply to message #660886] Tue, 22 March 2011 09:25 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

yes this might still be somehow a problem in the exporter. maybe you can contact the developers of the exporter to get further advice.

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: WorkflowEngine run [message #660903 is a reply to message #660893] Tue, 22 March 2011 09:52 Go to previous message
Dennis Melzer is currently offline Dennis MelzerFriend
Messages: 244
Registered: July 2009
Senior Member
For the present i have two mwe files (workaround) better than 3 =).
profile.mwe
workflow.mwe
Previous Topic:Generic Emf Form Editor
Next Topic:[JET] Update input xml dynamically in JET
Goto Forum:
  


Current Time: Thu Apr 25 00:53:31 GMT 2024

Powered by FUDForum. Page generated in 0.04106 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top