Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Is it possible to to save model in BPEL?
Is it possible to to save model in BPEL? [message #1513932] Tue, 16 December 2014 23:58
Grzegorz Ziemski is currently offline Grzegorz ZiemskiFriend
Messages: 1
Registered: December 2014
Junior Member
Is it possible to save model in BPEL?

Code transformation:
-- @nsURI UML=http:\\www.eclipse.org\uml2\2.1.0\UML
-- @path BPEL=platform:/plugin/org.eclipse.bpel.model/model/bpel.ecore

module UmlToBpel;
create OUT : BPEL from IN : UML;

rule Process {
	from
		A : UML!Activity	 
	to
		process : BPEL!Process (
			name <- A.name,
			activity <- seq
		),
		seq: BPEL!Sequence1 (
			activities <- A.ownedNode->iterate(e; res : OrderedSet(BPEL!Activity) = OrderedSet {} | 
				if (e.oclIsTypeOf(UML!OpaqueAction)) then
					res->including(thisModule.invoke(e))->including(thisModule.assign(e))
				else 
					res
				endif
			)
		)
}

lazy rule assign {
	from
		s : UML!OpaqueAction
	to
		a: BPEL!Assign (
			name <- 'test3'
		)
}


lazy rule invoke { 
	from
		A : UML!OpaqueAction	 
	to
		invoke : BPEL!Invoke (
			name <- A.name
		)
}


Launcher config:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.m2m.atl.adt.launching.atlTransformation">
<stringAttribute key="ATL File Name" value="/UmlToBpel/Transformations/UmlToBpel.atl"/>
<stringAttribute key="ATL VM" value="EMF-specific VM Profiler"/>
<stringAttribute key="ATL_COMPILER" value="atl2006"/>
<booleanAttribute key="IS_REFINING" value="false"/>
<mapAttribute key="Input">
<mapEntry key="IN" value="UML"/>
</mapAttribute>
<mapAttribute key="Libs"/>
<mapAttribute key="Model Handler">
<mapEntry key="BPEL" value="EMF"/>
<mapEntry key="UML" value="EMF"/>
</mapAttribute>
<mapAttribute key="ModelType">
<mapEntry key="BPEL" value="METAMODELOUTPUT"/>
<mapEntry key="IN" value="MODELINPUT"/>
<mapEntry key="OUT" value="MODELOUTPUT"/>
<mapEntry key="UML" value="METAMODELINPUT"/>
</mapAttribute>
<mapAttribute key="Options">
<mapEntry key="OPTION_CLEAR" value="true"/>
<mapEntry key="OPTION_CONTENT_TYPE" value="true"/>
<mapEntry key="OPTION_DERIVED" value="true"/>
<mapEntry key="allowInterModelReferences" value="false"/>
<mapEntry key="printExecutionTime" value="true"/>
<mapEntry key="step" value="true"/>
<mapEntry key="supportUML2Stereotypes" value="false"/>
</mapAttribute>
<listAttribute key="OrderedInput">
<listEntry value="IN"/>
</listAttribute>
<listAttribute key="OrderedOutput">
<listEntry value="OUT"/>
</listAttribute>
<mapAttribute key="Output">
<mapEntry key="OUT" value="BPEL"/>
</mapAttribute>
<mapAttribute key="Path">
<mapEntry key="BPEL" value="platform:/plugin/org.eclipse.bpel.model/model/bpel.ecore"/>
<mapEntry key="IN" value="/UmlToBpel/Models/start.uml"/>
<mapEntry key="OUT" value="/UmlToBpel/Models/end.bpel"/>
<mapEntry key="UML" value="uri:http:\\www.eclipse.org\uml2\2.1.0\UML"/>
</mapAttribute>
<stringAttribute key="Port" value="6060"/>
<listAttribute key="Superimpose"/>
<stringAttribute key="org.eclipse.debug.ui.ATTR_CONSOLE_ENCODING" value="UTF-8"/>
</launchConfiguration>


When I run the transformation, I get an exception:
java.lang.NullPointerException: eObject cannot be null in getNamespaceMap()
	at org.eclipse.bpel.model.util.BPELUtils.getNamespaceMap(BPELUtils.java:255)
	at org.eclipse.bpel.model.resource.BPELResourceImpl.doSave(BPELResourceImpl.java:101)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1430)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:999)
	at org.eclipse.m2m.atl.core.emf.EMFExtractor.extract(EMFExtractor.java:65)
	at org.eclipse.m2m.atl.core.service.LauncherService.launch(LauncherService.java:141)
	at org.eclipse.m2m.atl.core.ui.launch.AtlLaunchConfigurationDelegate.launchOrDebug(AtlLaunchConfigurationDelegate.java:300)
	at org.eclipse.m2m.atl.core.ui.launch.AtlLaunchConfigurationDelegate.launch(AtlLaunchConfigurationDelegate.java:237)
	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
	at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
	at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

[Updated on: Thu, 18 December 2014 22:29]

Report message to a moderator

Previous Topic:Creating an ATL project programmatically..
Next Topic:Building a Map Dynamically
Goto Forum:
  


Current Time: Thu Apr 25 08:32:20 GMT 2024

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

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

Back to the top