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 14:58  |
Eclipse User |
|
|
|
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 #520789 is a reply to message #520777] |
Mon, 15 March 2010 06:54   |
Eclipse User |
|
|
|
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 06:56] by Moderator
|
|
|
Re: [MWE] getting to the issues in the WorkflowRunner [message #520991 is a reply to message #520777] |
Tue, 16 March 2010 01:38   |
Eclipse User |
|
|
|
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 01:39   |
Eclipse User |
|
|
|
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
|
|
| | |
Goto Forum:
Current Time: Wed Jul 23 14:27:50 EDT 2025
Powered by FUDForum. Page generated in 0.03546 seconds
|