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"

m
(Note about updating the location of the triq-p2 repo.)
 
(12 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.
 
# 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.
 
  
 
==Setting up ICE==
 
==Setting up ICE==
Below are instructions on how to set up the ICE plugin that will run Triquetrum workflows.
+
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 based on a fork of the main ICE repo.
Line 39: 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.
## edit "mars.target", replacing the committed "Triq features for ICE" by the folder where you exported your Triquetrum features.
+
## 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).
## select the Triquetrum features in there (two times three for binaries and sources)
+
## 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.
## let the target resolve, this may take a long time
+
# Go to org.eclipse.ice.triquetrum, open the ice-triquetrum.product
## set "mars.target" as your target (unless you are doing this with ICE, which already has all of the required bundles set).
+
## 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)
# Go to the "org.eclipse.ice.repository" project and right-click and run the launch configuration product.* for your OS. If you are using Windows or Mac, you will need to add org.eclipse.ice.triquetrum to that configuration.
+
## Double-check any required OS-specific settings in the Configuration and Launching tabs.
# Go to the ICE perspective and in the ItemViewer 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 that appears with an ugly name at the moment.
+
## 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.  
 
+
## Click on the Validate button, which should report that there are no errors
==Telling ICE about the Triquetrum Features ==
+
## Click on "Launch an Eclipse Application".
The next step is to tell the ICE projects about the Triquetrum features.
+
# ICE will start up.
# Go to "org.eclipse.ice.target.mars" and click on "mars.target"
+
# Select a workspace
# 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
+
# 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.
# In the Edit window, click on Add and then Local, then browse to the Triquetrum Features exported above. Click on Open, then OK.
+
# 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"
# 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, and then Finish.
+
# 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.
# In the bottom right of the ICE Eclipse window a message about "Resolving Target Definition" will appear.
+
# 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.
# After a few minutes, the resolution will end.
+
# 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 and right-click and run the launch configuration product.* for your OS and select Run -> Run Configuration.
+
# In the Run Configurations window:
+
## Click on the Plug-ins tab and find the triquetrum features by typing "triquetrum" into the text entry widget at the top of the list of features. 
+
## Click on the check box next to each triquetrum feature
+
## Repeat the above two steps
+
### "diva"
+
### "ptolemy"
+
### "org.eclipse.emf.databinding"
+
### "org.eclipse.emf.ecp.edit.spi"
+
### "org.eclipse.graphiti.mm"
+
### "org.eclipse.emf.ecp.view.model.common.edit.provider"
+
## Click on Apply, then Run
+
# If the "Errors in Workspace" dialog pops up, click proceed.
+
 
+
'''FIXME:''' If I do the above, then I keep having to add packages.  If, in the Run Configurations window, Plug-ins tab, I click on "validate plug-ins automatically prior to launching", then there are lots of plugins that are not present.
+
 
+
== Problems ==
+
 
+
=== Missing Packages ===
+
During startup, the following messages appeared:
+
<pre>
+
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.triquetrum.workflow.editor [421]
+
  Unresolved requirement: Import-Package: org.eclipse.emf.databinding
+
 
+
at org.eclipse.osgi.container.Module.start(Module.java:434)
+
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
+
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
+
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
+
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
+
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
+
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
+
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
+
 
+
!ENTRY org.eclipse.triquetrum.workflow.model 4 0 2016-02-26 17:33:12.261
+
!MESSAGE FrameworkEvent ERROR
+
!STACK 0
+
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.triquetrum.workflow.model [424]
+
  Unresolved requirement: Import-Package: org.eclipse.graphiti.mm; version="0.12.1"
+
 
+
at org.eclipse.osgi.container.Module.start(Module.java:434)
+
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
+
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
+
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
+
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
+
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
+
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
+
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
+
 
+
!ENTRY org.eclipse.triquetrum.workflow.model.edit 4 0 2016-02-26 17:33:12.261
+
!MESSAGE FrameworkEvent ERROR
+
!STACK 0
+
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.triquetrum.workflow.model.edit [425]
+
  Unresolved requirement: Require-Bundle: org.eclipse.triquetrum.workflow.model; visibility:="reexport"
+
    -> Bundle-SymbolicName: org.eclipse.triquetrum.workflow.model; bundle-version="1.0.0.201602261637"; singleton:="true"
+
      org.eclipse.triquetrum.workflow.model [424]
+
        Unresolved requirement: Import-Package: org.eclipse.graphiti.mm; version="0.12.1"
+
  
at org.eclipse.osgi.container.Module.start(Module.java:434)
+
When all goes well, you should get a result similar to :
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
+
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
+
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
+
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
+
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
+
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
+
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
+
  
!ENTRY org.eclipse.triquetrum.workflow.model.editor 4 0 2016-02-26 17:33:12.262
+
[[File:ICE_Triqworkflow_RData_smoothing.JPG|500px]]
!MESSAGE FrameworkEvent ERROR
+
!STACK 0
+
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.triquetrum.workflow.model.editor [426]
+
  Unresolved requirement: Require-Bundle: org.eclipse.triquetrum.workflow.model.edit; visibility:="reexport"
+
    -> Bundle-SymbolicName: org.eclipse.triquetrum.workflow.model.edit; bundle-version="1.0.0.201602261637"; singleton:="true"
+
      org.eclipse.triquetrum.workflow.model.edit [425]
+
        Unresolved requirement: Require-Bundle: org.eclipse.triquetrum.workflow.model; visibility:="reexport"
+
          -> Bundle-SymbolicName: org.eclipse.triquetrum.workflow.model; bundle-version="1.0.0.201602261637"; singleton:="true"
+
              org.eclipse.triquetrum.workflow.model [424]
+
                Unresolved requirement: Import-Package: org.eclipse.graphiti.mm; version="0.12.1"
+
  
at org.eclipse.osgi.container.Module.start(Module.java:434)
+
[[Category:Triquetrum]]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
+
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
+
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
+
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
+
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
+
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
+
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
+
</pre>
+
I added those packages, but then there were more missing packages.
+

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