Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Workflow Javadoc ?(invoking workflow from JAVA)
Workflow Javadoc ? [message #525941] Thu, 08 April 2010 11:09 Go to next message
MaximeLecourt  is currently offline MaximeLecourt Friend
Messages: 108
Registered: February 2010
Location: France
Senior Member
I want to invoke the workflow from Java, but I couldn't find much javadoc about that.
I only found the javadoc for oaw4.1
http://www.openarchitectureware.org/api/oaw4/4.1.0/core/inde x.html
and it's not detailled enough.

What I mostly want to know, is when calling the run method
public boolean run(String workFlowFile,
                   ProgressMonitor theMonitor,
                   Map<String,String> theParams,
                   Map<String,?> externalSlotContents)


how can I link theParams (or externalSlotContents) to my workflow file ?


One day I shall master M2T, but that day has yet to come...
Re: Workflow Javadoc ? [message #525963 is a reply to message #525941] Thu, 08 April 2010 12:17 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hello, just use the params as you are used to use properties in your workflow

Map<String, String> params = new HashMap<String, String>();

params.put("model.file", "my.model");
params.put("target.dir", "src-gen");

WorkflowRunner workflowRunner = new WorkflowRunner();
workflowRunner.run(
				workFlowUri.getPath(),
				new org.openarchitectureware.workflow.monitor.NullProgressMonitor(),
				params, new HashMap<String, Object>());


<property name='modelFile' />
  <property name='targetDir'/>
  <component file='de/itemis/xprofile/editor/xtext/parser/Parser.oaw'>
     <modelFile value='${modelFile}'/>
     <outputSlot value='model'/>
  </component>



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

[Updated on: Thu, 08 April 2010 12:17]

Report message to a moderator

Re: Workflow Javadoc ? [message #525992 is a reply to message #525941] Thu, 08 April 2010 13:42 Go to previous message
MaximeLecourt  is currently offline MaximeLecourt Friend
Messages: 108
Registered: February 2010
Location: France
Senior Member
Thanks.

Maxime


One day I shall master M2T, but that day has yet to come...
Previous Topic:[Xtend] Wrong parameter type
Next Topic:Acceleo and TopCased
Goto Forum:
  


Current Time: Thu Apr 25 10:32:32 GMT 2024

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

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

Back to the top