Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [MWE] getting to the issues in the WorkflowRunner
[MWE] getting to the issues in the WorkflowRunner [message #520059] Wed, 10 March 2010 19:58 Go to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi,
I am calling the WorkFlowRunner to execute a workflow. Now if there are (configuration) problems then I would like to
capture the error(s) and report them back (not through log4j).

Is there a way to get to the issues list created internally in the WorkflowRunner (maybe another WorkflowRunner
implementation which exposes more internals?). My main obstacle is the prepare method which just returns true/false but
not the issues object it creates internally.

If there are no workarounds, would it make sense to create a feature-request bugzilla for this? (any change it will be
done for Helios?)

--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [MWE] getting to the issues in the WorkflowRunner [message #520777 is a reply to message #520059] Mon, 15 March 2010 10:12 Go to previous messageGo to next message
Siamak Haschemi is currently offline Siamak HaschemiFriend
Messages: 13
Registered: January 2010
Junior Member
Hi,

this would be a nice change, so people could decide themself how they present the issues. Additionally, I would like to have a possibility to add non-standard visitors for the workflow-XML-AST. Especially, I would like to have a custom org.eclipse.emf.mwe.internal.core.ast.util.VisitorCreator. But all the *Visitor stuff and the WorkflowFactory are in internal packages.

So, should I also add a BugZilla Feature Request?


Cheers,
Siamak
Re: [MWE] getting to the issues in the WorkflowRunner [message #520789 is a reply to message #520777] Mon, 15 March 2010 10:54 Go to previous messageGo to next message
Siamak Haschemi is currently offline Siamak HaschemiFriend
Messages: 13
Registered: January 2010
Junior Member
Hi again,

for your request, the patch is really simple, but breaks the public API. I think this is ok since MWE is in incubation.
For my request, there are more changes needed.

I attaced the patch for applying injection of an Issues-Object to the configuration check. Could someone review and add that to the cvs HEAD?

Cheers,
Siamak

### Eclipse Workspace Patch 1.0
#P org.eclipse.emf.mwe.core
Index: src/org/eclipse/emf/mwe/core/WorkflowRunner.java
===================================================================
RCS file: /cvsroot/modeling/org.eclipse.emf/org.eclipse.emf.mwe/plugins/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/core/WorkflowRunner.java,v
retrieving revision 1.23
diff -u -r1.23 WorkflowRunner.java
--- src/org/eclipse/emf/mwe/core/WorkflowRunner.java	5 Mar 2010 10:36:44 -0000	1.23
+++ src/org/eclipse/emf/mwe/core/WorkflowRunner.java	15 Mar 2010 10:48:02 -0000
@@ -287,8 +287,8 @@
 	 */
 	public boolean run(final String workFlowFile, final ProgressMonitor theMonitor,
 			final Map<String, String> theParams, final Map<String, ?> externalSlotContents) {
-		final boolean configOK = prepare(workFlowFile, theMonitor, theParams);
 		final Issues issues = new IssuesImpl();
+		final boolean configOK = prepare(workFlowFile, theMonitor, theParams, issues);
 		if (configOK) {
 			return executeWorkflow(externalSlotContents, issues);
 		}
@@ -296,7 +296,7 @@
 	}
 
 	public boolean prepare(final String workFlowFile, final ProgressMonitor theMonitor,
-			final Map<String, String> theParams) {
+			final Map<String, String> theParams, final Issues issues) {
 		if (workFlowFile == null) {
 			throw new NullPointerException("workflowFile is null");
 		}
@@ -319,7 +319,6 @@
 		if (logger.isDebugEnabled() && !params.isEmpty()) {
 			logger.debug("Params:" + params.toString());
 		}
-		final Issues issues = new IssuesImpl();
 
 		try {
 			final WorkflowFactory factory = new WorkflowFactory();

[Updated on: Mon, 15 March 2010 10:56]

Report message to a moderator

Re: [MWE] getting to the issues in the WorkflowRunner [message #520991 is a reply to message #520777] Tue, 16 March 2010 05:38 Go to previous messageGo to next message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
Hi,


note that with today's M6 we introduce a complete rewrite of MWE (called
MWE 2) which is implmented in Xtext.

We don't have that concpet there neither. So ,yes, feel free to open a
feature request.

Sven



Siamak Haschemi schrieb:
> Hi,
>
> this would be a nice change, so people could decide themself how they
> present the issues. Additionally, I would like to have a possibility to
> add non-standard visitors for the workflow-XML-AST. Especially, I would
> like to have a custom
> org.eclipse.emf.mwe.internal.core.ast.util.VisitorCreator. But all the
> *Visitor stuff and the WorkflowFactory are in internal packages.
>
> So, should I also add a BugZilla Feature Request?
>
>
> Cheers,
> Siamak


--
Need professional support for Xtext and EMF?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de
Re: [MWE] getting to the issues in the WorkflowRunner [message #520992 is a reply to message #520789] Tue, 16 March 2010 05:39 Go to previous messageGo to next message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
Please attache the patch to a bugzilla so we can apply it to the old
implementation.

Sven


Siamak Haschemi schrieb:
> Hi again,
>
> for your request, the patch is really simple, but breaks the public API.
> I think this is ok since MWE is in incubation. For my request, there are
> more changes needed.
>
> Here's the patch (I could not upload a file) for applying injection of
> an Issues-Object to the configuration check:
>
>
> ### Eclipse Workspace Patch 1.0
> #P org.eclipse.emf.mwe.core
> Index: src/org/eclipse/emf/mwe/core/WorkflowRunner.java
> ============================================================ =======
> RCS file:
> /cvsroot/modeling/org.eclipse.emf/org.eclipse.emf.mwe/plugin s/org.eclipse.emf.mwe.core/src/org/eclipse/emf/mwe/core/Work flowRunner.java,v
>
> retrieving revision 1.23
> diff -u -r1.23 WorkflowRunner.java
> --- src/org/eclipse/emf/mwe/core/WorkflowRunner.java 5 Mar 2010
> 10:36:44 -0000 1.23
> +++ src/org/eclipse/emf/mwe/core/WorkflowRunner.java 15 Mar 2010
> 10:48:02 -0000
> @@ -287,8 +287,8 @@
> */
> public boolean run(final String workFlowFile, final ProgressMonitor
> theMonitor,
> final Map<String, String> theParams, final Map<String, ?>
> externalSlotContents) {
> - final boolean configOK = prepare(workFlowFile, theMonitor,
> theParams);
> final Issues issues = new IssuesImpl();
> + final boolean configOK = prepare(workFlowFile, theMonitor,
> theParams, issues);
> if (configOK) {
> return executeWorkflow(externalSlotContents, issues);
> }
> @@ -296,7 +296,7 @@
> }
>
> public boolean prepare(final String workFlowFile, final
> ProgressMonitor theMonitor,
> - final Map<String, String> theParams) {
> + final Map<String, String> theParams, final Issues issues) {
> if (workFlowFile == null) {
> throw new NullPointerException("workflowFile is null");
> }
> @@ -319,7 +319,6 @@
> if (logger.isDebugEnabled() && !params.isEmpty()) {
> logger.debug("Params:" + params.toString());
> }
> - final Issues issues = new IssuesImpl();
>
> try {
> final WorkflowFactory factory = new WorkflowFactory();
>
>


--
Need professional support for Xtext and EMF?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de
Re: [MWE] getting to the issues in the WorkflowRunner [message #521021 is a reply to message #520992] Tue, 16 March 2010 09:17 Go to previous messageGo to next message
Siamak Haschemi is currently offline Siamak HaschemiFriend
Messages: 13
Registered: January 2010
Junior Member
Hi Sven,

I found a related Bug 289287 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=289287) which proposes an enhancement of for the WorkflowRunner. Since the mentioned injection of the Issues-Object is not included there, I opened the Bug 305967 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=305967).

The feature request for custom XML-AST parser is added under Bug 305968 https://bugs.eclipse.org/bugs/show_bug.cgi?id=305968. As you noted, this would be also helpful in the MWE 2 implementation.

Btw, does the new implementation provide a metamodel for the workflow and also for the runtime-status? This would be really helpful for visualizing and diagnosis.


Cheers,
Siamak
Re: [MWE] getting to the issues in the WorkflowRunner [message #622325 is a reply to message #520992] Tue, 16 March 2010 09:17 Go to previous message
Siamak Haschemi is currently offline Siamak HaschemiFriend
Messages: 13
Registered: January 2010
Junior Member
Hi Sven,

I found a related Bug 289287 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=289287) which proposes an enhancement of for the WorkflowRunner. Since the mentioned injection of the Issues-Object is not included there, I opened the Bug 305967 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=305967).

The feature request for custom XML-AST parser is added under Bug 305968 https://bugs.eclipse.org/bugs/show_bug.cgi?id=305968 As you noted, this would be also helpful in the MWE 2 implementation.

Btw, does the new implementation provide a metamodel for the workflow and also for the runtime-status? This would be really helpful for visualizing and diagnosis.


Cheers,
Siamak
Previous Topic:[MWE] JavaMetaModel change from 0.7 to 0.8
Next Topic:[CDO] A lock could not be obtained exception using Derby database
Goto Forum:
  


Current Time: Sat Apr 20 03:45:08 GMT 2024

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

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

Back to the top