Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Problem running WorkflowRunner from java.
Problem running WorkflowRunner from java. [message #524053] Tue, 30 March 2010 13:30 Go to next message
Syed Imran is currently offline Syed ImranFriend
Messages: 25
Registered: October 2009
Location: Ireland
Junior Member
Hi All,

When i call the the class from my GMF-editor where i have have written the method to call workflow by using WorkflowRunner the code is not generated

new WorkflowRunner().run(workflowFile, new NullProgressMonitor(), new HashMap(), new HashMap());

Although when i run the workflow.oaw using Run as -> oAW Workflow then the code is there.
Any idea why is this happening, secondly the STACK (INFO)is in red color in console rather then black.



Mar 30, 2010 2:22:42 PM org.openarchitectureware.workflow.WorkflowRunner prepare
INFO: ------------------------------------------------------------ --------------------------
Mar 30, 2010 2:22:42 PM org.openarchitectureware.workflow.WorkflowRunner prepare
INFO: openArchitectureWare 4.x Development
Mar 30, 2010 2:22:42 PM org.openarchitectureware.workflow.WorkflowRunner prepare
INFO: (c) 2005-2008 openarchitectureware.org and contributors
Mar 30, 2010 2:22:42 PM org.openarchitectureware.workflow.WorkflowRunner prepare
INFO: ------------------------------------------------------------ --------------------------
Mar 30, 2010 2:22:42 PM org.openarchitectureware.workflow.WorkflowRunner prepare
INFO: running workflow: ../Analysis.diagram/src/workflow.oaw
Mar 30, 2010 2:22:42 PM org.openarchitectureware.workflow.WorkflowRunner prepare
INFO:
Mar 30, 2010 2:22:42 PM org.openarchitectureware.workflow.container.CompositeCompone nt internalInvoke
INFO: XmiReader(xmiParser): file 'E:/Eclipse_workspace/runtime-New_configuration/Allah/exampl e.analysis' => slot 'model'
Mar 30, 2010 2:22:42 PM org.openarchitectureware.workflow.container.CompositeCompone nt internalInvoke
INFO: DirectoryCleaner(dirCleaner): cleaning directory 'srccode, srccode'
Mar 30, 2010 2:22:42 PM org.openarchitectureware.workflow.common.DirectoryCleaner invokeInternal
INFO: Cleaning C:\Documents and Settings\S. Imran\srccode
Mar 30, 2010 2:22:42 PM org.openarchitectureware.workflow.common.DirectoryCleaner invokeInternal
INFO: Cleaning C:\Documents and Settings\S. Imran\srccode
Mar 30, 2010 2:22:42 PM org.openarchitectureware.workflow.container.CompositeCompone nt internalInvoke
INFO: Generator(generator): generating 'template::Root::Root FOR model' => srccode/
Mar 30, 2010 2:22:42 PM org.openarchitectureware.xpand2.Generator invokeInternal2
INFO: Written 1 files to outlet [default](srccode/)
Mar 30, 2010 2:22:42 PM org.openarchitectureware.workflow.WorkflowRunner executeWorkflow
INFO: workflow completed in 16ms!
Re: Problem running WorkflowRunner from java. [message #524058 is a reply to message #524053] Tue, 30 March 2010 13:51 Go to previous messageGo to next message
MaximeLecourt  is currently offline MaximeLecourt Friend
Messages: 108
Registered: February 2010
Location: France
Senior Member
Quote:
INFO: Written 1 files to outlet [default](srccode/)

Seems like there is an output file, but it might not be where you expect it.

It's always written in red.

Compare with the message you get running the workflow directly, it may help.


One day I shall master M2T, but that day has yet to come...
Re: Problem running WorkflowRunner from java. [message #524060 is a reply to message #524053] Tue, 30 March 2010 13:51 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

When invoking the WorkflowRunner from within a plugin you have to ensure that the classpath is set up correct.

The console appeares red because log4j is not on the classpath. commons-logging will use stdout then. Add a dependency to log4j and that's it.

Kind regards,
~Karsten


Need professional support for Xtext, EMF, Eclipse IDE?
Go to: http://devhub.karakun.com
Twitter : @kthoms
Blog : www.karsten-thoms.de
Re: Problem running WorkflowRunner from java. [message #524074 is a reply to message #524060] Tue, 30 March 2010 14:55 Go to previous messageGo to next message
Syed Imran is currently offline Syed ImranFriend
Messages: 25
Registered: October 2009
Location: Ireland
Junior Member
Hi,
Yesss it work,
In my workflow.properties file
I change the property
srcGenPath= srccode

to
srcGenPath=E:/Eclipse_workspace/Bismillah_M2T/Analysis.diagram/srccode


and it works. Very strange how come the code was generated in the same directory "srccode "in the first place when I was running workflow.oaw, But when running WorkflowRunner() it did not ... untill i gave the full path.
Re: Problem running WorkflowRunner from java. [message #548454 is a reply to message #524060] Wed, 21 July 2010 22:10 Go to previous messageGo to next message
Dieter Rosch is currently offline Dieter RoschFriend
Messages: 6
Registered: May 2010
Junior Member
Hi Karsten,

when you say "add a dependency to log4j and that's it.", where do I do that? On the plug-in depencies, or the running instance? For some reason I can't seem to get this right - so I think I'm just doing something dumb Smile

[Updated on: Wed, 21 July 2010 22:19]

Report message to a moderator

Use of queries in acceleo [message #548616 is a reply to message #524053] Thu, 22 July 2010 13:36 Go to previous messageGo to next message
mykel  is currently offline mykel Friend
Messages: 2
Registered: July 2010
Junior Member
Hello, Can I have some introduction about "query" used in the MOFM2T languange.
I need it in my files .MTL thanks !!!! Razz
Re: Use of queries in acceleo [message #548628 is a reply to message #548616] Thu, 22 July 2010 14:09 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hello mykel

you should not be asking this question in an existing topic on m2t xpand / mwe.
please start a new topic for your question

Regards
Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Problem running WorkflowRunner from java. [message #548638 is a reply to message #524053] Thu, 22 July 2010 14:36 Go to previous message
mykel  is currently offline mykel Friend
Messages: 2
Registered: July 2010
Junior Member
I am very sorry, it's my first time I use this forum, I am not familair!!
Apologize me !! Embarrassed
Previous Topic:[Acceleo 3] Out of memory
Next Topic:[Acceleo]Need OCL expert Trick!
Goto Forum:
  


Current Time: Sat Apr 20 01:17:13 GMT 2024

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

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

Back to the top