Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Xpand] Setting up outlet path through Java
[Xpand] Setting up outlet path through Java [message #542751] Fri, 25 June 2010 20:31 Go to next message
Herat Acharya is currently offline Herat AcharyaFriend
Messages: 7
Registered: May 2010
Junior Member
Hi,
How can we set up the outlet path programmatically through Xpand API. current i have the default path in the work flow (oaw) but now i want to enter the path and its the path i have entered will be where my sources should get generated.please tell me how can i achieve that

current i have 2 classes one is as JavaBeans meta model and other is workflow component class extending WorkflowComponentWithModelSlot

this is how i run my workflow..
new WorkflowRunner().run(wfFile ,
monitor, properties, slotContents);

my workflow file is

<workflow>
<property file="example.properties"/>

<!-- Is used to instance the model. The model is put in the modelSlot 'model'-->
<component class=" com.tibco.mdm.repositorymodel.wsdlgen.codegen.MetaModelWorkF low ">
<modelSlot value="model"/>
</component>

<!-- Run the Generator -->
<component id="generator" class="org.openarchitectureware.xpand2.Generator" skipOnErrors="true">
<!-- The Meta Model is JavaBeans based -->
<metaModel class="org.openarchitectureware.type.impl.java.JavaMetaModel ">
<typeStrategy class=" org.openarchitectureware.type.impl.java.beans.JavaBeansStrat egy "/>
</metaModel>
<fileEncoding value="ISO-8859-1"/>
<!-- Call Define Root in Template Root for our model put in the modleslot 'model' -->
<expand value=" com::tibco::mdm::repositorymodel::wsdlgen::xpt::skeleton::ma in FOR model"/>
<outlet path="${srcGenPath}">
</outlet>
<beautifier
class="org.openarchitectureware.xpand2.output.JavaBeautifier " />
</component>

</workflow>


what changes would i have to make here so that it can accept the path that is entered through a Java prog.
Re: [Xpand] Setting up outlet path through Java [message #542757 is a reply to message #542751] Fri, 25 June 2010 21:15 Go to previous message
Herat Acharya is currently offline Herat AcharyaFriend
Messages: 7
Registered: May 2010
Junior Member
Never mind i found out that you can pass the parameties through properties . that is one of the arguments in run method.. Very Happy then in the workflow u have to mention a tag <properties name="srcGenPath" />

<outlet path=${srcGenPath} />

Cheers!!! Smile
Herat
Previous Topic:[Acceleo] Problems with a template
Next Topic:[Acceleo] Using a multiple package source model
Goto Forum:
  


Current Time: Fri Apr 26 22:26:53 GMT 2024

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

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

Back to the top