Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » no output from workflow called by java - action - debug action calls?
no output from workflow called by java - action - debug action calls? [message #621120] Sun, 12 July 2009 19:21
Bill HingeFriend
Messages: 156
Registered: July 2009
Senior Member

I'm on the last leg - packaging my plugin

I have a plugin which is trying to run a mwe workflow
(the workflow runs in project explorer right click as expected)

When I export my plugin and load it, then run my action, the action
is called as evidenced by org.eclipse.jface.dialogs placed in my code.

I have checked that the workflow urls I am using point to resources
actually exist but I don't seem to be getting any output. Normally it
takes about 11 to 23 secs to run the workflow but through java it just
skips through

I'm selecting a gmf output file as my model file.

This is how I am calling my action (no exceptions thrown)

ngossModel is my GMF model file

Is there any better way of getting debug info from something called
from an action. The only way I can check things is via placing jface
dialogs in my code. Not sure how to use debugger on an action if
possible? (no debug or console)

============================================================ =============

public void run(IAction action) {
try {
EObject source = getInput();
if (source == null) {
String title = Messages.RunTransformationAction_title;
String message = Messages.RunTransformationAction_message;

MessageDialog.openInformation(getShell(), title, NLS.bind(message,
} else {

URL url2 = new
URL(" platform:/plugin/org.tmf.businessService.ui/templates/busine ssServiceDemoWorkflow.mwe ");
org.eclipse.jface.dialogs.MessageDialog.openInformation(getS hell(),
"Debug", "Running workflow := " + url2.toString() );

URL url = FileLocator.toFileURL(url2);

URL url3 = new URL("platform:/plugin/org.tmf.businessService.ui");
URL url4 = FileLocator.toFileURL(url3);

org.eclipse.jface.dialogs.MessageDialog.openInformation(getS hell(),
"Step2", "url := " + url4.toString() );

Map<String, String> properties = new HashMap<String, String>();
Map<String, String> slotcontents = new HashMap<String, String>();

properties.put("src-gen", Platform.getLocation().toOSString() +
properties.put("project_home", url4.toString());

new WorkflowRunner().run(url.getPath(), new NullProgressMonitor(),
properties, slotcontents);

file.getParent().refreshLocal(IResource.DEPTH_ONE, new

org.eclipse.jface.dialogs.MessageDialog.openInformation(getS hell(),
"Done", "Transform run on := " + file.getName()
+ " output produced in location : " +
Platform.getLocation().toOSString() + file.getParent().getFullPath() );
} catch (Exception ex) {

Here is my workflow - it works if run on the workbench using 'run as'
I'm not seeing any console output

<?xml version="1.0" encoding="utf-8" ?>
<property name="workspace_loc" value="./" />
<property name="project_home" value="../org.tmf.businessService.ui" />
<property name="ngossModel" value="templates/default16.ngoss" />
<property name="src-gen" value="../org.tmf.businessService.ui/src-gen"/>
<property name="out" value="out" />

<bean class="org.eclipse.emf.mwe.utils.StandaloneSetup">
<platformUri value="../" />
<RegisterEcoreFile value="${project_home}/model/contract.ecore"/>
<RegisterEcoreFile value="${project_home}/model/sla.ecore"/>
<RegisterEcoreFile value="${project_home}/model/informationModel.ecore"/>
<RegisterEcoreFile value="${project_home}/model/ngoss.ecore"/>
<RegisterEcoreFile value="${project_home}/model/tam.ecore"/>
<RegisterEcoreFile value="${project_home}/model/sbvr.ecore"/>
<registerGeneratedEPackage value="org.eclipse.uml2.uml.UMLPackage"/>


<component class="org.eclipse.emf.mwe.utils.DirectoryCleaner"

<component class="org.eclipse.emf.mwe.utils.Reader">
<firstElementOnly value="true" />
<modelSlot value="ngossModel"/>
<uri value="${ngossModel}"/>


<component class="org.eclipse.xpand2.Generator" id="ngossGenerate">
<metaModel id="mm"
class="org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel "/>

<fileEncoding value="UTF-8"/>
<expand value="Demos::Main FOR ngossModel" />
<outlet path="${src-gen}">

<!-- postprocessor output configuration -->


Previous Topic:first time problem running workflow (mwe 0.7.0)
Next Topic:no output from workflow called by java - action - debug action calls?
Goto Forum:

Current Time: Mon Apr 15 03:16:07 GMT 2024

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

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

Back to the top