Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Triquetrum/ICE"

(Added screenshot of the triq packages.)
(Note about updating the location of the triq-p2 repo.)
 
(3 intermediate revisions by 2 users not shown)
Line 6: Line 6:
 
Currently the focus is on enabling ICE to select and launch Triquetrum workflows.
 
Currently the focus is on enabling ICE to select and launch Triquetrum workflows.
 
We're not yet going for a full integration of the workflow editor in ICE, but this would be the natural next step.
 
We're not yet going for a full integration of the workflow editor in ICE, but this would be the natural next step.
 
== Exporting Features from Triquetrum ==
 
ICE requires features from Triquetrum.  Eventually, we will have a P2 site for these features, but in the near term, we export the features by hand from a Triquetrum workspace.
 
 
# See [[Triquetrum/Building_From_Sources | Building From Sources]] for how to setup a workspace and how to build Triquetrum in Eclipse.
 
# ('''FIXME''': To ensure that the Display actor displays, it is necessary to add o.e.t.workflow.ui and o.e.t.workflow.actor.ui) Open the org.eclipse.triquetrum.ptolemy.feature and double click on feature.xml
 
## In the Overview tab, under Feature Content, click on plug-ins (or click on the Included Plug-ins tab)
 
## In the Plug-ins and Fragments tab, click on Add and add
 
### org.eclipse.triquetrum.workflow.ui
 
####org.eclipse.triquetrum.workflow.actor.ui
 
# Select 3 features in your workspace :
 
## org.eclipse.triquetrum.core.feature
 
## org.eclipse.triquetrum.ptolemy.feature
 
## org.eclipse.triquetrum.workflow.core.feature
 
# File -> Export
 
# In the Export window:
 
## Plug-in Development -> Deployable features
 
## Click Next
 
# In the Deployable Features window:
 
## In "Directory", browse to a directory, which will be used in the ICE RCP in the next section
 
## In the Options tab, select "Package as individual JAR archives", "Generate p2 repository" and "Use class files compiled in the workspace". Optionally you can also "Export source" as "Generate source bundles".
 
## Click Finish.
 
# In the selected directory you should see the typical p2/install directory structure.
 
## In the features folder the 3 selected features should be present
 
## In the plugins folder you should have 31 plugins when you exported Triquetrum sources as well.
 
<pre>
 
delerw@DELERW-PC /c/temp/triquetrum/features-for-ice
 
$ ls
 
artifacts.jar  content.jar  features  plugins
 
delerw@DELERW-PC /c/temp/triquetrum/features-for-ice
 
$ cd plugins
 
delerw@DELERW-PC /c/temp/triquetrum/features-for-ice/plugins
 
$ ls
 
diva_11.0.0.201602222155.jar
 
org.eclipse.triquetrum.common.source_1.0.0.201602271915.jar
 
org.eclipse.triquetrum.common_1.0.0.201602271915.jar
 
org.eclipse.triquetrum.processing.api.source_1.0.0.201602271915.jar
 
org.eclipse.triquetrum.processing.api_1.0.0.201602271915.jar
 
org.eclipse.triquetrum.processing.model.impl.memory.source_1.0.0.201602271915.jar
 
org.eclipse.triquetrum.processing.model.impl.memory_1.0.0.201602271915.jar
 
org.eclipse.triquetrum.processing.service.impl.source_1.0.0.201602271915.jar
 
org.eclipse.triquetrum.processing.service.impl_1.0.0.201602271915.jar
 
org.eclipse.triquetrum.validation.api.source_1.0.0.201602271915.jar
 
org.eclipse.triquetrum.validation.api_1.0.0.201602271915.jar
 
org.eclipse.triquetrum.workflow.actor.ui.source_1.0.0.201602271915.jar
 
org.eclipse.triquetrum.workflow.actor.ui_1.0.0.201602271915.jar
 
org.eclipse.triquetrum.workflow.api.source_1.0.0.201602271915.jar
 
org.eclipse.triquetrum.workflow.api_1.0.0.201602271915.jar
 
org.eclipse.triquetrum.workflow.execution.impl.source_1.0.0.201602271915.jar
 
org.eclipse.triquetrum.workflow.execution.impl_1.0.0.201602271915.jar
 
org.eclipse.triquetrum.workflow.model.source_1.0.0.201602271915.jar
 
org.eclipse.triquetrum.workflow.model_1.0.0.201602271915.jar
 
org.eclipse.triquetrum.workflow.repository.impl.filesystem.source_1.0.0.201602271915.jar
 
org.eclipse.triquetrum.workflow.repository.impl.filesystem_1.0.0.201602271915.jar
 
org.eclipse.triquetrum.workflow.ui.source_1.0.0.201602271915.jar
 
org.eclipse.triquetrum.workflow.ui_1.0.0.201602271915.jar
 
org.ptolemy.commons_11.0.0.201602222155.jar
 
ptolemy.actor.lib.gui_11.0.0.201602222155.jar
 
ptolemy.actor.lib_11.0.0.201602222155.jar
 
ptolemy.core_11.0.0.201602222155.jar
 
ptolemy.domains.process_11.0.0.201602222155.jar
 
ptolemy.domains.sdf_11.0.0.201602222155.jar
 
ptolemy.gui_11.0.0.201602222155.jar
 
ptolemy.moml_11.0.0.201602222155.jar
 
delerw@DELERW-PC /c/temp/triquetrum/features-for-ice/plugins
 
$ ls -l *.jar | wc -l
 
    31
 
</pre>
 
Note that
 
<pre>
 
org.eclipse.triquetrum.workflow.repository.impl.filesystem.source_1.0.0.201602271915.jar
 
org.eclipse.triquetrum.workflow.repository.impl.filesystem_1.0.0.201602271915.jar
 
</pre>
 
may or may not be present.
 
  
 
==Setting up ICE==
 
==Setting up ICE==
Line 93: Line 19:
 
# Get the fork from <code>https://github.com/jayjaybillings/ice-triquetrum</code>
 
# Get the fork from <code>https://github.com/jayjaybillings/ice-triquetrum</code>
 
# Switch to the <code>next</code> branch and import all the projects.
 
# Switch to the <code>next</code> branch and import all the projects.
# Go to "org.eclipse.ice.target.mars" and :
+
# Go to "org.eclipse.ice.target.mars", open mars.target, let it resolve.
## In the mars.target Target Definition tab under the list of Locations, click on the location "file:/C:/temp/triquetrum/features-for-ice", then click on Edit
+
## In the mars.target pane, one of the Locations will be something like <code>file:/C:/temp/triquetrum/features-for-ice</code>Change this to the location of the <code>org.eclipse.ice.target.mars/triq-p2/</code> directory, for example @@file:/Users/cxh/git/ice-triquetrum/org.eclipse.ice.target.mars/triq-p2/@@ (FIXME: we should find a way to use variables or relative paths or something here).
## In the Edit window, click on Add and then Local, then browse to the Triquetrum Features exported aboveClick on Open, then OK.
+
## In the Edit Content window, under Names will appear "There are no categorized items".  The fix is to un-check "Group by Category", which will show all the Triquetrum features.  Click on Select All, there should be 6 in total. Check the checkbox to Include required software is on and then Finish.
+
### Note that if you exported the sources, then there will be three names, each duplicated.  Select all of the features. '''FIXME''': This is because we don't yet have the exported source features being shown with a different name.   [[File:TriquetrumIceTargetDefinitionPane.png|400px]]
+
## In the bottom right of the ICE Eclipse window a message about "Resolving Target Definition" will appear. Let the target resolve, this may take a long time. The Triquetrum entry should show between 77 and 81 plug-ins available.
+
### '''FIXME''': See above, Christopher had only 70 plugins and now has 77. This is probably ok as the demo works.   This FIXME could be removed.
+
### '''RETEST''': this should be ok after you've added the two missing triq bundles as described above? (which should result in some additional deps bundles in here as well to reach 81)
+
 
## In the mars.target pane, click on "Set as Target Platform".  The rebuild will occur. You may see errors about org.eclipse.eavp, which may be ignored.
 
## In the mars.target pane, click on "Set as Target Platform".  The rebuild will occur. You may see errors about org.eclipse.eavp, which may be ignored.
# Go to the "org.eclipse.ice.repository" project, right click on the the launch configuration (ice.*.launch) for your OS and select Run As -> Run Configuration (In the near future a multi-OS product definition will be made available as a launch tool.)
+
# Go to org.eclipse.ice.triquetrum, open the ice-triquetrum.product
## In the Run Configuration window: make the following changes:
+
## In Contents, leave the windows-related fragments and add the ones for your OS, if you're not on windows. Commit your additions and then we should gradually get a product file that supports all platforms... (FIXME : we should find a way to add the fragments for all OS-es in the product def from the start, but the ICE target seems to only set the ones for the current OS)
### For Windows, the Triquetrum bundles have already been added to the launch configuration.
+
## Double-check any required OS-specific settings in the Configuration and Launching tabs.
### If you are using Linux or Mac, click on the Plug-ins tab and add the following plug-ins:
+
## For these OS-dependent changes, you may consult the launch config for your platform in org.eclipse.ice.repository. Remark that launch configurations are less stable and difficult to compare between versions. Product files are in better formatted XML.  
#### org.eclipse.ice.triquetrum (1 plug-in)
+
## Click on the Validate button, which should report that there are no errors
#### diva (1 plugin)
+
## Click on "Launch an Eclipse Application".  
#### All ptolemy bundles (8 plug-ins, see below)
+
##### org.ptolemy.commons
+
##### ptolemy.actor.lib
+
##### ptolemy.actor.lib.gui
+
##### ptolemy.core
+
##### ptolemy.domains.process
+
##### ptolemy.domains.sdf
+
##### ptolemy.gui
+
##### ptolemy.moml
+
#### All triquetrum bundles (8 plug-ins, see below)
+
##### org.eclipse.triquetrum.common
+
##### org.eclipse.triquetrum.processing.api
+
##### org.eclipse.triquetrum.processing.model.impl.memory
+
##### org.eclipse.triquetrum.processing.services.impl
+
##### org.eclipse.triquetrum.validation.api
+
##### org.eclipse.triquetrum.workflow.actor.ui
+
##### org.eclipse.triquetrum.workflow.api
+
##### org.eclipse.triquetrum.workflow.execution.impl
+
##### org.eclipse.triquetrum.workflow.model
+
##### org.eclipse.triquetrum.workflow.ui
+
#### Following bundles should be set with "Auto-Start=true" in your launch configuration :
+
##### ptolemy.actor.lib
+
##### ptolemy.domains.process
+
##### ptolemy.domains.sdf
+
##### ptolemy.moml
+
##### org.eclipse.ice.triquetrum
+
##### org.eclipse.triquetrum.workflow.actor.ui
+
###### If the above is not present, then the problem is that org.eclipse.triquetrum.ptolemy.feature was not modified to include that plug-in.
+
##### org.eclipse.triquetrum.workflow.execution.impl
+
##### org.eclipse.triquetrum.workflow.repository.impl.filesystem
+
###### '''FIXME''': The above is still not present for Christopher, though the display works. This can probably be ignored
+
###### '''RETEST''': Should be fine after update of your Triq workspace with the missing bundles?
+
##### org.eclipse.triquetrum.workflow.ui
+
#### Below is a screenshot of the "triq" packages: [[File:TriquetrumICEProductPlugins.png|500px]]
+
#### Click on Validate Plug-ins, which should report that there are no errors
+
#### Click on the Run button.  If a dialog appears that mentions errors in eavp, then click on Proceed.
+
 
# ICE will start up.
 
# ICE will start up.
 
# Select a workspace
 
# Select a workspace
 
# Go to the ICE perspective and in the Item Viewer at the left create the Triquetrum Item by clicking on the green plus button. The Triquetrum Item is currently at the bottom of the list : TriquetrumWorkflowItemModel.
 
# Go to the ICE perspective and in the Item Viewer at the left create the Triquetrum Item by clicking on the green plus button. The Triquetrum Item is currently at the bottom of the list : TriquetrumWorkflowItemModel.
# You should get an ICE Item Form for trying Triquetrum workflows. For the moment this should show 2 dummy test flows called "hello" and "goodbye".
+
# You should get an ICE Item Form for trying Triquetrum workflows. For the moment this should show 3 test flows called "hello", "goodbye" and "reflectivity"
 
# Select one workflow and Save (Ctrl-S or similar depending on your OS). A minimal workflow configuration form should appear on the right in the Item form, with just one field. This is linked to a parameter in the test workflow model. You can specify a message in the field, that will be shown in a small Display shell when you run the workflow by clicking the Go! button.
 
# Select one workflow and Save (Ctrl-S or similar depending on your OS). A minimal workflow configuration form should appear on the right in the Item form, with just one field. This is linked to a parameter in the test workflow model. You can specify a message in the field, that will be shown in a small Display shell when you run the workflow by clicking the Go! button.
 +
# E.g. for reflectivity, the workflow reads an ICE reflectivity file and shows the RData plots for raw data and a smoothed version. You can play a bit with the smoothFactor (i.e. the nr of measures to produce a moving average) and run the workflow several times.
  
 
When all goes well, you should get a result similar to :
 
When all goes well, you should get a result similar to :
  
[[File:Triquetrum_in_ICE_screenshot.jpg|500px]]
+
[[File:ICE_Triqworkflow_RData_smoothing.JPG|500px]]
  
'''FIXME''': The Display window does not appear for Christopher.  The console in the ICE Eclipse says:
+
[[Category:Triquetrum]]
<pre>
+
19:23:46.401 [pool-2-thread-1] INFO  o.e.t.w.e.i.e.WorkflowExecutionTask - Context d93598ca-684e-441a-b20f-184595778460 - Execution finished of model hello
+
Error opening window for Display actor.
+
ptolemy.kernel.util.IllegalActionException: Cannot find effigy for top level ".hello".  This can happen when a is invoked with a non-graphical execution engine such as ptolemy.moml.MoMLSimpleApplication but the  ptolemy.moml.filter.RemoveGraphicalClasses MoML filter is not replacing the class that extends Display.
+
at ptolemy.actor.lib.gui.DisplayJavaSE$3.run(DisplayJavaSE.java:198)
+
at ptolemy.gui.Top._executeDeferredActions(Top.java:1531)
+
at ptolemy.gui.Top.access$9(Top.java:1515)
+
at ptolemy.gui.Top$DeferredActionsRunnable.run(Top.java:2059)
+
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
+
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
+
at java.awt.EventQueue.access$500(EventQueue.java:97)
+
at java.awt.EventQueue$3.run(EventQueue.java:709)
+
at java.awt.EventQueue$3.run(EventQueue.java:703)
+
at java.security.AccessController.doPrivileged(Native Method)
+
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
+
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
+
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
+
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
+
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
+
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
+
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
+
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
+
</pre>
+
'''RETEST''': Should be fine after update of your Triq workspace with the missing bundles?
+

Latest revision as of 13:24, 5 March 2016

Part of the Triquetrum Project is to interface with ICE. This page describes how to set up ICE and Triquetrum.

This work is very speculative and is for reference by Triquetrum developers. It probably won't be of much use for other people.

What is this about

Currently the focus is on enabling ICE to select and launch Triquetrum workflows. We're not yet going for a full integration of the workflow editor in ICE, but this would be the natural next step.

Setting up ICE

Below are instructions on how to set up the ICE application that will run Triquetrum workflows.

This is based on a fork of the main ICE repo.

This is very likely to change or otherwise not work in the future.

Jay prepared a skeleton for a org.eclipse.ice.triquetrum.model.TriquetrumWorkflowItemModel in a bundle org.eclipse.ice.triquetrum. This was done by using the ICE project generator. A more sustainable way would be to leverage upcoming changes to the ICE workflow engine which makes it possible to compose workflow engines.

  1. Create an empty workspace
  2. Get the fork from https://github.com/jayjaybillings/ice-triquetrum
  3. Switch to the next branch and import all the projects.
  4. Go to "org.eclipse.ice.target.mars", open mars.target, let it resolve.
    1. In the mars.target pane, one of the Locations will be something like file:/C:/temp/triquetrum/features-for-ice. Change this to the location of the org.eclipse.ice.target.mars/triq-p2/ directory, for example @@file:/Users/cxh/git/ice-triquetrum/org.eclipse.ice.target.mars/triq-p2/@@ (FIXME: we should find a way to use variables or relative paths or something here).
    2. In the mars.target pane, click on "Set as Target Platform". The rebuild will occur. You may see errors about org.eclipse.eavp, which may be ignored.
  5. Go to org.eclipse.ice.triquetrum, open the ice-triquetrum.product
    1. In Contents, leave the windows-related fragments and add the ones for your OS, if you're not on windows. Commit your additions and then we should gradually get a product file that supports all platforms... (FIXME : we should find a way to add the fragments for all OS-es in the product def from the start, but the ICE target seems to only set the ones for the current OS)
    2. Double-check any required OS-specific settings in the Configuration and Launching tabs.
    3. For these OS-dependent changes, you may consult the launch config for your platform in org.eclipse.ice.repository. Remark that launch configurations are less stable and difficult to compare between versions. Product files are in better formatted XML.
    4. Click on the Validate button, which should report that there are no errors
    5. Click on "Launch an Eclipse Application".
  6. ICE will start up.
  7. Select a workspace
  8. Go to the ICE perspective and in the Item Viewer at the left create the Triquetrum Item by clicking on the green plus button. The Triquetrum Item is currently at the bottom of the list : TriquetrumWorkflowItemModel.
  9. You should get an ICE Item Form for trying Triquetrum workflows. For the moment this should show 3 test flows called "hello", "goodbye" and "reflectivity"
  10. Select one workflow and Save (Ctrl-S or similar depending on your OS). A minimal workflow configuration form should appear on the right in the Item form, with just one field. This is linked to a parameter in the test workflow model. You can specify a message in the field, that will be shown in a small Display shell when you run the workflow by clicking the Go! button.
  11. E.g. for reflectivity, the workflow reads an ICE reflectivity file and shows the RData plots for raw data and a smoothed version. You can play a bit with the smoothFactor (i.e. the nr of measures to produce a moving average) and run the workflow several times.

When all goes well, you should get a result similar to :

ICE Triqworkflow RData smoothing.JPG

Back to the top