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
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

<property file=""/>

<!-- 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"/>

<!-- Run the Generator -->
<component id="generator" class="org.openarchitectureware.xpand2.Generator" skipOnErrors="true">
<!-- The Meta Model is JavaBeans based -->
<metaModel class=" ">
<typeStrategy class=" egy "/>
<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}">
class="org.openarchitectureware.xpand2.output.JavaBeautifier " />


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
Previous Topic:[XPAND] WorkflowInterruptedException: EvaluationException : Nullevaluation
Next Topic:[Acceleo] Import UML Profile to use in templates
Goto Forum:

Current Time: Sat Jan 25 08:26:53 GMT 2020

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

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

Back to the top