<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.vistrails.org//api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ctuttle</id>
	<title>VistrailsWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.vistrails.org//api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ctuttle"/>
	<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php/Special:Contributions/Ctuttle"/>
	<updated>2026-04-15T02:39:20Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.36.2</generator>
	<entry>
		<id>https://www.vistrails.org//index.php?title=Version_2&amp;diff=4148</id>
		<title>Version 2</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=Version_2&amp;diff=4148"/>
		<updated>2011-05-26T01:09:45Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* Claurissa's Notes V2.0 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is setup to address and track issues with the new VisTrails 2.0 construction.  Please add comments or new issues to this page.&lt;br /&gt;
&lt;br /&gt;
=== Juliana's notes about new interface ===&lt;br /&gt;
&lt;br /&gt;
* It seems there are too many windows when we start VisTrails. What about only showing the main window? And fire the spreadsheet and inspector only when 'needed'? for the inspector, when a vt is open and a wf is selected, and for the spreadsheet when a workflow is run.&lt;br /&gt;
** [DK] What do you mean by windows?   The tabbed windows or the fact that there is a builder window, &amp;quot;utility&amp;quot; window, and a spreadsheet window?&lt;br /&gt;
** [JF] The latter: 3 windows popup when I start VisTrais: the builder, the inspector and the spreadsheet.&amp;lt;br&amp;gt;&lt;br /&gt;
** [DK] Many of the windows in the &amp;quot;utility&amp;quot; window are not dependent on a workflow (for example, the console and messages tabs).  We could however, not display them until a user asks to see the given view. &lt;br /&gt;
** [JF] This is what I meant.&lt;br /&gt;
&lt;br /&gt;
* I noticed that the picture-in-picture disappeared. I think that is helpful to give context. At least when we are displaying a workflow, it is useful to see the version tree.&lt;br /&gt;
** [DK] I think it was too small to be useful.  I can see the argument for being able to see both, but I think we need more real estate than the PIP had; perhaps we allow the History View to be shown as a tab on the left or as a detached view? &lt;br /&gt;
** [JF] the only issue here is whether this will be too ''busy''&lt;br /&gt;
** [DK] It is, arguably, the same amount of business as the PIP, however.&lt;br /&gt;
** [CT] I often used the picture-in-picture to select a different version without having to change to the history view and then change back.  I miss it.  If it is detachable, the user can just put it where they want it, which makes this a question of where to put it by default and whether or not to allow it to be where it used to be (since detachable objects can not generally be placed there).  &lt;br /&gt;
** [DK] maybe the correct approach here is to allow views to be detatched?&lt;br /&gt;
** [CT] no.  they should always have the center.  perhaps a detachable PIP?  Meaning, it might be nice to have the history view by the pipeline view, but when you click the history button on top, you still want the history view to show up in the center panel.  I have some ideas, I'll share a few.  I'll still refer to the additional view as the PIP even if it is no longer a picture-in-picture.&lt;br /&gt;
*** leave the PIP where it was and make it easy to turn on/off (ie a shortcut key, button in the toolbar, or menu item).  optionally allow users to resize it.&lt;br /&gt;
*** Have a &amp;quot;combined&amp;quot; view button in the toolbar that switches to a view that has the PIP.  Then have a simple shortcut key to swap views (switch the larger with the smaller).&lt;br /&gt;
*** let the PIP come up in a new window, users can move or resize it.  it should be easy to toggle on/off (ie pressing the spacebar, etc.).  the issue here is having too many windows.  So, we could think of it as an extension to the existing window, meaning it should always stay on top of the main window (but it doesn't need to overlap it, it could be to the side).  For example, selecting the spreadsheet window would put it (the spreadsheet) on top.  Then, selecting the main window would give the main window the focus, but the PIP would still be on top of it.  Also, when I tab through all windows in VisTrails, the PIP would not get it's own tab, it would be considered part of the main window.  Then when people get tired of it, they can turn it off.&lt;br /&gt;
*** We could do a pseudo detach with the view, meaning the views stay where they are, but when you go to detach it, it comes up in its separate window.  Users are then free to put it where they want it.  I think we would want this detached view to show the history view when the pipeline view is selected, or the pipeline view when the history view is selected.&lt;br /&gt;
&lt;br /&gt;
* We need some indication of which workflow is being displayed. Somewhere, we should display the label that identifies the workflow&lt;br /&gt;
** [DK] In the v2.0 branch, the tab shows this.  I have it display &amp;quot;Pipeline: alias&amp;quot; or &amp;quot;Pipeline: ROOT + 3&amp;quot;. [JF] Ok.&lt;br /&gt;
** [ES] Dave, it doesn't show anymore. I remember seeing the tab before, but I've just checked out v2.0 and I can't see it either.&lt;br /&gt;
** [DK] Right, when there is only a single tab, I hide the tab bar.  You can see the titles when if you create a new view (Ctrl/Cmd+T)&lt;br /&gt;
&lt;br /&gt;
* When I click on the workflow tab (in the main window,lower left corner) it always shows an &amp;quot;untitled.vt&amp;quot;. This looks like a bug... And if I click on  untitled.vt, nothing happens.&lt;br /&gt;
** [DK] Yes, Emanuele mentioned this at the meeting.  I'm also not happy with the current interface.&lt;br /&gt;
&lt;br /&gt;
=== Dave's List ===&lt;br /&gt;
&lt;br /&gt;
* Reduce size of palette names so they don't take so much space&lt;br /&gt;
&lt;br /&gt;
* Set default palettes for diff, other views&lt;br /&gt;
&lt;br /&gt;
* Diff currently being shown as a pipeline.  Should we create a mode for this&lt;br /&gt;
&lt;br /&gt;
* Buttons in Messages window look bad on the Mac, don't need all of them now as well, I think&lt;br /&gt;
&lt;br /&gt;
* Missing callbacks for Merge and Control Flow Assistant menu items&lt;br /&gt;
&lt;br /&gt;
* Move execute button so it doesn't look like a mode&lt;br /&gt;
&lt;br /&gt;
* Aliases support for parameters.&lt;br /&gt;
** [DK] I really want to see old-style aliases finally go away with the globals for workflow and vistrails taking their place, but we can add them for now.&lt;br /&gt;
** [ES] I just added them in v2.0 branch.&lt;br /&gt;
&lt;br /&gt;
* How do we support functions that have no parameters in the new port configuration?&lt;br /&gt;
&lt;br /&gt;
* Do we need to worry about parameters with default values that won't be saved?  For example, a Boolean that we want set to False will not show as a set parameter currently because that is the default.  Same for an empty string...&lt;br /&gt;
** [DK] mimic 1.6 and create the function immediately?&lt;br /&gt;
&lt;br /&gt;
=== Claurissa's Notes V2.0===&lt;br /&gt;
&lt;br /&gt;
* It is unclear to me how to get group and subworkflow options enabled.  If I start VisTrails, open a file, and then try to group some of its modules, the options remain disabled.  However, if I create a pipeline on the untitled workspace, group and subworkflow are enabled, and then I can open the other file and the options remain enabled.&lt;br /&gt;
&lt;br /&gt;
* In the Module Configuration window, I can click on the check boxes, but it makes me save after each one and doesn't update the builder window.  Configuring ports to be visible works on the Module Information tab.  &lt;br /&gt;
&lt;br /&gt;
* Parameter Exploration doesn't work.  When I hit the execute button, nothing seems to happen.&lt;br /&gt;
&lt;br /&gt;
* Search doesn't work either.  If I double click execute, I need to force quit Vistrails.  If I press it only once, nothing seems to happen.  If I type something into the box rather than creating a visual query, it does display a tree, but nothing is highlighted.&lt;br /&gt;
&lt;br /&gt;
* When you detach and close a tab from the Configure/Console/Documentation/Latex/Messages/etc. window, there is no way to get it back without restarting VisTrails.&lt;br /&gt;
&lt;br /&gt;
* Is there a way to collapse all lists in the modules tab?  That would be nice to have.&lt;br /&gt;
&lt;br /&gt;
* The save file option is disabled even after I make a change.  I can only select save as, or save on exit (on either the v2.0 or mashup branches).  An asterisk does appear next to the filename in the window title on the mashups branch, but not the v2.0 branch.  &lt;br /&gt;
&lt;br /&gt;
* Changing between files using the workspace tab doesn't work on the 2.0 branch (but does on mashups).&lt;br /&gt;
&lt;br /&gt;
* The Provenance browser doesn't contain newly executed workflows unless I exit VisTrails and restart (it doesn't update).  Perhaps that is because I can't save the file???&lt;br /&gt;
&lt;br /&gt;
* Are the objects that appear in the bottom half of the workspace tab associated with execution provenance?  It is not clear to me what they are for.  It seems a new one appears after I save a new file and stays there permanently.  Clicking on them doesn't seem to do much.  Are they just for information?&lt;br /&gt;
&lt;br /&gt;
=== Juliana's notes about the mashup functionality ===&lt;br /&gt;
* Since it is not possible to create aliases with the current 2.0, I used 1.6 to create aliases for brain.vt. But when I loaded brain.vt into the 2.0 version and selected the mashup inspector, no aliases were shown [JF] My bad: it works!&lt;br /&gt;
&lt;br /&gt;
* When I save a mashup, where is it saved? Should it be displayed under the &amp;quot;List&amp;quot; tab in the mashup inspector?&lt;br /&gt;
** [ES] The mashups are saved when you save the vistrail. When you tag a mashup it is added to the list.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;I changed a tag for a mashup, and clicked &amp;quot;save&amp;quot;. But the new tag was not displayed in the &amp;quot;List&amp;quot;.&amp;lt;/del&amp;gt;&lt;br /&gt;
** [ES] There was a problem with the signals that were not being caught. You don't have to save. Just changing a tag should put it in the list.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;In the &amp;quot;List&amp;quot;, will I be able to select a previously created mashup and change it?&amp;lt;/del&amp;gt;&lt;br /&gt;
** [ES] Yes, this is working in the current mashups branch&lt;br /&gt;
 &lt;br /&gt;
* What is the difference between the &amp;quot;Save&amp;quot; and the &amp;quot;Update&amp;quot;? &lt;br /&gt;
** [ES] In the mashup preview tab, pressing &amp;quot;Update&amp;quot; will run the pipeline with the values filled in the gui. It doesn't change anything in the mashup. I am still not sure what to do with the &amp;quot;save&amp;quot; button. I just wanted a button where the user could tell that he wants that mashup to be in the list, but for that he can just tag the mashup on inspector. What do you think?&lt;br /&gt;
** [JF] From the interface, it is not clear that by just changing the tag, the mashup will be saved. Maybe, when the user hits save, if a tag has not been entered (i.e., the default tag is being used), we could prompt the user to enter a tag name? Also, while editing the mashup using the inspector, it might be better to have the name of the workflow on the top, don't you think? (and the mashup tag right below).&lt;br /&gt;
&lt;br /&gt;
* [JF] Should we have a special widget for entering file names?&lt;br /&gt;
* [JF] How do I view the actual mashup interface? And how to I execute the mashup on my laptop?&lt;br /&gt;
&lt;br /&gt;
* I made some changes to the &amp;quot;Alias Details&amp;quot; and then clicked on &amp;quot;Save&amp;quot; and then &amp;quot;Preview&amp;quot;, nothing happened. After I clicked on these two buttons a few times, the workflow executed, but the actual mashup preview was not displayed.&lt;br /&gt;
** [ES] I am working on fixing this now.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;It would be nice if it were possible to center and resize the workflow to fit in the window (cmd-shift-R)&amp;lt;/del&amp;gt;&lt;br /&gt;
** [ES] This is supported in the current mashups branch (I haven't built a new binary yet)&lt;br /&gt;
&lt;br /&gt;
===More Mashups Comments===&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=Version_2&amp;diff=4147</id>
		<title>Version 2</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=Version_2&amp;diff=4147"/>
		<updated>2011-05-25T17:40:20Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* Claurissa's Notes V2.0 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is setup to address and track issues with the new VisTrails 2.0 construction.  Please add comments or new issues to this page.&lt;br /&gt;
&lt;br /&gt;
=== Juliana's notes about new interface ===&lt;br /&gt;
&lt;br /&gt;
* It seems there are too many windows when we start VisTrails. What about only showing the main window? And fire the spreadsheet and inspector only when 'needed'? for the inspector, when a vt is open and a wf is selected, and for the spreadsheet when a workflow is run.&lt;br /&gt;
** [DK] What do you mean by windows?   The tabbed windows or the fact that there is a builder window, &amp;quot;utility&amp;quot; window, and a spreadsheet window?&lt;br /&gt;
** [JF] The latter: 3 windows popup when I start VisTrais: the builder, the inspector and the spreadsheet.&amp;lt;br&amp;gt;&lt;br /&gt;
** [DK] Many of the windows in the &amp;quot;utility&amp;quot; window are not dependent on a workflow (for example, the console and messages tabs).  We could however, not display them until a user asks to see the given view. &lt;br /&gt;
** [JF] This is what I meant.&lt;br /&gt;
&lt;br /&gt;
* I noticed that the picture-in-picture disappeared. I think that is helpful to give context. At least when we are displaying a workflow, it is useful to see the version tree.&lt;br /&gt;
** [DK] I think it was too small to be useful.  I can see the argument for being able to see both, but I think we need more real estate than the PIP had; perhaps we allow the History View to be shown as a tab on the left or as a detached view? &lt;br /&gt;
** [JF] the only issue here is whether this will be too ''busy''&lt;br /&gt;
** [DK] It is, arguably, the same amount of business as the PIP, however.&lt;br /&gt;
** [CT] I often used the picture-in-picture to select a different version without having to change to the history view and then change back.  I miss it.  If it is detachable, the user can just put it where they want it, which makes this a question of where to put it by default and whether or not to allow it to be where it used to be (since detachable objects can not generally be placed there).  &lt;br /&gt;
** [DK] maybe the correct approach here is to allow views to be detatched?&lt;br /&gt;
** [CT] no.  they should always have the center.  perhaps a detachable PIP?  Meaning, it might be nice to have the history view by the pipeline view, but when you click the history button on top, you still want the history view to show up in the center panel.  I have some ideas, I'll share a few.  I'll still refer to the additional view as the PIP even if it is no longer a picture-in-picture.&lt;br /&gt;
*** leave the PIP where it was and make it easy to turn on/off (ie a shortcut key, button in the toolbar, or menu item).  optionally allow users to resize it.&lt;br /&gt;
*** Have a &amp;quot;combined&amp;quot; view button in the toolbar that switches to a view that has the PIP.  Then have a simple shortcut key to swap views (switch the larger with the smaller).&lt;br /&gt;
*** let the PIP come up in a new window, users can move or resize it.  it should be easy to toggle on/off (ie pressing the spacebar, etc.).  the issue here is having too many windows.  So, we could think of it as an extension to the existing window, meaning it should always stay on top of the main window (but it doesn't need to overlap it, it could be to the side).  For example, selecting the spreadsheet window would put it (the spreadsheet) on top.  Then, selecting the main window would give the main window the focus, but the PIP would still be on top of it.  Also, when I tab through all windows in VisTrails, the PIP would not get it's own tab, it would be considered part of the main window.  Then when people get tired of it, they can turn it off.&lt;br /&gt;
*** We could do a pseudo detach with the view, meaning the views stay where they are, but when you go to detach it, it comes up in its separate window.  Users are then free to put it where they want it.  I think we would want this detached view to show the history view when the pipeline view is selected, or the pipeline view when the history view is selected.&lt;br /&gt;
&lt;br /&gt;
* We need some indication of which workflow is being displayed. Somewhere, we should display the label that identifies the workflow&lt;br /&gt;
** [DK] In the v2.0 branch, the tab shows this.  I have it display &amp;quot;Pipeline: alias&amp;quot; or &amp;quot;Pipeline: ROOT + 3&amp;quot;. [JF] Ok.&lt;br /&gt;
** [ES] Dave, it doesn't show anymore. I remember seeing the tab before, but I've just checked out v2.0 and I can't see it either.&lt;br /&gt;
** [DK] Right, when there is only a single tab, I hide the tab bar.  You can see the titles when if you create a new view (Ctrl/Cmd+T)&lt;br /&gt;
&lt;br /&gt;
* When I click on the workflow tab (in the main window,lower left corner) it always shows an &amp;quot;untitled.vt&amp;quot;. This looks like a bug... And if I click on  untitled.vt, nothing happens.&lt;br /&gt;
** [DK] Yes, Emanuele mentioned this at the meeting.  I'm also not happy with the current interface.&lt;br /&gt;
&lt;br /&gt;
=== Dave's List ===&lt;br /&gt;
&lt;br /&gt;
* Reduce size of palette names so they don't take so much space&lt;br /&gt;
&lt;br /&gt;
* Set default palettes for diff, other views&lt;br /&gt;
&lt;br /&gt;
* Diff currently being shown as a pipeline.  Should we create a mode for this&lt;br /&gt;
&lt;br /&gt;
* Buttons in Messages window look bad on the Mac, don't need all of them now as well, I think&lt;br /&gt;
&lt;br /&gt;
* Missing callbacks for Merge and Control Flow Assistant menu items&lt;br /&gt;
&lt;br /&gt;
* Move execute button so it doesn't look like a mode&lt;br /&gt;
&lt;br /&gt;
* Aliases support for parameters.&lt;br /&gt;
** [DK] I really want to see old-style aliases finally go away with the globals for workflow and vistrails taking their place, but we can add them for now.&lt;br /&gt;
** [ES] I just added them in v2.0 branch.&lt;br /&gt;
&lt;br /&gt;
* How do we support functions that have no parameters in the new port configuration?&lt;br /&gt;
&lt;br /&gt;
* Do we need to worry about parameters with default values that won't be saved?  For example, a Boolean that we want set to False will not show as a set parameter currently because that is the default.  Same for an empty string...&lt;br /&gt;
** [DK] mimic 1.6 and create the function immediately?&lt;br /&gt;
&lt;br /&gt;
=== Claurissa's Notes V2.0===&lt;br /&gt;
&lt;br /&gt;
* In the Module Configuration window, I can click on the check boxes, but it makes me save after each one and doesn't update the builder window.  Configuring ports to be visible works on the Module Information tab.  &lt;br /&gt;
&lt;br /&gt;
* Parameter Exploration doesn't work.  When I hit the execute button, nothing seems to happen.&lt;br /&gt;
&lt;br /&gt;
* Search doesn't work either.  If I double click execute, I need to force quit Vistrails.  If I press it only once, nothing seems to happen.  If I type something into the box rather than creating a visual query, it does display a tree, but nothing is highlighted.&lt;br /&gt;
&lt;br /&gt;
* When you detach and close a tab from the Configure/Console/Documentation/Latex/Messages/etc. window, there is no way to get it back without restarting VisTrails.&lt;br /&gt;
&lt;br /&gt;
* Is there a way to collapse all lists in the modules tab?  That would be nice to have.&lt;br /&gt;
&lt;br /&gt;
* The save file option is disabled even after I make a change.  I can only select save as, or save on exit (on either the v2.0 or mashup branches).  An asterisk does appear next to the filename in the window title on the mashups branch, but not the v2.0 branch.  &lt;br /&gt;
&lt;br /&gt;
* Changing between files using the workspace tab doesn't work on the 2.0 branch (but does on mashups).&lt;br /&gt;
&lt;br /&gt;
* The Provenance browser doesn't contain newly executed workflows unless I exit VisTrails and restart (it doesn't update).  Perhaps that is because I can't save the file???&lt;br /&gt;
&lt;br /&gt;
* Are the objects that appear in the bottom half of the workspace tab associated with execution provenance?  It is not clear to me what they are for.  It seems a new one appears after I save a new file and stays there permanently.  Clicking on them doesn't seem to do much.  Are they just for information?&lt;br /&gt;
&lt;br /&gt;
=== Juliana's notes about the mashup functionality ===&lt;br /&gt;
* Since it is not possible to create aliases with the current 2.0, I used 1.6 to create aliases for brain.vt. But when I loaded brain.vt into the 2.0 version and selected the mashup inspector, no aliases were shown [JF] My bad: it works!&lt;br /&gt;
&lt;br /&gt;
* When I save a mashup, where is it saved? Should it be displayed under the &amp;quot;List&amp;quot; tab in the mashup inspector?&lt;br /&gt;
** [ES] The mashups are saved when you save the vistrail. When you tag a mashup it is added to the list.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;I changed a tag for a mashup, and clicked &amp;quot;save&amp;quot;. But the new tag was not displayed in the &amp;quot;List&amp;quot;.&amp;lt;/del&amp;gt;&lt;br /&gt;
** [ES] There was a problem with the signals that were not being caught. You don't have to save. Just changing a tag should put it in the list.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;In the &amp;quot;List&amp;quot;, will I be able to select a previously created mashup and change it?&amp;lt;/del&amp;gt;&lt;br /&gt;
** [ES] Yes, this is working in the current mashups branch&lt;br /&gt;
 &lt;br /&gt;
* What is the difference between the &amp;quot;Save&amp;quot; and the &amp;quot;Update&amp;quot;? &lt;br /&gt;
** [ES] In the mashup preview tab, pressing &amp;quot;Update&amp;quot; will run the pipeline with the values filled in the gui. It doesn't change anything in the mashup. I am still not sure what to do with the &amp;quot;save&amp;quot; button. I just wanted a button where the user could tell that he wants that mashup to be in the list, but for that he can just tag the mashup on inspector. What do you think?&lt;br /&gt;
** [JF] From the interface, it is not clear that by just changing the tag, the mashup will be saved. Maybe, when the user hits save, if a tag has not been entered (i.e., the default tag is being used), we could prompt the user to enter a tag name? Also, while editing the mashup using the inspector, it might be better to have the name of the workflow on the top, don't you think? (and the mashup tag right below).&lt;br /&gt;
&lt;br /&gt;
* [JF] Should we have a special widget for entering file names?&lt;br /&gt;
* [JF] How do I view the actual mashup interface? And how to I execute the mashup on my laptop?&lt;br /&gt;
&lt;br /&gt;
* I made some changes to the &amp;quot;Alias Details&amp;quot; and then clicked on &amp;quot;Save&amp;quot; and then &amp;quot;Preview&amp;quot;, nothing happened. After I clicked on these two buttons a few times, the workflow executed, but the actual mashup preview was not displayed.&lt;br /&gt;
** [ES] I am working on fixing this now.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;It would be nice if it were possible to center and resize the workflow to fit in the window (cmd-shift-R)&amp;lt;/del&amp;gt;&lt;br /&gt;
** [ES] This is supported in the current mashups branch (I haven't built a new binary yet)&lt;br /&gt;
&lt;br /&gt;
===More Mashups Comments===&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=Version_2&amp;diff=4146</id>
		<title>Version 2</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=Version_2&amp;diff=4146"/>
		<updated>2011-05-25T03:29:55Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* More Mashups Comments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is setup to address and track issues with the new VisTrails 2.0 construction.  Please add comments or new issues to this page.&lt;br /&gt;
&lt;br /&gt;
=== Juliana's notes about new interface ===&lt;br /&gt;
&lt;br /&gt;
* It seems there are too many windows when we start VisTrails. What about only showing the main window? And fire the spreadsheet and inspector only when 'needed'? for the inspector, when a vt is open and a wf is selected, and for the spreadsheet when a workflow is run.&lt;br /&gt;
** [DK] What do you mean by windows?   The tabbed windows or the fact that there is a builder window, &amp;quot;utility&amp;quot; window, and a spreadsheet window?&lt;br /&gt;
** [JF] The latter: 3 windows popup when I start VisTrais: the builder, the inspector and the spreadsheet.&amp;lt;br&amp;gt;&lt;br /&gt;
** [DK] Many of the windows in the &amp;quot;utility&amp;quot; window are not dependent on a workflow (for example, the console and messages tabs).  We could however, not display them until a user asks to see the given view. &lt;br /&gt;
** [JF] This is what I meant.&lt;br /&gt;
&lt;br /&gt;
* I noticed that the picture-in-picture disappeared. I think that is helpful to give context. At least when we are displaying a workflow, it is useful to see the version tree.&lt;br /&gt;
** [DK] I think it was too small to be useful.  I can see the argument for being able to see both, but I think we need more real estate than the PIP had; perhaps we allow the History View to be shown as a tab on the left or as a detached view? &lt;br /&gt;
** [JF] the only issue here is whether this will be too ''busy''&lt;br /&gt;
** [DK] It is, arguably, the same amount of business as the PIP, however.&lt;br /&gt;
** [CT] I often used the picture-in-picture to select a different version without having to change to the history view and then change back.  I miss it.  If it is detachable, the user can just put it where they want it, which makes this a question of where to put it by default and whether or not to allow it to be where it used to be (since detachable objects can not generally be placed there).  &lt;br /&gt;
** [DK] maybe the correct approach here is to allow views to be detatched?&lt;br /&gt;
** [CT] no.  they should always have the center.  perhaps a detachable PIP?  Meaning, it might be nice to have the history view by the pipeline view, but when you click the history button on top, you still want the history view to show up in the center panel.  I have some ideas, I'll share a few.  I'll still refer to the additional view as the PIP even if it is no longer a picture-in-picture.&lt;br /&gt;
*** leave the PIP where it was and make it easy to turn on/off (ie a shortcut key, button in the toolbar, or menu item).  optionally allow users to resize it.&lt;br /&gt;
*** Have a &amp;quot;combined&amp;quot; view button in the toolbar that switches to a view that has the PIP.  Then have a simple shortcut key to swap views (switch the larger with the smaller).&lt;br /&gt;
*** let the PIP come up in a new window, users can move or resize it.  it should be easy to toggle on/off (ie pressing the spacebar, etc.).  the issue here is having too many windows.  So, we could think of it as an extension to the existing window, meaning it should always stay on top of the main window (but it doesn't need to overlap it, it could be to the side).  For example, selecting the spreadsheet window would put it (the spreadsheet) on top.  Then, selecting the main window would give the main window the focus, but the PIP would still be on top of it.  Also, when I tab through all windows in VisTrails, the PIP would not get it's own tab, it would be considered part of the main window.  Then when people get tired of it, they can turn it off.&lt;br /&gt;
*** We could do a pseudo detach with the view, meaning the views stay where they are, but when you go to detach it, it comes up in its separate window.  Users are then free to put it where they want it.  I think we would want this detached view to show the history view when the pipeline view is selected, or the pipeline view when the history view is selected.&lt;br /&gt;
&lt;br /&gt;
* We need some indication of which workflow is being displayed. Somewhere, we should display the label that identifies the workflow&lt;br /&gt;
** [DK] In the v2.0 branch, the tab shows this.  I have it display &amp;quot;Pipeline: alias&amp;quot; or &amp;quot;Pipeline: ROOT + 3&amp;quot;. [JF] Ok.&lt;br /&gt;
** [ES] Dave, it doesn't show anymore. I remember seeing the tab before, but I've just checked out v2.0 and I can't see it either.&lt;br /&gt;
** [DK] Right, when there is only a single tab, I hide the tab bar.  You can see the titles when if you create a new view (Ctrl/Cmd+T)&lt;br /&gt;
&lt;br /&gt;
* When I click on the workflow tab (in the main window,lower left corner) it always shows an &amp;quot;untitled.vt&amp;quot;. This looks like a bug... And if I click on  untitled.vt, nothing happens.&lt;br /&gt;
** [DK] Yes, Emanuele mentioned this at the meeting.  I'm also not happy with the current interface.&lt;br /&gt;
&lt;br /&gt;
=== Dave's List ===&lt;br /&gt;
&lt;br /&gt;
* Reduce size of palette names so they don't take so much space&lt;br /&gt;
&lt;br /&gt;
* Set default palettes for diff, other views&lt;br /&gt;
&lt;br /&gt;
* Diff currently being shown as a pipeline.  Should we create a mode for this&lt;br /&gt;
&lt;br /&gt;
* Buttons in Messages window look bad on the Mac, don't need all of them now as well, I think&lt;br /&gt;
&lt;br /&gt;
* Missing callbacks for Merge and Control Flow Assistant menu items&lt;br /&gt;
&lt;br /&gt;
* Move execute button so it doesn't look like a mode&lt;br /&gt;
&lt;br /&gt;
* Aliases support for parameters.&lt;br /&gt;
** [DK] I really want to see old-style aliases finally go away with the globals for workflow and vistrails taking their place, but we can add them for now.&lt;br /&gt;
** [ES] I just added them in v2.0 branch.&lt;br /&gt;
&lt;br /&gt;
* How do we support functions that have no parameters in the new port configuration?&lt;br /&gt;
&lt;br /&gt;
* Do we need to worry about parameters with default values that won't be saved?  For example, a Boolean that we want set to False will not show as a set parameter currently because that is the default.  Same for an empty string...&lt;br /&gt;
** [DK] mimic 1.6 and create the function immediately?&lt;br /&gt;
&lt;br /&gt;
=== Claurissa's Notes V2.0===&lt;br /&gt;
&lt;br /&gt;
* Parameter Exploration doesn't work.  When I hit the execute button, nothing seems to happen.&lt;br /&gt;
&lt;br /&gt;
* Search doesn't work either.  If I double click execute, I need to force quit Vistrails.  If I press it only once, nothing seems to happen.  If I type something into the box rather than creating a visual query, it does display a tree, but nothing is highlighted.&lt;br /&gt;
&lt;br /&gt;
* When you detach and close a tab from the Configure/Console/Documentation/Latex/Messages/etc. window, there is no way to get it back without restarting VisTrails.&lt;br /&gt;
&lt;br /&gt;
* Is there a way to collapse all lists in the modules tab?  That would be nice to have.&lt;br /&gt;
&lt;br /&gt;
* The save file option is disabled even after I make a change.  I can only select save as, or save on exit (on either the v2.0 or mashup branches).  An asterisk does appear next to the filename in the window title on the mashups branch, but not the v2.0 branch.  &lt;br /&gt;
&lt;br /&gt;
* Changing between files using the workspace tab doesn't work on the 2.0 branch (but does on mashups).&lt;br /&gt;
&lt;br /&gt;
* The Provenance browser doesn't contain newly executed workflows unless I exit VisTrails and restart (it doesn't update).  Perhaps that is because I can't save the file???&lt;br /&gt;
&lt;br /&gt;
* Are the objects that appear in the bottom half of the workspace tab associated with execution provenance?  It is not clear to me what they are for.  It seems a new one appears after I save a new file and stays there permanently.  Clicking on them doesn't seem to do much.  Are they just for information?&lt;br /&gt;
&lt;br /&gt;
=== Juliana's notes about the mashup functionality ===&lt;br /&gt;
* Since it is not possible to create aliases with the current 2.0, I used 1.6 to create aliases for brain.vt. But when I loaded brain.vt into the 2.0 version and selected the mashup inspector, no aliases were shown [JF] My bad: it works!&lt;br /&gt;
&lt;br /&gt;
* When I save a mashup, where is it saved? Should it be displayed under the &amp;quot;List&amp;quot; tab in the mashup inspector?&lt;br /&gt;
** [ES] The mashups are saved when you save the vistrail. When you tag a mashup it is added to the list.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;I changed a tag for a mashup, and clicked &amp;quot;save&amp;quot;. But the new tag was not displayed in the &amp;quot;List&amp;quot;.&amp;lt;/del&amp;gt;&lt;br /&gt;
** [ES] There was a problem with the signals that were not being caught. You don't have to save. Just changing a tag should put it in the list.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;In the &amp;quot;List&amp;quot;, will I be able to select a previously created mashup and change it?&amp;lt;/del&amp;gt;&lt;br /&gt;
** [ES] Yes, this is working in the current mashups branch&lt;br /&gt;
 &lt;br /&gt;
* What is the difference between the &amp;quot;Save&amp;quot; and the &amp;quot;Update&amp;quot;? &lt;br /&gt;
** [ES] In the mashup preview tab, pressing &amp;quot;Update&amp;quot; will run the pipeline with the values filled in the gui. It doesn't change anything in the mashup. I am still not sure what to do with the &amp;quot;save&amp;quot; button. I just wanted a button where the user could tell that he wants that mashup to be in the list, but for that he can just tag the mashup on inspector. What do you think?&lt;br /&gt;
** [JF] From the interface, it is not clear that by just changing the tag, the mashup will be saved. Maybe, when the user hits save, if a tag has not been entered (i.e., the default tag is being used), we could prompt the user to enter a tag name? Also, while editing the mashup using the inspector, it might be better to have the name of the workflow on the top, don't you think? (and the mashup tag right below).&lt;br /&gt;
&lt;br /&gt;
* [JF] Should we have a special widget for entering file names?&lt;br /&gt;
* [JF] How do I view the actual mashup interface? And how to I execute the mashup on my laptop?&lt;br /&gt;
&lt;br /&gt;
* I made some changes to the &amp;quot;Alias Details&amp;quot; and then clicked on &amp;quot;Save&amp;quot; and then &amp;quot;Preview&amp;quot;, nothing happened. After I clicked on these two buttons a few times, the workflow executed, but the actual mashup preview was not displayed.&lt;br /&gt;
** [ES] I am working on fixing this now.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;It would be nice if it were possible to center and resize the workflow to fit in the window (cmd-shift-R)&amp;lt;/del&amp;gt;&lt;br /&gt;
** [ES] This is supported in the current mashups branch (I haven't built a new binary yet)&lt;br /&gt;
&lt;br /&gt;
===More Mashups Comments===&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=Version_2&amp;diff=4145</id>
		<title>Version 2</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=Version_2&amp;diff=4145"/>
		<updated>2011-05-25T03:27:34Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is setup to address and track issues with the new VisTrails 2.0 construction.  Please add comments or new issues to this page.&lt;br /&gt;
&lt;br /&gt;
=== Juliana's notes about new interface ===&lt;br /&gt;
&lt;br /&gt;
* It seems there are too many windows when we start VisTrails. What about only showing the main window? And fire the spreadsheet and inspector only when 'needed'? for the inspector, when a vt is open and a wf is selected, and for the spreadsheet when a workflow is run.&lt;br /&gt;
** [DK] What do you mean by windows?   The tabbed windows or the fact that there is a builder window, &amp;quot;utility&amp;quot; window, and a spreadsheet window?&lt;br /&gt;
** [JF] The latter: 3 windows popup when I start VisTrais: the builder, the inspector and the spreadsheet.&amp;lt;br&amp;gt;&lt;br /&gt;
** [DK] Many of the windows in the &amp;quot;utility&amp;quot; window are not dependent on a workflow (for example, the console and messages tabs).  We could however, not display them until a user asks to see the given view. &lt;br /&gt;
** [JF] This is what I meant.&lt;br /&gt;
&lt;br /&gt;
* I noticed that the picture-in-picture disappeared. I think that is helpful to give context. At least when we are displaying a workflow, it is useful to see the version tree.&lt;br /&gt;
** [DK] I think it was too small to be useful.  I can see the argument for being able to see both, but I think we need more real estate than the PIP had; perhaps we allow the History View to be shown as a tab on the left or as a detached view? &lt;br /&gt;
** [JF] the only issue here is whether this will be too ''busy''&lt;br /&gt;
** [DK] It is, arguably, the same amount of business as the PIP, however.&lt;br /&gt;
** [CT] I often used the picture-in-picture to select a different version without having to change to the history view and then change back.  I miss it.  If it is detachable, the user can just put it where they want it, which makes this a question of where to put it by default and whether or not to allow it to be where it used to be (since detachable objects can not generally be placed there).  &lt;br /&gt;
** [DK] maybe the correct approach here is to allow views to be detatched?&lt;br /&gt;
** [CT] no.  they should always have the center.  perhaps a detachable PIP?  Meaning, it might be nice to have the history view by the pipeline view, but when you click the history button on top, you still want the history view to show up in the center panel.  I have some ideas, I'll share a few.  I'll still refer to the additional view as the PIP even if it is no longer a picture-in-picture.&lt;br /&gt;
*** leave the PIP where it was and make it easy to turn on/off (ie a shortcut key, button in the toolbar, or menu item).  optionally allow users to resize it.&lt;br /&gt;
*** Have a &amp;quot;combined&amp;quot; view button in the toolbar that switches to a view that has the PIP.  Then have a simple shortcut key to swap views (switch the larger with the smaller).&lt;br /&gt;
*** let the PIP come up in a new window, users can move or resize it.  it should be easy to toggle on/off (ie pressing the spacebar, etc.).  the issue here is having too many windows.  So, we could think of it as an extension to the existing window, meaning it should always stay on top of the main window (but it doesn't need to overlap it, it could be to the side).  For example, selecting the spreadsheet window would put it (the spreadsheet) on top.  Then, selecting the main window would give the main window the focus, but the PIP would still be on top of it.  Also, when I tab through all windows in VisTrails, the PIP would not get it's own tab, it would be considered part of the main window.  Then when people get tired of it, they can turn it off.&lt;br /&gt;
*** We could do a pseudo detach with the view, meaning the views stay where they are, but when you go to detach it, it comes up in its separate window.  Users are then free to put it where they want it.  I think we would want this detached view to show the history view when the pipeline view is selected, or the pipeline view when the history view is selected.&lt;br /&gt;
&lt;br /&gt;
* We need some indication of which workflow is being displayed. Somewhere, we should display the label that identifies the workflow&lt;br /&gt;
** [DK] In the v2.0 branch, the tab shows this.  I have it display &amp;quot;Pipeline: alias&amp;quot; or &amp;quot;Pipeline: ROOT + 3&amp;quot;. [JF] Ok.&lt;br /&gt;
** [ES] Dave, it doesn't show anymore. I remember seeing the tab before, but I've just checked out v2.0 and I can't see it either.&lt;br /&gt;
** [DK] Right, when there is only a single tab, I hide the tab bar.  You can see the titles when if you create a new view (Ctrl/Cmd+T)&lt;br /&gt;
&lt;br /&gt;
* When I click on the workflow tab (in the main window,lower left corner) it always shows an &amp;quot;untitled.vt&amp;quot;. This looks like a bug... And if I click on  untitled.vt, nothing happens.&lt;br /&gt;
** [DK] Yes, Emanuele mentioned this at the meeting.  I'm also not happy with the current interface.&lt;br /&gt;
&lt;br /&gt;
=== Dave's List ===&lt;br /&gt;
&lt;br /&gt;
* Reduce size of palette names so they don't take so much space&lt;br /&gt;
&lt;br /&gt;
* Set default palettes for diff, other views&lt;br /&gt;
&lt;br /&gt;
* Diff currently being shown as a pipeline.  Should we create a mode for this&lt;br /&gt;
&lt;br /&gt;
* Buttons in Messages window look bad on the Mac, don't need all of them now as well, I think&lt;br /&gt;
&lt;br /&gt;
* Missing callbacks for Merge and Control Flow Assistant menu items&lt;br /&gt;
&lt;br /&gt;
* Move execute button so it doesn't look like a mode&lt;br /&gt;
&lt;br /&gt;
* Aliases support for parameters.&lt;br /&gt;
** [DK] I really want to see old-style aliases finally go away with the globals for workflow and vistrails taking their place, but we can add them for now.&lt;br /&gt;
** [ES] I just added them in v2.0 branch.&lt;br /&gt;
&lt;br /&gt;
* How do we support functions that have no parameters in the new port configuration?&lt;br /&gt;
&lt;br /&gt;
* Do we need to worry about parameters with default values that won't be saved?  For example, a Boolean that we want set to False will not show as a set parameter currently because that is the default.  Same for an empty string...&lt;br /&gt;
** [DK] mimic 1.6 and create the function immediately?&lt;br /&gt;
&lt;br /&gt;
=== Claurissa's Notes V2.0===&lt;br /&gt;
&lt;br /&gt;
* Parameter Exploration doesn't work.  When I hit the execute button, nothing seems to happen.&lt;br /&gt;
&lt;br /&gt;
* Search doesn't work either.  If I double click execute, I need to force quit Vistrails.  If I press it only once, nothing seems to happen.  If I type something into the box rather than creating a visual query, it does display a tree, but nothing is highlighted.&lt;br /&gt;
&lt;br /&gt;
* When you detach and close a tab from the Configure/Console/Documentation/Latex/Messages/etc. window, there is no way to get it back without restarting VisTrails.&lt;br /&gt;
&lt;br /&gt;
* Is there a way to collapse all lists in the modules tab?  That would be nice to have.&lt;br /&gt;
&lt;br /&gt;
* The save file option is disabled even after I make a change.  I can only select save as, or save on exit (on either the v2.0 or mashup branches).  An asterisk does appear next to the filename in the window title on the mashups branch, but not the v2.0 branch.  &lt;br /&gt;
&lt;br /&gt;
* Changing between files using the workspace tab doesn't work on the 2.0 branch (but does on mashups).&lt;br /&gt;
&lt;br /&gt;
* The Provenance browser doesn't contain newly executed workflows unless I exit VisTrails and restart (it doesn't update).  Perhaps that is because I can't save the file???&lt;br /&gt;
&lt;br /&gt;
* Are the objects that appear in the bottom half of the workspace tab associated with execution provenance?  It is not clear to me what they are for.  It seems a new one appears after I save a new file and stays there permanently.  Clicking on them doesn't seem to do much.  Are they just for information?&lt;br /&gt;
&lt;br /&gt;
=== Juliana's notes about the mashup functionality ===&lt;br /&gt;
* Since it is not possible to create aliases with the current 2.0, I used 1.6 to create aliases for brain.vt. But when I loaded brain.vt into the 2.0 version and selected the mashup inspector, no aliases were shown [JF] My bad: it works!&lt;br /&gt;
&lt;br /&gt;
* When I save a mashup, where is it saved? Should it be displayed under the &amp;quot;List&amp;quot; tab in the mashup inspector?&lt;br /&gt;
** [ES] The mashups are saved when you save the vistrail. When you tag a mashup it is added to the list.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;I changed a tag for a mashup, and clicked &amp;quot;save&amp;quot;. But the new tag was not displayed in the &amp;quot;List&amp;quot;.&amp;lt;/del&amp;gt;&lt;br /&gt;
** [ES] There was a problem with the signals that were not being caught. You don't have to save. Just changing a tag should put it in the list.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;In the &amp;quot;List&amp;quot;, will I be able to select a previously created mashup and change it?&amp;lt;/del&amp;gt;&lt;br /&gt;
** [ES] Yes, this is working in the current mashups branch&lt;br /&gt;
 &lt;br /&gt;
* What is the difference between the &amp;quot;Save&amp;quot; and the &amp;quot;Update&amp;quot;? &lt;br /&gt;
** [ES] In the mashup preview tab, pressing &amp;quot;Update&amp;quot; will run the pipeline with the values filled in the gui. It doesn't change anything in the mashup. I am still not sure what to do with the &amp;quot;save&amp;quot; button. I just wanted a button where the user could tell that he wants that mashup to be in the list, but for that he can just tag the mashup on inspector. What do you think?&lt;br /&gt;
** [JF] From the interface, it is not clear that by just changing the tag, the mashup will be saved. Maybe, when the user hits save, if a tag has not been entered (i.e., the default tag is being used), we could prompt the user to enter a tag name? Also, while editing the mashup using the inspector, it might be better to have the name of the workflow on the top, don't you think? (and the mashup tag right below).&lt;br /&gt;
&lt;br /&gt;
* [JF] Should we have a special widget for entering file names?&lt;br /&gt;
* [JF] How do I view the actual mashup interface? And how to I execute the mashup on my laptop?&lt;br /&gt;
&lt;br /&gt;
* I made some changes to the &amp;quot;Alias Details&amp;quot; and then clicked on &amp;quot;Save&amp;quot; and then &amp;quot;Preview&amp;quot;, nothing happened. After I clicked on these two buttons a few times, the workflow executed, but the actual mashup preview was not displayed.&lt;br /&gt;
** [ES] I am working on fixing this now.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;It would be nice if it were possible to center and resize the workflow to fit in the window (cmd-shift-R)&amp;lt;/del&amp;gt;&lt;br /&gt;
** [ES] This is supported in the current mashups branch (I haven't built a new binary yet)&lt;br /&gt;
&lt;br /&gt;
===More Mashups Comments===&lt;br /&gt;
* [CT] When I open the terminator.vt example and select mashups and preview, the center panel is made really wide to fit in all four images that it want to display.  The problem then becomes that I can't shrink the window back down to a normal size.&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=Version_2&amp;diff=4144</id>
		<title>Version 2</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=Version_2&amp;diff=4144"/>
		<updated>2011-05-25T00:11:33Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* Juliana's notes about new interface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is setup to address and track issues with the new VisTrails 2.0 construction.  Please add comments or new issues to this page.&lt;br /&gt;
&lt;br /&gt;
=== Juliana's notes about new interface ===&lt;br /&gt;
&lt;br /&gt;
* It seems there are too many windows when we start VisTrails. What about only showing the main window? And fire the spreadsheet and inspector only when 'needed'? for the inspector, when a vt is open and a wf is selected, and for the spreadsheet when a workflow is run.&lt;br /&gt;
** [DK] What do you mean by windows?   The tabbed windows or the fact that there is a builder window, &amp;quot;utility&amp;quot; window, and a spreadsheet window?&lt;br /&gt;
** [JF] The latter: 3 windows popup when I start VisTrais: the builder, the inspector and the spreadsheet.&amp;lt;br&amp;gt;&lt;br /&gt;
** [DK] Many of the windows in the &amp;quot;utility&amp;quot; window are not dependent on a workflow (for example, the console and messages tabs).  We could however, not display them until a user asks to see the given view. &lt;br /&gt;
** [JF] This is what I meant.&lt;br /&gt;
&lt;br /&gt;
* I noticed that the picture-in-picture disappeared. I think that is helpful to give context. At least when we are displaying a workflow, it is useful to see the version tree.&lt;br /&gt;
** [DK] I think it was too small to be useful.  I can see the argument for being able to see both, but I think we need more real estate than the PIP had; perhaps we allow the History View to be shown as a tab on the left or as a detached view? &lt;br /&gt;
** [JF] the only issue here is whether this will be too ''busy''&lt;br /&gt;
** [DK] It is, arguably, the same amount of business as the PIP, however.&lt;br /&gt;
** [CT] I often used the picture-in-picture to select a different version without having to change to the history view and then change back.  I miss it.  If it is detachable, the user can just put it where they want it, which makes this a question of where to put it by default and whether or not to allow it to be where it used to be (since detachable objects can not generally be placed there).  &lt;br /&gt;
** [DK] maybe the correct approach here is to allow views to be detatched?&lt;br /&gt;
** [CT] no.  they should always have the center.  perhaps a detachable PIP?  Meaning, it might be nice to have the history view by the pipeline view, but when you click the history button on top, you still want the history view to show up in the center panel.  I have some ideas, I'll share a few.  I'll still refer to the additional view as the PIP even if it is no longer a picture-in-picture.&lt;br /&gt;
*** leave the PIP where it was and make it easy to turn on/off (ie a shortcut key, button in the toolbar, or menu item).  optionally allow users to resize it.&lt;br /&gt;
*** Have a &amp;quot;combined&amp;quot; view button in the toolbar that switches to a view that has the PIP.  Then have a simple shortcut key to swap views (switch the larger with the smaller).&lt;br /&gt;
*** let the PIP come up in a new window, users can move or resize it.  it should be easy to toggle on/off (ie pressing the spacebar, etc.).  the issue here is having too many windows.  So, we could think of it as an extension to the existing window, meaning it should always stay on top of the main window (but it doesn't need to overlap it, it could be to the side).  For example, selecting the spreadsheet window would put it (the spreadsheet) on top.  Then, selecting the main window would give the main window the focus, but the PIP would still be on top of it.  Also, when I tab through all windows in VisTrails, the PIP would not get it's own tab, it would be considered part of the main window.  Then when people get tired of it, they can turn it off.&lt;br /&gt;
*** We could do a pseudo detach with the view, meaning the views stay where they are, but when you go to detach it, it comes up in its separate window.  Users are then free to put it where they want it.  I think we would want this detached view to show the history view when the pipeline view is selected, or the pipeline view when the history view is selected.&lt;br /&gt;
&lt;br /&gt;
* We need some indication of which workflow is being displayed. Somewhere, we should display the label that identifies the workflow&lt;br /&gt;
** [DK] In the v2.0 branch, the tab shows this.  I have it display &amp;quot;Pipeline: alias&amp;quot; or &amp;quot;Pipeline: ROOT + 3&amp;quot;. [JF] Ok.&lt;br /&gt;
** [ES] Dave, it doesn't show anymore. I remember seeing the tab before, but I've just checked out v2.0 and I can't see it either.&lt;br /&gt;
** [DK] Right, when there is only a single tab, I hide the tab bar.  You can see the titles when if you create a new view (Ctrl/Cmd+T)&lt;br /&gt;
&lt;br /&gt;
* When I click on the workflow tab (in the main window,lower left corner) it always shows an &amp;quot;untitled.vt&amp;quot;. This looks like a bug... And if I click on  untitled.vt, nothing happens.&lt;br /&gt;
** [DK] Yes, Emanuele mentioned this at the meeting.  I'm also not happy with the current interface.&lt;br /&gt;
&lt;br /&gt;
=== Dave's List ===&lt;br /&gt;
&lt;br /&gt;
* Reduce size of palette names so they don't take so much space&lt;br /&gt;
&lt;br /&gt;
* Set default palettes for diff, other views&lt;br /&gt;
&lt;br /&gt;
* Diff currently being shown as a pipeline.  Should we create a mode for this&lt;br /&gt;
&lt;br /&gt;
* Buttons in Messages window look bad on the Mac, don't need all of them now as well, I think&lt;br /&gt;
&lt;br /&gt;
* Missing callbacks for Merge and Control Flow Assistant menu items&lt;br /&gt;
&lt;br /&gt;
* Move execute button so it doesn't look like a mode&lt;br /&gt;
&lt;br /&gt;
* Aliases support for parameters.&lt;br /&gt;
** [DK] I really want to see old-style aliases finally go away with the globals for workflow and vistrails taking their place, but we can add them for now.&lt;br /&gt;
** [ES] I just added them in v2.0 branch.&lt;br /&gt;
&lt;br /&gt;
* How do we support functions that have no parameters in the new port configuration?&lt;br /&gt;
&lt;br /&gt;
* Do we need to worry about parameters with default values that won't be saved?  For example, a Boolean that we want set to False will not show as a set parameter currently because that is the default.  Same for an empty string...&lt;br /&gt;
** [DK] mimic 1.6 and create the function immediately?&lt;br /&gt;
&lt;br /&gt;
=== Claurissa's Notes V2.0===&lt;br /&gt;
&lt;br /&gt;
* Parameter Exploration doesn't work.  When I hit the execute button, nothing seems to happen.&lt;br /&gt;
&lt;br /&gt;
* Search doesn't work either.  If I double click execute, I need to force quit Vistrails.  If I press it only once, nothing seems to happen.  If I type something into the box rather than creating a visual query, it does display a tree, but nothing is highlighted.&lt;br /&gt;
&lt;br /&gt;
* When you detach and close a tab from the Configure/Console/Documentation/Latex/Messages/etc. window, there is no way to get it back without restarting VisTrails.&lt;br /&gt;
&lt;br /&gt;
* Is there a way to collapse all lists in the modules tab?  That would be nice to have.&lt;br /&gt;
&lt;br /&gt;
* The save file option is disabled even after I make a change.  I can only select save as, or save on exit (on either the v2.0 or mashup branches).  An asterisk does appear next to the filename in the window title on the mashups branch, but not the v2.0 branch.  &lt;br /&gt;
&lt;br /&gt;
* Changing between files using the workspace tab doesn't work on the 2.0 branch (but does on mashups).&lt;br /&gt;
&lt;br /&gt;
* The Provenance browser doesn't contain newly executed workflows unless I exit VisTrails and restart (it doesn't update).  Perhaps that is because I can't save the file???&lt;br /&gt;
&lt;br /&gt;
* Are the objects that appear in the bottom half of the workspace tab associated with execution provenance?  It is not clear to me what they are for.  It seems a new one appears after I save a new file and stays there permanently.  Clicking on them doesn't seem to do much.  Are they just for information?&lt;br /&gt;
&lt;br /&gt;
=== Juliana's notes about the mashup functionality ===&lt;br /&gt;
* Since it is not possible to create aliases with the current 2.0, I used 1.6 to create aliases for brain.vt. But when I loaded brain.vt into the 2.0 version and selected the mashup inspector, no aliases were shown [JF] My bad: it works!&lt;br /&gt;
&lt;br /&gt;
* When I save a mashup, where is it saved? Should it be displayed under the &amp;quot;List&amp;quot; tab in the mashup inspector?&lt;br /&gt;
** [ES] The mashups are saved when you save the vistrail. When you tag a mashup it is added to the list.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;I changed a tag for a mashup, and clicked &amp;quot;save&amp;quot;. But the new tag was not displayed in the &amp;quot;List&amp;quot;.&amp;lt;/del&amp;gt;&lt;br /&gt;
** [ES] There was a problem with the signals that were not being caught. You don't have to save. Just changing a tag should put it in the list.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;In the &amp;quot;List&amp;quot;, will I be able to select a previously created mashup and change it?&amp;lt;/del&amp;gt;&lt;br /&gt;
** [ES] Yes, this is working in the current mashups branch&lt;br /&gt;
 &lt;br /&gt;
* What is the difference between the &amp;quot;Save&amp;quot; and the &amp;quot;Update&amp;quot;? &lt;br /&gt;
** [ES] In the mashup preview tab, pressing &amp;quot;Update&amp;quot; will run the pipeline with the values filled in the gui. It doesn't change anything in the mashup. I am still not sure what to do with the &amp;quot;save&amp;quot; button. I just wanted a button where the user could tell that he wants that mashup to be in the list, but for that he can just tag the mashup on inspector. What do you think?&lt;br /&gt;
** [JF] From the interface, it is not clear that by just changing the tag, the mashup will be saved. Maybe, when the user hits save, if a tag has not been entered (i.e., the default tag is being used), we could prompt the user to enter a tag name? Also, while editing the mashup using the inspector, it might be better to have the name of the workflow on the top, don't you think? (and the mashup tag right below).&lt;br /&gt;
&lt;br /&gt;
* [JF] Should we have a special widget for entering file names?&lt;br /&gt;
* [JF] How do I view the actual mashup interface? And how to I execute the mashup on my laptop?&lt;br /&gt;
&lt;br /&gt;
* I made some changes to the &amp;quot;Alias Details&amp;quot; and then clicked on &amp;quot;Save&amp;quot; and then &amp;quot;Preview&amp;quot;, nothing happened. After I clicked on these two buttons a few times, the workflow executed, but the actual mashup preview was not displayed.&lt;br /&gt;
** [ES] I am working on fixing this now.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;It would be nice if it were possible to center and resize the workflow to fit in the window (cmd-shift-R)&amp;lt;/del&amp;gt;&lt;br /&gt;
** [ES] This is supported in the current mashups branch (I haven't built a new binary yet)&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=Version_2&amp;diff=4133</id>
		<title>Version 2</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=Version_2&amp;diff=4133"/>
		<updated>2011-05-23T23:45:08Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* Claurissa's Notes V2.0 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is setup to address and track issues with the new VisTrails 2.0 construction.  Please add comments or new issues to this page.&lt;br /&gt;
&lt;br /&gt;
=== Juliana's notes about new interface ===&lt;br /&gt;
&lt;br /&gt;
* It seems there are too many windows when we start VisTrails. What about only showing the main window? And fire the spreadsheet and inspector only when 'needed'? for the inspector, when a vt is open and a wf is selected, and for the spreadsheet when a workflow is run.&lt;br /&gt;
** [DK] What do you mean by windows?   The tabbed windows or the fact that there is a builder window, &amp;quot;utility&amp;quot; window, and a spreadsheet window?&lt;br /&gt;
** [JF] The latter: 3 windows popup when I start VisTrais: the builder, the inspector and the spreadsheet.&amp;lt;br&amp;gt;&lt;br /&gt;
** [DK] Many of the windows in the &amp;quot;utility&amp;quot; window are not dependent on a workflow (for example, the console and messages tabs).  We could however, not display them until a user asks to see the given view. &lt;br /&gt;
** [JF] This is what I meant.&lt;br /&gt;
&lt;br /&gt;
* I noticed that the picture-in-picture disappeared. I think that is helpful to give context. At least when we are displaying a workflow, it is useful to see the version tree.&lt;br /&gt;
** [DK] I think it was too small to be useful.  I can see the argument for being able to see both, but I think we need more real estate than the PIP had; perhaps we allow the History View to be shown as a tab on the left or as a detached view? &lt;br /&gt;
** [JF] the only issue here is whether this will be too ''busy''&lt;br /&gt;
** [DK] It is, arguably, the same amount of business as the PIP, however.&lt;br /&gt;
** [CT] I often used the picture-in-picture to select a different version without having to change to the history view and then change back.  I miss it.  If it is detachable, the user can just put it where they want it, which makes this a question of where to put it by default and whether or not to allow it to be where it used to be (since detachable objects can not generally be placed there).  &lt;br /&gt;
* We need some indication of which workflow is being displayed. Somewhere, we should display the label that identifies the workflow&lt;br /&gt;
** [DK] In the v2.0 branch, the tab shows this.  I have it display &amp;quot;Pipeline: alias&amp;quot; or &amp;quot;Pipeline: ROOT + 3&amp;quot;. [JF] Ok.&lt;br /&gt;
** [ES] Dave, it doesn't show anymore. I remember seeing the tab before, but I've just checked out v2.0 and I can't see it either.&lt;br /&gt;
** [DK] Right, when there is only a single tab, I hide the tab bar.  You can see the titles when if you create a new view (Ctrl/Cmd+T)&lt;br /&gt;
&lt;br /&gt;
* When I click on the workflow tab (in the main window,lower left corner) it always shows an &amp;quot;untitled.vt&amp;quot;. This looks like a bug... And if I click on  untitled.vt, nothing happens.&lt;br /&gt;
** [DK] Yes, Emanuele mentioned this at the meeting.  I'm also not happy with the current interface.&lt;br /&gt;
&lt;br /&gt;
=== Dave's List ===&lt;br /&gt;
&lt;br /&gt;
* Reduce size of palette names so they don't take so much space&lt;br /&gt;
&lt;br /&gt;
* Set default palettes for diff, other views&lt;br /&gt;
&lt;br /&gt;
* Diff currently being shown as a pipeline.  Should we create a mode for this&lt;br /&gt;
&lt;br /&gt;
* Buttons in Messages window look bad on the Mac, don't need all of them now as well, I think&lt;br /&gt;
&lt;br /&gt;
* Missing callbacks for Merge and Control Flow Assistant menu items&lt;br /&gt;
&lt;br /&gt;
* Move execute button so it doesn't look like a mode&lt;br /&gt;
&lt;br /&gt;
* Aliases support for parameters.&lt;br /&gt;
** [DK] I really want to see old-style aliases finally go away with the globals for workflow and vistrails taking their place, but we can add them for now.&lt;br /&gt;
** [ES] I just added them in v2.0 branch.&lt;br /&gt;
&lt;br /&gt;
* How do we support functions that have no parameters in the new port configuration?&lt;br /&gt;
&lt;br /&gt;
* Do we need to worry about parameters with default values that won't be saved?  For example, a Boolean that we want set to False will not show as a set parameter currently because that is the default.  Same for an empty string...&lt;br /&gt;
&lt;br /&gt;
=== Claurissa's Notes V2.0===&lt;br /&gt;
&lt;br /&gt;
* Parameter Exploration doesn't work.  When I hit the execute button, nothing seems to happen.&lt;br /&gt;
&lt;br /&gt;
* Search doesn't work either.  If I double click execute, I need to force quit Vistrails.  If I press it only once, nothing seems to happen.  If I type something into the box rather than creating a visual query, it does display a tree, but nothing is highlighted.&lt;br /&gt;
&lt;br /&gt;
* When you detach and close a tab from the Configure/Console/Documentation/Latex/Messages/etc. window, there is no way to get it back without restarting VisTrails.&lt;br /&gt;
&lt;br /&gt;
* Is there a way to collapse all lists in the modules tab?  That would be nice to have.&lt;br /&gt;
&lt;br /&gt;
* The save file option is disabled even after I make a change.  I can only select save as, or save on exit (on either the v2.0 or mashup branches).  An asterisk does appear next to the filename in the window title on the mashups branch, but not the v2.0 branch.  &lt;br /&gt;
&lt;br /&gt;
* Changing between files using the workspace tab doesn't work on the 2.0 branch (but does on mashups).&lt;br /&gt;
&lt;br /&gt;
* The Provenance browser doesn't contain newly executed workflows unless I exit VisTrails and restart (it doesn't update).  Perhaps that is because I can't save the file???&lt;br /&gt;
&lt;br /&gt;
* Are the objects that appear in the bottom half of the workspace tab associated with execution provenance?  It is not clear to me what they are for.  It seems a new one appears after I save a new file and stays there permanently.  Clicking on them doesn't seem to do much.  Are they just for information?&lt;br /&gt;
&lt;br /&gt;
=== Juliana's notes about the mashup functionality ===&lt;br /&gt;
* Since it is not possible to create aliases with the current 2.0, I used 1.6 to create aliases for brain.vt. But when I loaded brain.vt into the 2.0 version and selected the mashup inspector, no aliases were shown [JF] My bad: it works!&lt;br /&gt;
&lt;br /&gt;
* When I save a mashup, where is it saved? Should it be displayed under the &amp;quot;List&amp;quot; tab in the mashup inspector?&lt;br /&gt;
** [ES] The mashups are saved when you save the vistrail. When you tag a mashup it is added to the list.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;I changed a tag for a mashup, and clicked &amp;quot;save&amp;quot;. But the new tag was not displayed in the &amp;quot;List&amp;quot;.&amp;lt;/del&amp;gt;&lt;br /&gt;
** [ES] There was a problem with the signals that were not being caught. You don't have to save. Just changing a tag should put it in the list.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;In the &amp;quot;List&amp;quot;, will I be able to select a previously created mashup and change it?&amp;lt;/del&amp;gt;&lt;br /&gt;
** [ES] Yes, this is working in the current mashups branch&lt;br /&gt;
 &lt;br /&gt;
* What is the difference between the &amp;quot;Save&amp;quot; and the &amp;quot;Update&amp;quot;? &lt;br /&gt;
** [ES] In the mashup preview tab, pressing &amp;quot;Update&amp;quot; will run the pipeline with the values filled in the gui. It doesn't change anything in the mashup. I am still not sure what to do with the &amp;quot;save&amp;quot; button. I just wanted a button where the user could tell that he wants that mashup to be in the list, but for that he can just tag the mashup on inspector. What do you think?&lt;br /&gt;
** [JF] From the interface, it is not clear that by just changing the tag, the mashup will be saved. Maybe, when the user hits save, if a tag has not been entered (i.e., the default tag is being used), we could prompt the user to enter a tag name? Also, while editing the mashup using the inspector, it might be better to have the name of the workflow on the top, don't you think? (and the mashup tag right below).&lt;br /&gt;
&lt;br /&gt;
* [JF] Should we have a special widget for entering file names?&lt;br /&gt;
* [JF] How do I view the actual mashup interface? And how to I execute the mashup on my laptop?&lt;br /&gt;
&lt;br /&gt;
* I made some changes to the &amp;quot;Alias Details&amp;quot; and then clicked on &amp;quot;Save&amp;quot; and then &amp;quot;Preview&amp;quot;, nothing happened. After I clicked on these two buttons a few times, the workflow executed, but the actual mashup preview was not displayed.&lt;br /&gt;
** [ES] I am working on fixing this now.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;It would be nice if it were possible to center and resize the workflow to fit in the window (cmd-shift-R)&amp;lt;/del&amp;gt;&lt;br /&gt;
** [ES] This is supported in the current mashups branch (I haven't built a new binary yet)&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=Version_2&amp;diff=4131</id>
		<title>Version 2</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=Version_2&amp;diff=4131"/>
		<updated>2011-05-23T17:21:18Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* Juliana's notes about new interface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is setup to address and track issues with the new VisTrails 2.0 construction.  Please add comments or new issues to this page.&lt;br /&gt;
&lt;br /&gt;
=== Juliana's notes about new interface ===&lt;br /&gt;
&lt;br /&gt;
* It seems there are too many windows when we start VisTrails. What about only showing the main window? And fire the spreadsheet and inspector only when 'needed'? for the inspector, when a vt is open and a wf is selected, and for the spreadsheet when a workflow is run.&lt;br /&gt;
** [DK] What do you mean by windows?   The tabbed windows or the fact that there is a builder window, &amp;quot;utility&amp;quot; window, and a spreadsheet window?&lt;br /&gt;
** [JF] The latter: 3 windows popup when I start VisTrais: the builder, the inspector and the spreadsheet.&amp;lt;br&amp;gt;&lt;br /&gt;
** [DK] Many of the windows in the &amp;quot;utility&amp;quot; window are not dependent on a workflow (for example, the console and messages tabs).  We could however, not display them until a user asks to see the given view. &lt;br /&gt;
** [JF] This is what I meant.&lt;br /&gt;
&lt;br /&gt;
* I noticed that the picture-in-picture disappeared. I think that is helpful to give context. At least when we are displaying a workflow, it is useful to see the version tree.&lt;br /&gt;
** [DK] I think it was too small to be useful.  I can see the argument for being able to see both, but I think we need more real estate than the PIP had; perhaps we allow the History View to be shown as a tab on the left or as a detached view? &lt;br /&gt;
** [JF] the only issue here is whether this will be too ''busy''&lt;br /&gt;
** [DK] It is, arguably, the same amount of business as the PIP, however.&lt;br /&gt;
** [CT] I often used the picture-in-picture to select a different version without having to change to the history view and then change back.  I miss it.  If it is detachable, the user can just put it where they want it, which makes this a question of where to put it by default and whether or not to allow it to be where it used to be (since detachable objects can not generally be placed there).  &lt;br /&gt;
* We need some indication of which workflow is being displayed. Somewhere, we should display the label that identifies the workflow&lt;br /&gt;
** [DK] In the v2.0 branch, the tab shows this.  I have it display &amp;quot;Pipeline: alias&amp;quot; or &amp;quot;Pipeline: ROOT + 3&amp;quot;. [JF] Ok.&lt;br /&gt;
** [ES] Dave, it doesn't show anymore. I remember seeing the tab before, but I've just checked out v2.0 and I can't see it either.&lt;br /&gt;
** [DK] Right, when there is only a single tab, I hide the tab bar.  You can see the titles when if you create a new view (Ctrl/Cmd+T)&lt;br /&gt;
&lt;br /&gt;
* When I click on the workflow tab (in the main window,lower left corner) it always shows an &amp;quot;untitled.vt&amp;quot;. This looks like a bug... And if I click on  untitled.vt, nothing happens.&lt;br /&gt;
** [DK] Yes, Emanuele mentioned this at the meeting.  I'm also not happy with the current interface.&lt;br /&gt;
&lt;br /&gt;
=== Dave's List ===&lt;br /&gt;
&lt;br /&gt;
* Reduce size of palette names so they don't take so much space&lt;br /&gt;
&lt;br /&gt;
* Set default palettes for diff, other views&lt;br /&gt;
&lt;br /&gt;
* Diff currently being shown as a pipeline.  Should we create a mode for this&lt;br /&gt;
&lt;br /&gt;
* Buttons in Messages window look bad on the Mac, don't need all of them now as well, I think&lt;br /&gt;
&lt;br /&gt;
* Missing callbacks for Merge and Control Flow Assistant menu items&lt;br /&gt;
&lt;br /&gt;
* Move execute button so it doesn't look like a mode&lt;br /&gt;
&lt;br /&gt;
* Aliases support for parameters.&lt;br /&gt;
** [DK] I really want to see old-style aliases finally go away with the globals for workflow and vistrails taking their place, but we can add them for now.&lt;br /&gt;
** [ES] I just added them in v2.0 branch.&lt;br /&gt;
&lt;br /&gt;
* How do we support functions that have no parameters in the new port configuration?&lt;br /&gt;
&lt;br /&gt;
* Do we need to worry about parameters with default values that won't be saved?  For example, a Boolean that we want set to False will not show as a set parameter currently because that is the default.  Same for an empty string...&lt;br /&gt;
&lt;br /&gt;
=== Claurissa's Notes V2.0===&lt;br /&gt;
&lt;br /&gt;
* When you detach and close a tab from the Configure/Console/Documentation/Latex/Messages/etc. window, there is no way to get it back without restarting VisTrails.&lt;br /&gt;
&lt;br /&gt;
* Is there a way to collapse all lists in the modules tab?  That would be nice to have.&lt;br /&gt;
&lt;br /&gt;
* The save file option is disabled even after I make a change.  I can only select save as, or save on exit (on either the v2.0 or mashup branches).  An asterisk does appear next to the filename in the window title on the mashups branch, but not the v2.0 branch.  &lt;br /&gt;
&lt;br /&gt;
* Changing between files using the workspace tab doesn't work on the 2.0 branch (but does on mashups).&lt;br /&gt;
&lt;br /&gt;
* The Provenance browser doesn't contain newly executed workflows unless I exit VisTrails and restart (it doesn't update).  Perhaps that is because I can't save the file???&lt;br /&gt;
&lt;br /&gt;
* Are the objects that appear in the bottom half of the workspace tab associated with execution provenance?  It is not clear to me what they are for.  It seems a new one appears after I save a new file and stays there permanently.  Clicking on them doesn't seem to do much.  Are they just for information?&lt;br /&gt;
&lt;br /&gt;
=== Juliana's notes about the mashup functionality ===&lt;br /&gt;
* Since it is not possible to create aliases with the current 2.0, I used 1.6 to create aliases for brain.vt. But when I loaded brain.vt into the 2.0 version and selected the mashup inspector, no aliases were shown [JF] My bad: it works!&lt;br /&gt;
&lt;br /&gt;
* When I save a mashup, where is it saved? Should it be displayed under the &amp;quot;List&amp;quot; tab in the mashup inspector?&lt;br /&gt;
** [ES] The mashups are saved when you save the vistrail. When you tag a mashup it is added to the list.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;I changed a tag for a mashup, and clicked &amp;quot;save&amp;quot;. But the new tag was not displayed in the &amp;quot;List&amp;quot;.&amp;lt;/del&amp;gt;&lt;br /&gt;
** [ES] There was a problem with the signals that were not being caught. You don't have to save. Just changing a tag should put it in the list.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;In the &amp;quot;List&amp;quot;, will I be able to select a previously created mashup and change it?&amp;lt;/del&amp;gt;&lt;br /&gt;
** [ES] Yes, this is working in the current mashups branch&lt;br /&gt;
 &lt;br /&gt;
* What is the difference between the &amp;quot;Save&amp;quot; and the &amp;quot;Update&amp;quot;? &lt;br /&gt;
** [ES] In the mashup preview tab, pressing &amp;quot;Update&amp;quot; will run the pipeline with the values filled in the gui. It doesn't change anything in the mashup. I am still not sure what to do with the &amp;quot;save&amp;quot; button. I just wanted a button where the user could tell that he wants that mashup to be in the list, but for that he can just tag the mashup on inspector. What do you think?&lt;br /&gt;
** [JF] From the interface, it is not clear that by just changing the tag, the mashup will be saved. Maybe, when the user hits save, if a tag has not been entered (i.e., the default tag is being used), we could prompt the user to enter a tag name? Also, while editing the mashup using the inspector, it might be better to have the name of the workflow on the top, don't you think? (and the mashup tag right below).&lt;br /&gt;
&lt;br /&gt;
* [JF] Should we have a special widget for entering file names?&lt;br /&gt;
* [JF] How do I view the actual mashup interface? And how to I execute the mashup on my laptop?&lt;br /&gt;
&lt;br /&gt;
* I made some changes to the &amp;quot;Alias Details&amp;quot; and then clicked on &amp;quot;Save&amp;quot; and then &amp;quot;Preview&amp;quot;, nothing happened. After I clicked on these two buttons a few times, the workflow executed, but the actual mashup preview was not displayed.&lt;br /&gt;
** [ES] I am working on fixing this now.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;It would be nice if it were possible to center and resize the workflow to fit in the window (cmd-shift-R)&amp;lt;/del&amp;gt;&lt;br /&gt;
** [ES] This is supported in the current mashups branch (I haven't built a new binary yet)&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=Version_2&amp;diff=4130</id>
		<title>Version 2</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=Version_2&amp;diff=4130"/>
		<updated>2011-05-23T17:20:30Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* Juliana's notes about new interface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is setup to address and track issues with the new VisTrails 2.0 construction.  Please add comments or new issues to this page.&lt;br /&gt;
&lt;br /&gt;
=== Juliana's notes about new interface ===&lt;br /&gt;
&lt;br /&gt;
* It seems there are too many windows when we start VisTrails. What about only showing the main window? And fire the spreadsheet and inspector only when 'needed'? for the inspector, when a vt is open and a wf is selected, and for the spreadsheet when a workflow is run.&lt;br /&gt;
** [DK] What do you mean by windows?   The tabbed windows or the fact that there is a builder window, &amp;quot;utility&amp;quot; window, and a spreadsheet window?&lt;br /&gt;
** [JF] The latter: 3 windows popup when I start VisTrais: the builder, the inspector and the spreadsheet.&amp;lt;br&amp;gt;&lt;br /&gt;
** [DK] Many of the windows in the &amp;quot;utility&amp;quot; window are not dependent on a workflow (for example, the console and messages tabs).  We could however, not display them until a user asks to see the given view. &lt;br /&gt;
** [JF] This is what I meant.&lt;br /&gt;
&lt;br /&gt;
* I noticed that the picture-in-picture disappeared. I think that is helpful to give context. At least when we are displaying a workflow, it is useful to see the version tree.&lt;br /&gt;
** [DK] I think it was too small to be useful.  I can see the argument for being able to see both, but I think we need more real estate than the PIP had; perhaps we allow the History View to be shown as a tab on the left or as a detached view? &lt;br /&gt;
** [JF] the only issue here is whether this will be too ''busy''&lt;br /&gt;
** [DK] It is, arguably, the same amount of business as the PIP, however.&lt;br /&gt;
** [CT] I often used the picture-in-picture to select a different version without having to change to the history view and then change back.  I do miss it.  If it is detachable, the user can just put it where they want it, which makes this a question of where to put it by default and whether or not to allow it to be where it used to be (since detachable objects can not generally be placed there).  &lt;br /&gt;
* We need some indication of which workflow is being displayed. Somewhere, we should display the label that identifies the workflow&lt;br /&gt;
** [DK] In the v2.0 branch, the tab shows this.  I have it display &amp;quot;Pipeline: alias&amp;quot; or &amp;quot;Pipeline: ROOT + 3&amp;quot;. [JF] Ok.&lt;br /&gt;
** [ES] Dave, it doesn't show anymore. I remember seeing the tab before, but I've just checked out v2.0 and I can't see it either.&lt;br /&gt;
** [DK] Right, when there is only a single tab, I hide the tab bar.  You can see the titles when if you create a new view (Ctrl/Cmd+T)&lt;br /&gt;
&lt;br /&gt;
* When I click on the workflow tab (in the main window,lower left corner) it always shows an &amp;quot;untitled.vt&amp;quot;. This looks like a bug... And if I click on  untitled.vt, nothing happens.&lt;br /&gt;
** [DK] Yes, Emanuele mentioned this at the meeting.  I'm also not happy with the current interface.&lt;br /&gt;
&lt;br /&gt;
=== Dave's List ===&lt;br /&gt;
&lt;br /&gt;
* Reduce size of palette names so they don't take so much space&lt;br /&gt;
&lt;br /&gt;
* Set default palettes for diff, other views&lt;br /&gt;
&lt;br /&gt;
* Diff currently being shown as a pipeline.  Should we create a mode for this&lt;br /&gt;
&lt;br /&gt;
* Buttons in Messages window look bad on the Mac, don't need all of them now as well, I think&lt;br /&gt;
&lt;br /&gt;
* Missing callbacks for Merge and Control Flow Assistant menu items&lt;br /&gt;
&lt;br /&gt;
* Move execute button so it doesn't look like a mode&lt;br /&gt;
&lt;br /&gt;
* Aliases support for parameters.&lt;br /&gt;
** [DK] I really want to see old-style aliases finally go away with the globals for workflow and vistrails taking their place, but we can add them for now.&lt;br /&gt;
** [ES] I just added them in v2.0 branch.&lt;br /&gt;
&lt;br /&gt;
* How do we support functions that have no parameters in the new port configuration?&lt;br /&gt;
&lt;br /&gt;
* Do we need to worry about parameters with default values that won't be saved?  For example, a Boolean that we want set to False will not show as a set parameter currently because that is the default.  Same for an empty string...&lt;br /&gt;
&lt;br /&gt;
=== Claurissa's Notes V2.0===&lt;br /&gt;
&lt;br /&gt;
* When you detach and close a tab from the Configure/Console/Documentation/Latex/Messages/etc. window, there is no way to get it back without restarting VisTrails.&lt;br /&gt;
&lt;br /&gt;
* Is there a way to collapse all lists in the modules tab?  That would be nice to have.&lt;br /&gt;
&lt;br /&gt;
* The save file option is disabled even after I make a change.  I can only select save as, or save on exit (on either the v2.0 or mashup branches).  An asterisk does appear next to the filename in the window title on the mashups branch, but not the v2.0 branch.  &lt;br /&gt;
&lt;br /&gt;
* Changing between files using the workspace tab doesn't work on the 2.0 branch (but does on mashups).&lt;br /&gt;
&lt;br /&gt;
* The Provenance browser doesn't contain newly executed workflows unless I exit VisTrails and restart (it doesn't update).  Perhaps that is because I can't save the file???&lt;br /&gt;
&lt;br /&gt;
* Are the objects that appear in the bottom half of the workspace tab associated with execution provenance?  It is not clear to me what they are for.  It seems a new one appears after I save a new file and stays there permanently.  Clicking on them doesn't seem to do much.  Are they just for information?&lt;br /&gt;
&lt;br /&gt;
=== Juliana's notes about the mashup functionality ===&lt;br /&gt;
* Since it is not possible to create aliases with the current 2.0, I used 1.6 to create aliases for brain.vt. But when I loaded brain.vt into the 2.0 version and selected the mashup inspector, no aliases were shown [JF] My bad: it works!&lt;br /&gt;
&lt;br /&gt;
* When I save a mashup, where is it saved? Should it be displayed under the &amp;quot;List&amp;quot; tab in the mashup inspector?&lt;br /&gt;
** [ES] The mashups are saved when you save the vistrail. When you tag a mashup it is added to the list.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;I changed a tag for a mashup, and clicked &amp;quot;save&amp;quot;. But the new tag was not displayed in the &amp;quot;List&amp;quot;.&amp;lt;/del&amp;gt;&lt;br /&gt;
** [ES] There was a problem with the signals that were not being caught. You don't have to save. Just changing a tag should put it in the list.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;In the &amp;quot;List&amp;quot;, will I be able to select a previously created mashup and change it?&amp;lt;/del&amp;gt;&lt;br /&gt;
** [ES] Yes, this is working in the current mashups branch&lt;br /&gt;
 &lt;br /&gt;
* What is the difference between the &amp;quot;Save&amp;quot; and the &amp;quot;Update&amp;quot;? &lt;br /&gt;
** [ES] In the mashup preview tab, pressing &amp;quot;Update&amp;quot; will run the pipeline with the values filled in the gui. It doesn't change anything in the mashup. I am still not sure what to do with the &amp;quot;save&amp;quot; button. I just wanted a button where the user could tell that he wants that mashup to be in the list, but for that he can just tag the mashup on inspector. What do you think?&lt;br /&gt;
** [JF] From the interface, it is not clear that by just changing the tag, the mashup will be saved. Maybe, when the user hits save, if a tag has not been entered (i.e., the default tag is being used), we could prompt the user to enter a tag name? Also, while editing the mashup using the inspector, it might be better to have the name of the workflow on the top, don't you think? (and the mashup tag right below).&lt;br /&gt;
&lt;br /&gt;
* [JF] Should we have a special widget for entering file names?&lt;br /&gt;
* [JF] How do I view the actual mashup interface? And how to I execute the mashup on my laptop?&lt;br /&gt;
&lt;br /&gt;
* I made some changes to the &amp;quot;Alias Details&amp;quot; and then clicked on &amp;quot;Save&amp;quot; and then &amp;quot;Preview&amp;quot;, nothing happened. After I clicked on these two buttons a few times, the workflow executed, but the actual mashup preview was not displayed.&lt;br /&gt;
** [ES] I am working on fixing this now.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;It would be nice if it were possible to center and resize the workflow to fit in the window (cmd-shift-R)&amp;lt;/del&amp;gt;&lt;br /&gt;
** [ES] This is supported in the current mashups branch (I haven't built a new binary yet)&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=Version_2&amp;diff=4129</id>
		<title>Version 2</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=Version_2&amp;diff=4129"/>
		<updated>2011-05-23T17:03:17Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* Claurissa's Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is setup to address and track issues with the new VisTrails 2.0 construction.  Please add comments or new issues to this page.&lt;br /&gt;
&lt;br /&gt;
=== Juliana's notes about new interface ===&lt;br /&gt;
&lt;br /&gt;
* It seems there are too many windows when we start VisTrails. What about only showing the main window? And fire the spreadsheet and inspector only when 'needed'? for the inspector, when a vt is open and a wf is selected, and for the spreadsheet when a workflow is run.&lt;br /&gt;
** [DK] What do you mean by windows?   The tabbed windows or the fact that there is a builder window, &amp;quot;utility&amp;quot; window, and a spreadsheet window?&lt;br /&gt;
** [JF] The latter: 3 windows popup when I start VisTrais: the builder, the inspector and the spreadsheet.&amp;lt;br&amp;gt;&lt;br /&gt;
** [DK] Many of the windows in the &amp;quot;utility&amp;quot; window are not dependent on a workflow (for example, the console and messages tabs).  We could however, not display them until a user asks to see the given view. &lt;br /&gt;
** [JF] This is what I meant.&lt;br /&gt;
&lt;br /&gt;
* I noticed that the picture-in-picture disappeared. I think that is helpful to give context. At least when we are displaying a workflow, it is useful to see the version tree.&lt;br /&gt;
** [DK] I think it was too small to be useful.  I can see the argument for being able to see both, but I think we need more real estate than the PIP had; perhaps we allow the History View to be shown as a tab on the left or as a detached view? &lt;br /&gt;
** [JF] the only issue here is whether this will be too ''busy''&lt;br /&gt;
** [DK] It is, arguably, the same amount of business as the PIP, however.&lt;br /&gt;
* We need some indication of which workflow is being displayed. Somewhere, we should display the label that identifies the workflow&lt;br /&gt;
** [DK] In the v2.0 branch, the tab shows this.  I have it display &amp;quot;Pipeline: alias&amp;quot; or &amp;quot;Pipeline: ROOT + 3&amp;quot;. [JF] Ok.&lt;br /&gt;
** [ES] Dave, it doesn't show anymore. I remember seeing the tab before, but I've just checked out v2.0 and I can't see it either.&lt;br /&gt;
** [DK] Right, when there is only a single tab, I hide the tab bar.  You can see the titles when if you create a new view (Ctrl/Cmd+T)&lt;br /&gt;
&lt;br /&gt;
* When I click on the workflow tab (in the main window,lower left corner) it always shows an &amp;quot;untitled.vt&amp;quot;. This looks like a bug... And if I click on  untitled.vt, nothing happens.&lt;br /&gt;
** [DK] Yes, Emanuele mentioned this at the meeting.  I'm also not happy with the current interface.&lt;br /&gt;
&lt;br /&gt;
=== Dave's List ===&lt;br /&gt;
&lt;br /&gt;
* Reduce size of palette names so they don't take so much space&lt;br /&gt;
&lt;br /&gt;
* Set default palettes for diff, other views&lt;br /&gt;
&lt;br /&gt;
* Diff currently being shown as a pipeline.  Should we create a mode for this&lt;br /&gt;
&lt;br /&gt;
* Buttons in Messages window look bad on the Mac, don't need all of them now as well, I think&lt;br /&gt;
&lt;br /&gt;
* Missing callbacks for Merge and Control Flow Assistant menu items&lt;br /&gt;
&lt;br /&gt;
* Move execute button so it doesn't look like a mode&lt;br /&gt;
&lt;br /&gt;
* Aliases support for parameters.&lt;br /&gt;
** [DK] I really want to see old-style aliases finally go away with the globals for workflow and vistrails taking their place, but we can add them for now.&lt;br /&gt;
** [ES] I just added them in v2.0 branch.&lt;br /&gt;
&lt;br /&gt;
* How do we support functions that have no parameters in the new port configuration?&lt;br /&gt;
&lt;br /&gt;
* Do we need to worry about parameters with default values that won't be saved?  For example, a Boolean that we want set to False will not show as a set parameter currently because that is the default.  Same for an empty string...&lt;br /&gt;
&lt;br /&gt;
=== Claurissa's Notes V2.0===&lt;br /&gt;
&lt;br /&gt;
* When you detach and close a tab from the Configure/Console/Documentation/Latex/Messages/etc. window, there is no way to get it back without restarting VisTrails.&lt;br /&gt;
&lt;br /&gt;
* Is there a way to collapse all lists in the modules tab?  That would be nice to have.&lt;br /&gt;
&lt;br /&gt;
* The save file option is disabled even after I make a change.  I can only select save as, or save on exit (on either the v2.0 or mashup branches).  An asterisk does appear next to the filename in the window title on the mashups branch, but not the v2.0 branch.  &lt;br /&gt;
&lt;br /&gt;
* Changing between files using the workspace tab doesn't work on the 2.0 branch (but does on mashups).&lt;br /&gt;
&lt;br /&gt;
* The Provenance browser doesn't contain newly executed workflows unless I exit VisTrails and restart (it doesn't update).  Perhaps that is because I can't save the file???&lt;br /&gt;
&lt;br /&gt;
* Are the objects that appear in the bottom half of the workspace tab associated with execution provenance?  It is not clear to me what they are for.  It seems a new one appears after I save a new file and stays there permanently.  Clicking on them doesn't seem to do much.  Are they just for information?&lt;br /&gt;
&lt;br /&gt;
=== Juliana's notes about the mashup functionality ===&lt;br /&gt;
* Since it is not possible to create aliases with the current 2.0, I used 1.6 to create aliases for brain.vt. But when I loaded brain.vt into the 2.0 version and selected the mashup inspector, no aliases were shown [JF] My bad: it works!&lt;br /&gt;
&lt;br /&gt;
* When I save a mashup, where is it saved? Should it be displayed under the &amp;quot;List&amp;quot; tab in the mashup inspector?&lt;br /&gt;
** [ES] The mashups are saved when you save the vistrail. When you tag a mashup it is added to the list.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;I changed a tag for a mashup, and clicked &amp;quot;save&amp;quot;. But the new tag was not displayed in the &amp;quot;List&amp;quot;.&amp;lt;/del&amp;gt;&lt;br /&gt;
** [ES] There was a problem with the signals that were not being caught. You don't have to save. Just changing a tag should put it in the list.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;In the &amp;quot;List&amp;quot;, will I be able to select a previously created mashup and change it?&amp;lt;/del&amp;gt;&lt;br /&gt;
** [ES] Yes, this is working in the current mashups branch&lt;br /&gt;
 &lt;br /&gt;
* What is the difference between the &amp;quot;Save&amp;quot; and the &amp;quot;Update&amp;quot;? &lt;br /&gt;
** [ES] In the mashup preview tab, pressing &amp;quot;Update&amp;quot; will run the pipeline with the values filled in the gui. It doesn't change anything in the mashup. I am still not sure what to do with the &amp;quot;save&amp;quot; button. I just wanted a button where the user could tell that he wants that mashup to be in the list, but for that he can just tag the mashup on inspector. What do you think?&lt;br /&gt;
** [JF] From the interface, it is not clear that by just changing the tag, the mashup will be saved. Maybe, when the user hits save, if a tag has not been entered (i.e., the default tag is being used), we could prompt the user to enter a tag name? Also, while editing the mashup using the inspector, it might be better to have the name of the workflow on the top, don't you think? (and the mashup tag right below).&lt;br /&gt;
&lt;br /&gt;
* [JF] Should we have a special widget for entering file names?&lt;br /&gt;
* [JF] How do I view the actual mashup interface? And how to I execute the mashup on my laptop?&lt;br /&gt;
&lt;br /&gt;
* I made some changes to the &amp;quot;Alias Details&amp;quot; and then clicked on &amp;quot;Save&amp;quot; and then &amp;quot;Preview&amp;quot;, nothing happened. After I clicked on these two buttons a few times, the workflow executed, but the actual mashup preview was not displayed.&lt;br /&gt;
** [ES] I am working on fixing this now.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;It would be nice if it were possible to center and resize the workflow to fit in the window (cmd-shift-R)&amp;lt;/del&amp;gt;&lt;br /&gt;
** [ES] This is supported in the current mashups branch (I haven't built a new binary yet)&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=Undocumented_Features&amp;diff=4128</id>
		<title>Undocumented Features</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=Undocumented_Features&amp;diff=4128"/>
		<updated>2011-05-23T14:01:05Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Features that should be added to the VisTrails Users' Guide&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;del&amp;gt;Many items in the [http://www.vistrails.org/index.php/FAQ FAQ] &amp;lt;/del&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;New syntax for specifying modules in packages (&amp;lt;code&amp;gt;_input_ports&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;_output_ports&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;_modules&amp;lt;/code&amp;gt;)&amp;lt;/del&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Shortcuts for specifying ports (default to current package, allow 'edu.utah.sci.vistrails.basic' to shorten to 'basic')&amp;lt;/del&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Manipulate workflows via the shell (&amp;lt;code&amp;gt;load_package&amp;lt;/code&amp;gt; and then add modules, connections, and parameters)&amp;lt;/del&amp;gt;&lt;br /&gt;
* Better docs on groups/subworkflows and some integration with control flow&lt;br /&gt;
* Publication tools (&amp;lt;del&amp;gt;embed in LaTeX&amp;lt;/del&amp;gt;, PowerPoint)&lt;br /&gt;
* crowdLabs publishing&lt;br /&gt;
* &amp;lt;del&amp;gt;Merge documentation (Tommy's code to merge vistrails)&amp;lt;/del&amp;gt;&lt;br /&gt;
* &amp;lt;del&amp;gt;Persistence package documentation and general tips on data management with VisTrails&amp;lt;/del&amp;gt;&lt;br /&gt;
* Vistrail/workflow browser documentation&lt;br /&gt;
&lt;br /&gt;
* ...&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=4124</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=4124"/>
		<updated>2011-05-22T02:00:13Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* Integrating your software into VisTrails */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt; [http://www.vistrails.org/usersguide/batch.html#running-a-specific-workflow-in-batch-mode Running a Specific Workflow in Batch Mode]&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines. [http://www.vistrails.org/usersguide/batch.html#running-a-workflow-with-specific-parameters Running a Workflow with Specific Parameters]&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never. [http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path. [http://www.vistrails.org/usersguide/batch.html#executing-workflows-in-parallel Executing Workflows in Parallel]&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.  [http://www.vistrails.org/usersguide/creating.html#changing-module-labels Changing Module Labels]&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.  [http://www.vistrails.org/usersguide/getting_started.html#vistrails-interaction Vistrails Interaction]&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.  [http://www.vistrails.org/usersguide/querying.html#textual-queries Textual Queries]&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically &lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#generating-modules-dynamically Generating Modules Dynamically]&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
===How do I add a port that is not visible on the module (when it appears on the design canvas)?===&lt;br /&gt;
&lt;br /&gt;
This can be accomplished via the &amp;quot;optional&amp;quot; argument.  This is the fourth argument of add_input_port (add_output_port) or can be specified as a kwarg.  In your example, this would look like:&lt;br /&gt;
&lt;br /&gt;
 reg.add_input_port(MyModule, &amp;quot;MyPort&amp;quot;, (core.modules.basic_modules.String, 'MyPort Name'), True)&lt;br /&gt;
&lt;br /&gt;
or with kwargs&lt;br /&gt;
&lt;br /&gt;
 reg.add_input_port(MyModule, &amp;quot;MyPort&amp;quot;, (core.modules.basic_modules.String, 'MyPort Name'),\&lt;br /&gt;
                    optional=True)&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 _input_ports = [('MyPort', '(core.modules.basic_modules.String)', {&amp;quot;optional&amp;quot;: True})]&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports]&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The spreadsheet package uses this feature, so look there for usage examples (vistrails/packages/spreadsheet/basic_widgets.py)&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports]&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-modules Configuring Modules - Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-modules Configuring Modules - Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
=== Are there shortcuts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#customizing-modules-and-ports Customizing Modules and Ports]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports - Port Types]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#creating-reloadable-packages Creating Reloadable Packages]&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports - Default Values and Labels]&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Varying Output According to the Input]&lt;br /&gt;
&lt;br /&gt;
=== I need to determine, at run-time, whether or not a &amp;quot;child&amp;quot; module is attached to the output port of a &amp;quot;parent&amp;quot; module.  (I do not specifically need to know which child; just if there is one). ===&lt;br /&gt;
&lt;br /&gt;
The outputPorts dictionary of the base Module stores this information.  Thus, you should be able to check&lt;br /&gt;
&lt;br /&gt;
 (&amp;quot;myPortName&amp;quot; in self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
on the parent module to check if there are any downstream connections from the port &amp;quot;myPortName&amp;quot;.  This might be used, for example, to only set results for output ports that will be used.  ***Note***, however, that the caching algorithm assumes that all outputs are set so adding a new connection to a previously unconnected output port will not work as desired if that module is cached.  For this reason, I would currently recommend making such a module not cacheable.  Another possibility is overriding the update() method to check the outputPorts and set the upToDate flag if they are not equal.  In a single, limited test, this seemed to work, but be warned that it is not fully tested.  Here is an example:&lt;br /&gt;
&lt;br /&gt;
 class TestModule(Module):&lt;br /&gt;
     _output_ports = [('a1', '(edu.utah.sci.vistrails.basic:String)'),&lt;br /&gt;
                      ('a2', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
     def __init__(self):&lt;br /&gt;
         Module.__init__(self)&lt;br /&gt;
         self._cached_output_ports = set()&lt;br /&gt;
     &lt;br /&gt;
     def update(self):&lt;br /&gt;
         if len(set(self.outputPorts) - self._cached_output_ports) &amp;gt; 0:&lt;br /&gt;
             self.upToDate = False&lt;br /&gt;
         Module.update(self)&lt;br /&gt;
     &lt;br /&gt;
     def compute(self):&lt;br /&gt;
         if &amp;quot;a1&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a1&amp;quot;, &amp;quot;test&amp;quot;)&lt;br /&gt;
         if &amp;quot;a2&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a2&amp;quot;, &amp;quot;test2&amp;quot;)&lt;br /&gt;
         self._cached_output_ports = set(self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports - Determining Whether or Not a Module is Attached to an Output Port]&lt;br /&gt;
&lt;br /&gt;
=== How can I make a module not display in the modules list? ===&lt;br /&gt;
&lt;br /&gt;
You should set the abstract parameter to True when adding the module to the registry.  Using the original syntax, this looks like:&lt;br /&gt;
&lt;br /&gt;
 def initialize():&lt;br /&gt;
     reg = core.modules.module_registry.get_module_registry()&lt;br /&gt;
     reg.add_module(InvisibleModule, abstract=True)&lt;br /&gt;
     # ...&lt;br /&gt;
&lt;br /&gt;
With the _modules dictionary shortcut (for more details, see [http://www.vistrails.org/index.php/FAQ#Are_there_shortucts_for_registry_initialization.3F the FAQ section on this]), you include it in a kwargs dict as part of a module tuple:&lt;br /&gt;
&lt;br /&gt;
 _modules = [AnotherModule, (InvisibleModule, {'abstract': True})]&lt;br /&gt;
&lt;br /&gt;
There is also a 'hide_descriptor' parameter that prevents the module from appearing in the module palette without declaring it to be abstract.&lt;br /&gt;
&lt;br /&gt;
The technical difference between the two is that 'abstract' will not add the item to the module palette while 'hide_descriptor' does add the item but immediately hides it.  If the module should never be instantiated in a workflow, declare it abstract.  If you don't want users to be able to add the module to a pipeline, but you have code that may add it programmatically, declare it with hide_descriptor=True.&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-modules Configuring Modules - Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
[http://www.vistrails.org/usersguide/batch.html#finding-methods-via-the-command-line Finding Methods Via the Command Line]&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.  [http://www.vistrails.org/usersguide/log.html Accessing the Execution Log]&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=Version_2&amp;diff=4122</id>
		<title>Version 2</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=Version_2&amp;diff=4122"/>
		<updated>2011-05-21T18:59:41Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is setup to address and track issues with the new VisTrails 2.0 construction.  Please add comments or new issues to this page.&lt;br /&gt;
&lt;br /&gt;
=== Juliana's notes about new interface ===&lt;br /&gt;
&lt;br /&gt;
* It seems there are too many windows when we start VisTrails. What about only showing the main window? And fire the spreadsheet and inspector only when 'needed'? for the inspector, when a vt is open and a wf is selected, and for the spreadsheet when a workflow is run.&lt;br /&gt;
** [DK] What do you mean by windows?   The tabbed windows or the fact that there is a builder window, &amp;quot;utility&amp;quot; window, and a spreadsheet window?&lt;br /&gt;
** [JF] The latter: 3 windows popup when I start VisTrais: the builder, the inspector and the spreadsheet.&amp;lt;br&amp;gt;&lt;br /&gt;
** [DK] Many of the windows in the &amp;quot;utility&amp;quot; window are not dependent on a workflow (for example, the console and messages tabs).  We could however, not display them until a user asks to see the given view. &lt;br /&gt;
** [JF] This is what I meant.&lt;br /&gt;
&lt;br /&gt;
* I noticed that the picture-in-picture disappeared. I think that is helpful to give context. At least when we are displaying a workflow, it is useful to see the version tree.&lt;br /&gt;
** [DK] I think it was too small to be useful.  I can see the argument for being able to see both, but I think we need more real estate than the PIP had; perhaps we allow the History View to be shown as a tab on the left or as a detached view? &lt;br /&gt;
** [JF] the only issue here is whether this will be too ''busy''&lt;br /&gt;
** [DK] It is, arguably, the same amount of business as the PIP, however.&lt;br /&gt;
* We need some indication of which workflow is being displayed. Somewhere, we should display the label that identifies the workflow&lt;br /&gt;
** [DK] In the v2.0 branch, the tab shows this.  I have it display &amp;quot;Pipeline: alias&amp;quot; or &amp;quot;Pipeline: ROOT + 3&amp;quot;. [JF] Ok.&lt;br /&gt;
** [ES] Dave, it doesn't show anymore. I remember seeing the tab before, but I've just checked out v2.0 and I can't see it either.&lt;br /&gt;
** [DK] Right, when there is only a single tab, I hide the tab bar.  You can see the titles when if you create a new view (Ctrl/Cmd+T)&lt;br /&gt;
&lt;br /&gt;
* When I click on the workflow tab (in the main window,lower left corner) it always shows an &amp;quot;untitled.vt&amp;quot;. This looks like a bug... And if I click on  untitled.vt, nothing happens.&lt;br /&gt;
** [DK] Yes, Emanuele mentioned this at the meeting.  I'm also not happy with the current interface.&lt;br /&gt;
&lt;br /&gt;
=== Dave's List ===&lt;br /&gt;
&lt;br /&gt;
* Reduce size of palette names so they don't take so much space&lt;br /&gt;
&lt;br /&gt;
* Set default palettes for diff, other views&lt;br /&gt;
&lt;br /&gt;
* Diff currently being shown as a pipeline.  Should we create a mode for this&lt;br /&gt;
&lt;br /&gt;
* Buttons in Messages window look bad on the Mac, don't need all of them now as well, I think&lt;br /&gt;
&lt;br /&gt;
* Missing callbacks for Merge and Control Flow Assistant menu items&lt;br /&gt;
&lt;br /&gt;
* Move execute button so it doesn't look like a mode&lt;br /&gt;
&lt;br /&gt;
* Aliases support for parameters.&lt;br /&gt;
** [DK] I really want to see old-style aliases finally go away with the globals for workflow and vistrails taking their place, but we can add them for now.&lt;br /&gt;
** [ES] I just added them in v2.0 branch.&lt;br /&gt;
&lt;br /&gt;
* How do we support functions that have no parameters in the new port configuration?&lt;br /&gt;
&lt;br /&gt;
* Do we need to worry about parameters with default values that won't be saved?  For example, a Boolean that we want set to False will not show as a set parameter currently because that is the default.  Same for an empty string...&lt;br /&gt;
&lt;br /&gt;
=== Claurissa's Notes ===&lt;br /&gt;
&lt;br /&gt;
* When you detach and close a tab from the Configure/Console/Documentation/Latex/Messages/etc. window, there is no way to get it back without restarting VisTrails.&lt;br /&gt;
&lt;br /&gt;
=== Juliana's notes about the mashup functionality ===&lt;br /&gt;
* Since it is not possible to create aliases with the current 2.0, I used 1.6 to create aliases for brain.vt. But when I loaded brain.vt into the 2.0 version and selected the mashup inspector, no aliases were shown [JF] My bad: it works!&lt;br /&gt;
&lt;br /&gt;
* When I save a mashup, where is it saved? Should it be displayed under the &amp;quot;List&amp;quot; tab in the mashup inspector?&lt;br /&gt;
&lt;br /&gt;
* I changed a tag for a mashup, and clicked &amp;quot;save&amp;quot;. But the new tag was not displayed in the &amp;quot;List&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* In the &amp;quot;List&amp;quot;, will I be able to select a previously created mashup and change it?&lt;br /&gt;
&lt;br /&gt;
* What is the difference between the &amp;quot;Save&amp;quot; and the &amp;quot;Update&amp;quot;? &lt;br /&gt;
&lt;br /&gt;
* I made some changes to the &amp;quot;Alias Details&amp;quot; and then clicked on &amp;quot;Save&amp;quot; and then &amp;quot;Preview&amp;quot;, nothing happened. After I clicked on these two buttons a few times, the workflow executed, but the actual mashup preview was not displayed.&lt;br /&gt;
&lt;br /&gt;
* It would be nice if it were possible to center and resize the workflow to fit in the window (cmd-shift-R)&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=4116</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=4116"/>
		<updated>2011-05-21T16:50:10Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* How do I add a port that is not visible on the module (when it appears on the design canvas)? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt; [http://www.vistrails.org/usersguide/batch.html#running-a-specific-workflow-in-batch-mode Running a Specific Workflow in Batch Mode]&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines. [http://www.vistrails.org/usersguide/batch.html#running-a-workflow-with-specific-parameters Running a Workflow with Specific Parameters]&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never. [http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path. [http://www.vistrails.org/usersguide/batch.html#executing-workflows-in-parallel Executing Workflows in Parallel]&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.  [http://www.vistrails.org/usersguide/creating.html#changing-module-labels Changing Module Labels]&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.  [http://www.vistrails.org/usersguide/getting_started.html#vistrails-interaction Vistrails Interaction]&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.  [http://www.vistrails.org/usersguide/querying.html#textual-queries Textual Queries]&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically &lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#generating-modules-dynamically Generating Modules Dynamically]&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
===How do I add a port that is not visible on the module (when it appears on the design canvas)?===&lt;br /&gt;
&lt;br /&gt;
This can be accomplished via the &amp;quot;optional&amp;quot; argument.  This is the fourth argument of add_input_port (add_output_port) or can be specified as a kwarg.  In your example, this would look like:&lt;br /&gt;
&lt;br /&gt;
 reg.add_input_port(MyModule, &amp;quot;MyPort&amp;quot;, (core.modules.basic_modules.String, 'MyPort Name'), True)&lt;br /&gt;
&lt;br /&gt;
or with kwargs&lt;br /&gt;
&lt;br /&gt;
 reg.add_input_port(MyModule, &amp;quot;MyPort&amp;quot;, (core.modules.basic_modules.String, 'MyPort Name'),\&lt;br /&gt;
                    optional=True)&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 _input_ports = [('MyPort', '(core.modules.basic_modules.String)', {&amp;quot;optional&amp;quot;: True})]&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The spreadsheet package uses this feature, so look there for usage examples (vistrails/packages/spreadsheet/basic_widgets.py)&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports]&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-modules Configuring Modules - Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-modules Configuring Modules - Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
=== Are there shortcuts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#customizing-modules-and-ports Customizing Modules and Ports]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports - Port Types]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#creating-reloadable-packages Creating Reloadable Packages]&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports - Default Values and Labels]&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Varying Output According to the Input]&lt;br /&gt;
&lt;br /&gt;
=== I need to determine, at run-time, whether or not a &amp;quot;child&amp;quot; module is attached to the output port of a &amp;quot;parent&amp;quot; module.  (I do not specifically need to know which child; just if there is one). ===&lt;br /&gt;
&lt;br /&gt;
The outputPorts dictionary of the base Module stores this information.  Thus, you should be able to check&lt;br /&gt;
&lt;br /&gt;
 (&amp;quot;myPortName&amp;quot; in self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
on the parent module to check if there are any downstream connections from the port &amp;quot;myPortName&amp;quot;.  This might be used, for example, to only set results for output ports that will be used.  ***Note***, however, that the caching algorithm assumes that all outputs are set so adding a new connection to a previously unconnected output port will not work as desired if that module is cached.  For this reason, I would currently recommend making such a module not cacheable.  Another possibility is overriding the update() method to check the outputPorts and set the upToDate flag if they are not equal.  In a single, limited test, this seemed to work, but be warned that it is not fully tested.  Here is an example:&lt;br /&gt;
&lt;br /&gt;
 class TestModule(Module):&lt;br /&gt;
     _output_ports = [('a1', '(edu.utah.sci.vistrails.basic:String)'),&lt;br /&gt;
                      ('a2', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
     def __init__(self):&lt;br /&gt;
         Module.__init__(self)&lt;br /&gt;
         self._cached_output_ports = set()&lt;br /&gt;
     &lt;br /&gt;
     def update(self):&lt;br /&gt;
         if len(set(self.outputPorts) - self._cached_output_ports) &amp;gt; 0:&lt;br /&gt;
             self.upToDate = False&lt;br /&gt;
         Module.update(self)&lt;br /&gt;
     &lt;br /&gt;
     def compute(self):&lt;br /&gt;
         if &amp;quot;a1&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a1&amp;quot;, &amp;quot;test&amp;quot;)&lt;br /&gt;
         if &amp;quot;a2&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a2&amp;quot;, &amp;quot;test2&amp;quot;)&lt;br /&gt;
         self._cached_output_ports = set(self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports - Determining Whether or Not a Module is Attached to an Output Port]&lt;br /&gt;
&lt;br /&gt;
=== How can I make a module not display in the modules list? ===&lt;br /&gt;
&lt;br /&gt;
You should set the abstract parameter to True when adding the module to the registry.  Using the original syntax, this looks like:&lt;br /&gt;
&lt;br /&gt;
 def initialize():&lt;br /&gt;
     reg = core.modules.module_registry.get_module_registry()&lt;br /&gt;
     reg.add_module(InvisibleModule, abstract=True)&lt;br /&gt;
     # ...&lt;br /&gt;
&lt;br /&gt;
With the _modules dictionary shortcut (for more details, see [http://www.vistrails.org/index.php/FAQ#Are_there_shortucts_for_registry_initialization.3F the FAQ section on this]), you include it in a kwargs dict as part of a module tuple:&lt;br /&gt;
&lt;br /&gt;
 _modules = [AnotherModule, (InvisibleModule, {'abstract': True})]&lt;br /&gt;
&lt;br /&gt;
There is also a 'hide_descriptor' parameter that prevents the module from appearing in the module palette without declaring it to be abstract.&lt;br /&gt;
&lt;br /&gt;
The technical difference between the two is that 'abstract' will not add the item to the module palette while 'hide_descriptor' does add the item but immediately hides it.  If the module should never be instantiated in a workflow, declare it abstract.  If you don't want users to be able to add the module to a pipeline, but you have code that may add it programmatically, declare it with hide_descriptor=True.&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-modules Configuring Modules - Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
[http://www.vistrails.org/usersguide/batch.html#finding-methods-via-the-command-line Finding Methods Via the Command Line]&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.  [http://www.vistrails.org/usersguide/log.html Accessing the Execution Log]&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=4115</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=4115"/>
		<updated>2011-05-21T16:48:01Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* Integrating your software into VisTrails */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt; [http://www.vistrails.org/usersguide/batch.html#running-a-specific-workflow-in-batch-mode Running a Specific Workflow in Batch Mode]&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines. [http://www.vistrails.org/usersguide/batch.html#running-a-workflow-with-specific-parameters Running a Workflow with Specific Parameters]&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never. [http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path. [http://www.vistrails.org/usersguide/batch.html#executing-workflows-in-parallel Executing Workflows in Parallel]&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.  [http://www.vistrails.org/usersguide/creating.html#changing-module-labels Changing Module Labels]&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.  [http://www.vistrails.org/usersguide/getting_started.html#vistrails-interaction Vistrails Interaction]&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.  [http://www.vistrails.org/usersguide/querying.html#textual-queries Textual Queries]&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically &lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#generating-modules-dynamically Generating Modules Dynamically]&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
===How do I add a port that is not visible on the module (when it appears on the design canvas)?===&lt;br /&gt;
&lt;br /&gt;
This can be accomplished via the &amp;quot;optional&amp;quot; argument.  This is the fourth argument of add_input_port (add_output_port) or can be specified as a kwarg.  In your example, this would look like:&lt;br /&gt;
&lt;br /&gt;
 reg.add_input_port(MyModule, &amp;quot;MyPort&amp;quot;, (core.modules.basic_modules.String, 'MyPort Name'), True)&lt;br /&gt;
&lt;br /&gt;
or with kwargs&lt;br /&gt;
&lt;br /&gt;
 reg.add_input_port(MyModule, &amp;quot;MyPort&amp;quot;, (core.modules.basic_modules.String, 'MyPort Name'), optional=True)&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 _input_ports = [('MyPort', '(core.modules.basic_modules.String)', {&amp;quot;optional&amp;quot;: True})]&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The spreadsheet package uses this feature, so look there for usage examples (vistrails/packages/spreadsheet/basic_widgets.py)&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports]&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-modules Configuring Modules - Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-modules Configuring Modules - Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
=== Are there shortcuts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#customizing-modules-and-ports Customizing Modules and Ports]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports - Port Types]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#creating-reloadable-packages Creating Reloadable Packages]&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports - Default Values and Labels]&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Varying Output According to the Input]&lt;br /&gt;
&lt;br /&gt;
=== I need to determine, at run-time, whether or not a &amp;quot;child&amp;quot; module is attached to the output port of a &amp;quot;parent&amp;quot; module.  (I do not specifically need to know which child; just if there is one). ===&lt;br /&gt;
&lt;br /&gt;
The outputPorts dictionary of the base Module stores this information.  Thus, you should be able to check&lt;br /&gt;
&lt;br /&gt;
 (&amp;quot;myPortName&amp;quot; in self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
on the parent module to check if there are any downstream connections from the port &amp;quot;myPortName&amp;quot;.  This might be used, for example, to only set results for output ports that will be used.  ***Note***, however, that the caching algorithm assumes that all outputs are set so adding a new connection to a previously unconnected output port will not work as desired if that module is cached.  For this reason, I would currently recommend making such a module not cacheable.  Another possibility is overriding the update() method to check the outputPorts and set the upToDate flag if they are not equal.  In a single, limited test, this seemed to work, but be warned that it is not fully tested.  Here is an example:&lt;br /&gt;
&lt;br /&gt;
 class TestModule(Module):&lt;br /&gt;
     _output_ports = [('a1', '(edu.utah.sci.vistrails.basic:String)'),&lt;br /&gt;
                      ('a2', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
     def __init__(self):&lt;br /&gt;
         Module.__init__(self)&lt;br /&gt;
         self._cached_output_ports = set()&lt;br /&gt;
     &lt;br /&gt;
     def update(self):&lt;br /&gt;
         if len(set(self.outputPorts) - self._cached_output_ports) &amp;gt; 0:&lt;br /&gt;
             self.upToDate = False&lt;br /&gt;
         Module.update(self)&lt;br /&gt;
     &lt;br /&gt;
     def compute(self):&lt;br /&gt;
         if &amp;quot;a1&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a1&amp;quot;, &amp;quot;test&amp;quot;)&lt;br /&gt;
         if &amp;quot;a2&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a2&amp;quot;, &amp;quot;test2&amp;quot;)&lt;br /&gt;
         self._cached_output_ports = set(self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports - Determining Whether or Not a Module is Attached to an Output Port]&lt;br /&gt;
&lt;br /&gt;
=== How can I make a module not display in the modules list? ===&lt;br /&gt;
&lt;br /&gt;
You should set the abstract parameter to True when adding the module to the registry.  Using the original syntax, this looks like:&lt;br /&gt;
&lt;br /&gt;
 def initialize():&lt;br /&gt;
     reg = core.modules.module_registry.get_module_registry()&lt;br /&gt;
     reg.add_module(InvisibleModule, abstract=True)&lt;br /&gt;
     # ...&lt;br /&gt;
&lt;br /&gt;
With the _modules dictionary shortcut (for more details, see [http://www.vistrails.org/index.php/FAQ#Are_there_shortucts_for_registry_initialization.3F the FAQ section on this]), you include it in a kwargs dict as part of a module tuple:&lt;br /&gt;
&lt;br /&gt;
 _modules = [AnotherModule, (InvisibleModule, {'abstract': True})]&lt;br /&gt;
&lt;br /&gt;
There is also a 'hide_descriptor' parameter that prevents the module from appearing in the module palette without declaring it to be abstract.&lt;br /&gt;
&lt;br /&gt;
The technical difference between the two is that 'abstract' will not add the item to the module palette while 'hide_descriptor' does add the item but immediately hides it.  If the module should never be instantiated in a workflow, declare it abstract.  If you don't want users to be able to add the module to a pipeline, but you have code that may add it programmatically, declare it with hide_descriptor=True.&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-modules Configuring Modules - Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
[http://www.vistrails.org/usersguide/batch.html#finding-methods-via-the-command-line Finding Methods Via the Command Line]&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.  [http://www.vistrails.org/usersguide/log.html Accessing the Execution Log]&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=4114</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=4114"/>
		<updated>2011-05-21T16:40:46Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* Integrating your software into VisTrails */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt; [http://www.vistrails.org/usersguide/batch.html#running-a-specific-workflow-in-batch-mode Running a Specific Workflow in Batch Mode]&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines. [http://www.vistrails.org/usersguide/batch.html#running-a-workflow-with-specific-parameters Running a Workflow with Specific Parameters]&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never. [http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path. [http://www.vistrails.org/usersguide/batch.html#executing-workflows-in-parallel Executing Workflows in Parallel]&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.  [http://www.vistrails.org/usersguide/creating.html#changing-module-labels Changing Module Labels]&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.  [http://www.vistrails.org/usersguide/getting_started.html#vistrails-interaction Vistrails Interaction]&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.  [http://www.vistrails.org/usersguide/querying.html#textual-queries Textual Queries]&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically &lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#generating-modules-dynamically Generating Modules Dynamically]&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
===How do I add a port that is not visible on the module (when it appears on the design canvas)?===&lt;br /&gt;
&lt;br /&gt;
This can be accomplished via the &amp;quot;optional&amp;quot; argument.  This is the fourth argument of add_input_port (add_output_port) or can be specified as a kwarg.  In your example, this would look like:&lt;br /&gt;
&lt;br /&gt;
reg.add_input_port(MyModule, &amp;quot;MyPort&amp;quot;, (core.modules.basic_modules.String, 'MyPort Name'), True)&lt;br /&gt;
&lt;br /&gt;
or with kwargs&lt;br /&gt;
&lt;br /&gt;
reg.add_input_port(MyModule, &amp;quot;MyPort&amp;quot;, (core.modules.basic_modules.String, 'MyPort Name'), optional=True)&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
_input_ports = [('MyPort', '(core.modules.basic_modules.String)', {&amp;quot;optional&amp;quot;: True})]&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The spreadsheet package uses this feature, so look there for usage examples (vistrails/packages/spreadsheet/basic_widgets.py)&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports]&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-modules Configuring Modules - Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-modules Configuring Modules - Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
=== Are there shortcuts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#customizing-modules-and-ports Customizing Modules and Ports]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports - Port Types]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#creating-reloadable-packages Creating Reloadable Packages]&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports - Default Values and Labels]&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Varying Output According to the Input]&lt;br /&gt;
&lt;br /&gt;
=== I need to determine, at run-time, whether or not a &amp;quot;child&amp;quot; module is attached to the output port of a &amp;quot;parent&amp;quot; module.  (I do not specifically need to know which child; just if there is one). ===&lt;br /&gt;
&lt;br /&gt;
The outputPorts dictionary of the base Module stores this information.  Thus, you should be able to check&lt;br /&gt;
&lt;br /&gt;
 (&amp;quot;myPortName&amp;quot; in self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
on the parent module to check if there are any downstream connections from the port &amp;quot;myPortName&amp;quot;.  This might be used, for example, to only set results for output ports that will be used.  ***Note***, however, that the caching algorithm assumes that all outputs are set so adding a new connection to a previously unconnected output port will not work as desired if that module is cached.  For this reason, I would currently recommend making such a module not cacheable.  Another possibility is overriding the update() method to check the outputPorts and set the upToDate flag if they are not equal.  In a single, limited test, this seemed to work, but be warned that it is not fully tested.  Here is an example:&lt;br /&gt;
&lt;br /&gt;
 class TestModule(Module):&lt;br /&gt;
     _output_ports = [('a1', '(edu.utah.sci.vistrails.basic:String)'),&lt;br /&gt;
                      ('a2', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
     def __init__(self):&lt;br /&gt;
         Module.__init__(self)&lt;br /&gt;
         self._cached_output_ports = set()&lt;br /&gt;
     &lt;br /&gt;
     def update(self):&lt;br /&gt;
         if len(set(self.outputPorts) - self._cached_output_ports) &amp;gt; 0:&lt;br /&gt;
             self.upToDate = False&lt;br /&gt;
         Module.update(self)&lt;br /&gt;
     &lt;br /&gt;
     def compute(self):&lt;br /&gt;
         if &amp;quot;a1&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a1&amp;quot;, &amp;quot;test&amp;quot;)&lt;br /&gt;
         if &amp;quot;a2&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a2&amp;quot;, &amp;quot;test2&amp;quot;)&lt;br /&gt;
         self._cached_output_ports = set(self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports - Determining Whether or Not a Module is Attached to an Output Port]&lt;br /&gt;
&lt;br /&gt;
=== How can I make a module not display in the modules list? ===&lt;br /&gt;
&lt;br /&gt;
You should set the abstract parameter to True when adding the module to the registry.  Using the original syntax, this looks like:&lt;br /&gt;
&lt;br /&gt;
 def initialize():&lt;br /&gt;
     reg = core.modules.module_registry.get_module_registry()&lt;br /&gt;
     reg.add_module(InvisibleModule, abstract=True)&lt;br /&gt;
     # ...&lt;br /&gt;
&lt;br /&gt;
With the _modules dictionary shortcut (for more details, see [http://www.vistrails.org/index.php/FAQ#Are_there_shortucts_for_registry_initialization.3F the FAQ section on this]), you include it in a kwargs dict as part of a module tuple:&lt;br /&gt;
&lt;br /&gt;
 _modules = [AnotherModule, (InvisibleModule, {'abstract': True})]&lt;br /&gt;
&lt;br /&gt;
There is also a 'hide_descriptor' parameter that prevents the module from appearing in the module palette without declaring it to be abstract.&lt;br /&gt;
&lt;br /&gt;
The technical difference between the two is that 'abstract' will not add the item to the module palette while 'hide_descriptor' does add the item but immediately hides it.  If the module should never be instantiated in a workflow, declare it abstract.  If you don't want users to be able to add the module to a pipeline, but you have code that may add it programmatically, declare it with hide_descriptor=True.&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-modules Configuring Modules - Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
[http://www.vistrails.org/usersguide/batch.html#finding-methods-via-the-command-line Finding Methods Via the Command Line]&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.  [http://www.vistrails.org/usersguide/log.html Accessing the Execution Log]&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=Undocumented_Features&amp;diff=4053</id>
		<title>Undocumented Features</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=Undocumented_Features&amp;diff=4053"/>
		<updated>2011-05-16T15:07:45Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Features that should be added to the VisTrails Users' Guide&lt;br /&gt;
&lt;br /&gt;
* Many items in the [http://www.vistrails.org/index.php/FAQ FAQ] .&lt;br /&gt;
* New syntax for specifying modules in packages (&amp;lt;code&amp;gt;_input_ports&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;_output_ports&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;_modules&amp;lt;/code&amp;gt;).&lt;br /&gt;
* Shortcuts for specifying ports (default to current package, allow 'edu.utah.sci.vistrails.basic' to shorten to 'basic').&lt;br /&gt;
* Manipulate workflows via the shell (&amp;lt;code&amp;gt;load_package&amp;lt;/code&amp;gt; and then add modules, connections, and parameters)&lt;br /&gt;
* Better docs on groups/subworkflows and some integration with control flow&lt;br /&gt;
* Publication tools (embed in LaTeX, PowerPoint)&lt;br /&gt;
* crowdLabs publishing&lt;br /&gt;
* Merge documentation (Tommy's code to merge vistrails).&lt;br /&gt;
* Persistence package documentation and general tips on data management with VisTrails&lt;br /&gt;
* Vistrail/workflow browser documentation&lt;br /&gt;
&lt;br /&gt;
* ...&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=Undocumented_Features&amp;diff=4047</id>
		<title>Undocumented Features</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=Undocumented_Features&amp;diff=4047"/>
		<updated>2011-05-11T17:02:41Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Features that should be added to the VisTrails Users' Guide&lt;br /&gt;
&lt;br /&gt;
* Many items in the [http://www.vistrails.org/index.php/FAQ FAQ] .&lt;br /&gt;
* New syntax for specifying modules in packages (&amp;lt;code&amp;gt;_input_ports&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;_output_ports&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;_modules&amp;lt;/code&amp;gt;).&lt;br /&gt;
* Shortcuts for specifying ports (default to current package, allow 'edu.utah.sci.vistrails.basic' to shorten to 'basic').&lt;br /&gt;
* Manipulate workflows via the shell (&amp;lt;code&amp;gt;load_package&amp;lt;/code&amp;gt; and then add modules, connections, and parameters)&lt;br /&gt;
* Better docs on groups/subworkflows and some integration with control flow&lt;br /&gt;
* Publication tools (embed in LaTeX, PowerPoint)&lt;br /&gt;
* crowdLabs publishing&lt;br /&gt;
* Merge documentation (Tommy's code to merge vistrails)&lt;br /&gt;
* Persistence package documentation and general tips on data management with VisTrails&lt;br /&gt;
* Vistrail/workflow browser documentation&lt;br /&gt;
&lt;br /&gt;
* ...&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=3998</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=3998"/>
		<updated>2011-04-06T17:48:41Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* Integrating your software into VisTrails */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt; [http://www.vistrails.org/usersguide/batch.html#running-a-specific-workflow-in-batch-mode Running a Specific Workflow in Batch Mode]&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines. [http://www.vistrails.org/usersguide/batch.html#running-a-workflow-with-specific-parameters Running a Workflow with Specific Parameters]&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never. [http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path. [http://www.vistrails.org/usersguide/batch.html#executing-workflows-in-parallel Executing Workflows in Parallel]&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.  [http://www.vistrails.org/usersguide/creating.html#changing-module-labels Changing Module Labels]&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.  [http://www.vistrails.org/usersguide/getting_started.html#vistrails-interaction Vistrails Interaction]&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.  [http://www.vistrails.org/usersguide/querying.html#textual-queries Textual Queries]&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically &lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#generating-modules-dynamically Generating Modules Dynamically]&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The spreadsheet package uses this feature, so look there for usage examples (vistrails/packages/spreadsheet/basic_widgets.py)&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports]&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-modules Configuring Modules - Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-modules Configuring Modules - Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
=== Are there shortcuts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#customizing-modules-and-ports Customizing Modules and Ports]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports - Port Types]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#creating-reloadable-packages Creating Reloadable Packages]&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports - Default Values and Labels]&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Varying Output According to the Input]&lt;br /&gt;
&lt;br /&gt;
=== I need to determine, at run-time, whether or not a &amp;quot;child&amp;quot; module is attached to the output port of a &amp;quot;parent&amp;quot; module.  (I do not specifically need to know which child; just if there is one). ===&lt;br /&gt;
&lt;br /&gt;
The outputPorts dictionary of the base Module stores this information.  Thus, you should be able to check&lt;br /&gt;
&lt;br /&gt;
 (&amp;quot;myPortName&amp;quot; in self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
on the parent module to check if there are any downstream connections from the port &amp;quot;myPortName&amp;quot;.  This might be used, for example, to only set results for output ports that will be used.  ***Note***, however, that the caching algorithm assumes that all outputs are set so adding a new connection to a previously unconnected output port will not work as desired if that module is cached.  For this reason, I would currently recommend making such a module not cacheable.  Another possibility is overriding the update() method to check the outputPorts and set the upToDate flag if they are not equal.  In a single, limited test, this seemed to work, but be warned that it is not fully tested.  Here is an example:&lt;br /&gt;
&lt;br /&gt;
 class TestModule(Module):&lt;br /&gt;
     _output_ports = [('a1', '(edu.utah.sci.vistrails.basic:String)'),&lt;br /&gt;
                      ('a2', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
     def __init__(self):&lt;br /&gt;
         Module.__init__(self)&lt;br /&gt;
         self._cached_output_ports = set()&lt;br /&gt;
     &lt;br /&gt;
     def update(self):&lt;br /&gt;
         if len(set(self.outputPorts) - self._cached_output_ports) &amp;gt; 0:&lt;br /&gt;
             self.upToDate = False&lt;br /&gt;
         Module.update(self)&lt;br /&gt;
     &lt;br /&gt;
     def compute(self):&lt;br /&gt;
         if &amp;quot;a1&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a1&amp;quot;, &amp;quot;test&amp;quot;)&lt;br /&gt;
         if &amp;quot;a2&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a2&amp;quot;, &amp;quot;test2&amp;quot;)&lt;br /&gt;
         self._cached_output_ports = set(self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports - Determining Whether or Not a Module is Attached to an Output Port]&lt;br /&gt;
&lt;br /&gt;
=== How can I make a module not display in the modules list? ===&lt;br /&gt;
&lt;br /&gt;
You should set the abstract parameter to True when adding the module to the registry.  Using the original syntax, this looks like:&lt;br /&gt;
&lt;br /&gt;
 def initialize():&lt;br /&gt;
     reg = core.modules.module_registry.get_module_registry()&lt;br /&gt;
     reg.add_module(InvisibleModule, abstract=True)&lt;br /&gt;
     # ...&lt;br /&gt;
&lt;br /&gt;
With the _modules dictionary shortcut (for more details, see [http://www.vistrails.org/index.php/FAQ#Are_there_shortucts_for_registry_initialization.3F the FAQ section on this]), you include it in a kwargs dict as part of a module tuple:&lt;br /&gt;
&lt;br /&gt;
 _modules = [AnotherModule, (InvisibleModule, {'abstract': True})]&lt;br /&gt;
&lt;br /&gt;
There is also a 'hide_descriptor' parameter that prevents the module from appearing in the module palette without declaring it to be abstract.&lt;br /&gt;
&lt;br /&gt;
The technical difference between the two is that 'abstract' will not add the item to the module palette while 'hide_descriptor' does add the item but immediately hides it.  If the module should never be instantiated in a workflow, declare it abstract.  If you don't want users to be able to add the module to a pipeline, but you have code that may add it programmatically, declare it with hide_descriptor=True.&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-modules Configuring Modules - Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
[http://www.vistrails.org/usersguide/batch.html#finding-methods-via-the-command-line Finding Methods Via the Command Line]&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.  [http://www.vistrails.org/usersguide/log.html Accessing the Execution Log]&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=Documentation_Log&amp;diff=3997</id>
		<title>Documentation Log</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=Documentation_Log&amp;diff=3997"/>
		<updated>2011-04-06T05:26:16Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* Ideas */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Link to undocumented features:&lt;br /&gt;
http://www.vistrails.org/index.php/Undocumented_Features&lt;br /&gt;
&lt;br /&gt;
===Ideas===&lt;br /&gt;
*Separate the developer's guide from the user's guide.&lt;br /&gt;
*Create a tutorial for getting started quickly.&lt;br /&gt;
&lt;br /&gt;
===Questions===&lt;br /&gt;
Is registry.addInputPort(Divide, &amp;quot;arg1&amp;quot;, (basic.Float, 'dividend')) equivalent to:&lt;br /&gt;
_input_ports = [('arg1', '(edu.utah.sci.vistrails.basic:Float)', {&amp;quot;labels&amp;quot;: str([&amp;quot;dividend&amp;quot;])})]?&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=3984</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=3984"/>
		<updated>2011-04-01T00:33:24Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* Where should I go to find out what I can call from the console and how to import it? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt; [http://www.vistrails.org/usersguide/batch.html#running-a-specific-workflow-in-batch-mode Running a Specific Workflow in Batch Mode]&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines. [http://www.vistrails.org/usersguide/batch.html#running-a-workflow-with-specific-parameters Running a Workflow with Specific Parameters]&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never. [http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path. [http://www.vistrails.org/usersguide/batch.html#executing-workflows-in-parallel Executing Workflows in Parallel]&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.  [http://www.vistrails.org/usersguide/creating.html#changing-module-labels Changing Module Labels]&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.  [http://www.vistrails.org/usersguide/getting_started.html#vistrails-interaction Vistrails Interaction]&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.  [http://www.vistrails.org/usersguide/querying.html#textual-queries Textual Queries]&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The spreadsheet package uses this feature, so look there for usage examples (vistrails/packages/spreadsheet/basic_widgets.py)&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports]&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#module-hierarchy-and-visibility Module Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#module-hierarchy-and-visibility Module Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
=== Are there shortcuts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#options-for-configuring-modules-and-ports Options for Configuring Modules and Ports]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports]&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports]&lt;br /&gt;
&lt;br /&gt;
=== I need to determine, at run-time, whether or not a &amp;quot;child&amp;quot; module is attached to the output port of a &amp;quot;parent&amp;quot; module.  (I do not specifically need to know which child; just if there is one). ===&lt;br /&gt;
&lt;br /&gt;
The outputPorts dictionary of the base Module stores this information.  Thus, you should be able to check&lt;br /&gt;
&lt;br /&gt;
 (&amp;quot;myPortName&amp;quot; in self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
on the parent module to check if there are any downstream connections from the port &amp;quot;myPortName&amp;quot;.  This might be used, for example, to only set results for output ports that will be used.  ***Note***, however, that the caching algorithm assumes that all outputs are set so adding a new connection to a previously unconnected output port will not work as desired if that module is cached.  For this reason, I would currently recommend making such a module not cacheable.  Another possibility is overriding the update() method to check the outputPorts and set the upToDate flag if they are not equal.  In a single, limited test, this seemed to work, but be warned that it is not fully tested.  Here is an example:&lt;br /&gt;
&lt;br /&gt;
 class TestModule(Module):&lt;br /&gt;
     _output_ports = [('a1', '(edu.utah.sci.vistrails.basic:String)'),&lt;br /&gt;
                      ('a2', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
     def __init__(self):&lt;br /&gt;
         Module.__init__(self)&lt;br /&gt;
         self._cached_output_ports = set()&lt;br /&gt;
     &lt;br /&gt;
     def update(self):&lt;br /&gt;
         if len(set(self.outputPorts) - self._cached_output_ports) &amp;gt; 0:&lt;br /&gt;
             self.upToDate = False&lt;br /&gt;
         Module.update(self)&lt;br /&gt;
     &lt;br /&gt;
     def compute(self):&lt;br /&gt;
         if &amp;quot;a1&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a1&amp;quot;, &amp;quot;test&amp;quot;)&lt;br /&gt;
         if &amp;quot;a2&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a2&amp;quot;, &amp;quot;test2&amp;quot;)&lt;br /&gt;
         self._cached_output_ports = set(self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports]&lt;br /&gt;
&lt;br /&gt;
=== How can I make a module not display in the modules list? ===&lt;br /&gt;
&lt;br /&gt;
You should set the abstract parameter to True when adding the module to the registry.  Using the original syntax, this looks like:&lt;br /&gt;
&lt;br /&gt;
 def initialize():&lt;br /&gt;
     reg = core.modules.module_registry.get_module_registry()&lt;br /&gt;
     reg.add_module(InvisibleModule, abstract=True)&lt;br /&gt;
     # ...&lt;br /&gt;
&lt;br /&gt;
With the _modules dictionary shortcut (for more details, see [http://www.vistrails.org/index.php/FAQ#Are_there_shortucts_for_registry_initialization.3F the FAQ section on this]), you include it in a kwargs dict as part of a module tuple:&lt;br /&gt;
&lt;br /&gt;
 _modules = [AnotherModule, (InvisibleModule, {'abstract': True})]&lt;br /&gt;
&lt;br /&gt;
There is also a 'hide_descriptor' parameter that prevents the module from appearing in the module palette without declaring it to be abstract.&lt;br /&gt;
&lt;br /&gt;
The technical difference between the two is that 'abstract' will not add the item to the module palette while 'hide_descriptor' does add the item but immediately hides it.  If the module should never be instantiated in a workflow, declare it abstract.  If you don't want users to be able to add the module to a pipeline, but you have code that may add it programmatically, declare it with hide_descriptor=True.&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#module-hierarchy-and-visibility Module Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
[http://www.vistrails.org/usersguide/batch.html#finding-methods-via-the-command-line Finding Methods Via the Command Line]&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.  [http://www.vistrails.org/usersguide/log.html Accessing the Execution Log]&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=3983</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=3983"/>
		<updated>2011-04-01T00:22:52Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* I need to determine, at run-time, whether or not a &amp;quot;child&amp;quot; module is attached to the output port of a &amp;quot;parent&amp;quot; module.  (I do not specifically need to know which child; just if there is one). */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt; [http://www.vistrails.org/usersguide/batch.html#running-a-specific-workflow-in-batch-mode Running a Specific Workflow in Batch Mode]&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines. [http://www.vistrails.org/usersguide/batch.html#running-a-workflow-with-specific-parameters Running a Workflow with Specific Parameters]&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never. [http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path. [http://www.vistrails.org/usersguide/batch.html#executing-workflows-in-parallel Executing Workflows in Parallel]&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.  [http://www.vistrails.org/usersguide/creating.html#changing-module-labels Changing Module Labels]&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.  [http://www.vistrails.org/usersguide/getting_started.html#vistrails-interaction Vistrails Interaction]&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.  [http://www.vistrails.org/usersguide/querying.html#textual-queries Textual Queries]&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The spreadsheet package uses this feature, so look there for usage examples (vistrails/packages/spreadsheet/basic_widgets.py)&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports]&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#module-hierarchy-and-visibility Module Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#module-hierarchy-and-visibility Module Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
=== Are there shortcuts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#options-for-configuring-modules-and-ports Options for Configuring Modules and Ports]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports]&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports]&lt;br /&gt;
&lt;br /&gt;
=== I need to determine, at run-time, whether or not a &amp;quot;child&amp;quot; module is attached to the output port of a &amp;quot;parent&amp;quot; module.  (I do not specifically need to know which child; just if there is one). ===&lt;br /&gt;
&lt;br /&gt;
The outputPorts dictionary of the base Module stores this information.  Thus, you should be able to check&lt;br /&gt;
&lt;br /&gt;
 (&amp;quot;myPortName&amp;quot; in self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
on the parent module to check if there are any downstream connections from the port &amp;quot;myPortName&amp;quot;.  This might be used, for example, to only set results for output ports that will be used.  ***Note***, however, that the caching algorithm assumes that all outputs are set so adding a new connection to a previously unconnected output port will not work as desired if that module is cached.  For this reason, I would currently recommend making such a module not cacheable.  Another possibility is overriding the update() method to check the outputPorts and set the upToDate flag if they are not equal.  In a single, limited test, this seemed to work, but be warned that it is not fully tested.  Here is an example:&lt;br /&gt;
&lt;br /&gt;
 class TestModule(Module):&lt;br /&gt;
     _output_ports = [('a1', '(edu.utah.sci.vistrails.basic:String)'),&lt;br /&gt;
                      ('a2', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
     def __init__(self):&lt;br /&gt;
         Module.__init__(self)&lt;br /&gt;
         self._cached_output_ports = set()&lt;br /&gt;
     &lt;br /&gt;
     def update(self):&lt;br /&gt;
         if len(set(self.outputPorts) - self._cached_output_ports) &amp;gt; 0:&lt;br /&gt;
             self.upToDate = False&lt;br /&gt;
         Module.update(self)&lt;br /&gt;
     &lt;br /&gt;
     def compute(self):&lt;br /&gt;
         if &amp;quot;a1&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a1&amp;quot;, &amp;quot;test&amp;quot;)&lt;br /&gt;
         if &amp;quot;a2&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a2&amp;quot;, &amp;quot;test2&amp;quot;)&lt;br /&gt;
         self._cached_output_ports = set(self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports]&lt;br /&gt;
&lt;br /&gt;
=== How can I make a module not display in the modules list? ===&lt;br /&gt;
&lt;br /&gt;
You should set the abstract parameter to True when adding the module to the registry.  Using the original syntax, this looks like:&lt;br /&gt;
&lt;br /&gt;
 def initialize():&lt;br /&gt;
     reg = core.modules.module_registry.get_module_registry()&lt;br /&gt;
     reg.add_module(InvisibleModule, abstract=True)&lt;br /&gt;
     # ...&lt;br /&gt;
&lt;br /&gt;
With the _modules dictionary shortcut (for more details, see [http://www.vistrails.org/index.php/FAQ#Are_there_shortucts_for_registry_initialization.3F the FAQ section on this]), you include it in a kwargs dict as part of a module tuple:&lt;br /&gt;
&lt;br /&gt;
 _modules = [AnotherModule, (InvisibleModule, {'abstract': True})]&lt;br /&gt;
&lt;br /&gt;
There is also a 'hide_descriptor' parameter that prevents the module from appearing in the module palette without declaring it to be abstract.&lt;br /&gt;
&lt;br /&gt;
The technical difference between the two is that 'abstract' will not add the item to the module palette while 'hide_descriptor' does add the item but immediately hides it.  If the module should never be instantiated in a workflow, declare it abstract.  If you don't want users to be able to add the module to a pipeline, but you have code that may add it programmatically, declare it with hide_descriptor=True.&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#module-hierarchy-and-visibility Module Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.  [http://www.vistrails.org/usersguide/log.html Accessing the Execution Log]&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=3982</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=3982"/>
		<updated>2011-04-01T00:22:23Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* I need to determine, at run-time, whether or not a &amp;quot;child&amp;quot; module is attached to the output port of a &amp;quot;parent&amp;quot; module.  (I do not specifically need to know which child; just if there is one). */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt; [http://www.vistrails.org/usersguide/batch.html#running-a-specific-workflow-in-batch-mode Running a Specific Workflow in Batch Mode]&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines. [http://www.vistrails.org/usersguide/batch.html#running-a-workflow-with-specific-parameters Running a Workflow with Specific Parameters]&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never. [http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path. [http://www.vistrails.org/usersguide/batch.html#executing-workflows-in-parallel Executing Workflows in Parallel]&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.  [http://www.vistrails.org/usersguide/creating.html#changing-module-labels Changing Module Labels]&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.  [http://www.vistrails.org/usersguide/getting_started.html#vistrails-interaction Vistrails Interaction]&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.  [http://www.vistrails.org/usersguide/querying.html#textual-queries Textual Queries]&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The spreadsheet package uses this feature, so look there for usage examples (vistrails/packages/spreadsheet/basic_widgets.py)&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports]&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#module-hierarchy-and-visibility Module Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#module-hierarchy-and-visibility Module Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
=== Are there shortcuts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#options-for-configuring-modules-and-ports Options for Configuring Modules and Ports]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports]&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports]&lt;br /&gt;
&lt;br /&gt;
=== I need to determine, at run-time, whether or not a &amp;quot;child&amp;quot; module is attached to the output port of a &amp;quot;parent&amp;quot; module.  (I do not specifically need to know which child; just if there is one). ===&lt;br /&gt;
&lt;br /&gt;
The outputPorts dictionary of the base Module stores this information.  Thus, you should be able to check&lt;br /&gt;
&lt;br /&gt;
 (&amp;quot;myPortName&amp;quot; in self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
on the parent module to check if there are any downstream connections from the port &amp;quot;myPortName&amp;quot;.  This might be used, for example, to only set results for output ports that will be used.  ***Note***, however, that the caching algorithm assumes that all outputs are set so adding a new connection to a previously unconnected output port will not work as desired if that module is cached.  For this reason, I would currently recommend making such a module not cacheable.  Another possibility is overriding the update() method to check the outputPorts and set the upToDate flag if they are not equal.  In a single, limited test, this seemed to work, but be warned that it is not fully tested.  Here is an example:&lt;br /&gt;
&lt;br /&gt;
 class TestModule(Module):&lt;br /&gt;
     _output_ports = [('a1', '(edu.utah.sci.vistrails.basic:String)'),&lt;br /&gt;
                      ('a2', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
     def __init__(self):&lt;br /&gt;
         Module.__init__(self)&lt;br /&gt;
         self._cached_output_ports = set()&lt;br /&gt;
     &lt;br /&gt;
     def update(self):&lt;br /&gt;
         if len(set(self.outputPorts) - self._cached_output_ports) &amp;gt; 0:&lt;br /&gt;
             self.upToDate = False&lt;br /&gt;
         Module.update(self)&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports]&lt;br /&gt;
     &lt;br /&gt;
     def compute(self):&lt;br /&gt;
         if &amp;quot;a1&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a1&amp;quot;, &amp;quot;test&amp;quot;)&lt;br /&gt;
         if &amp;quot;a2&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a2&amp;quot;, &amp;quot;test2&amp;quot;)&lt;br /&gt;
         self._cached_output_ports = set(self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
=== How can I make a module not display in the modules list? ===&lt;br /&gt;
&lt;br /&gt;
You should set the abstract parameter to True when adding the module to the registry.  Using the original syntax, this looks like:&lt;br /&gt;
&lt;br /&gt;
 def initialize():&lt;br /&gt;
     reg = core.modules.module_registry.get_module_registry()&lt;br /&gt;
     reg.add_module(InvisibleModule, abstract=True)&lt;br /&gt;
     # ...&lt;br /&gt;
&lt;br /&gt;
With the _modules dictionary shortcut (for more details, see [http://www.vistrails.org/index.php/FAQ#Are_there_shortucts_for_registry_initialization.3F the FAQ section on this]), you include it in a kwargs dict as part of a module tuple:&lt;br /&gt;
&lt;br /&gt;
 _modules = [AnotherModule, (InvisibleModule, {'abstract': True})]&lt;br /&gt;
&lt;br /&gt;
There is also a 'hide_descriptor' parameter that prevents the module from appearing in the module palette without declaring it to be abstract.&lt;br /&gt;
&lt;br /&gt;
The technical difference between the two is that 'abstract' will not add the item to the module palette while 'hide_descriptor' does add the item but immediately hides it.  If the module should never be instantiated in a workflow, declare it abstract.  If you don't want users to be able to add the module to a pipeline, but you have code that may add it programmatically, declare it with hide_descriptor=True.&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#module-hierarchy-and-visibility Module Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.  [http://www.vistrails.org/usersguide/log.html Accessing the Execution Log]&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=3981</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=3981"/>
		<updated>2011-04-01T00:17:22Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connec&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt; [http://www.vistrails.org/usersguide/batch.html#running-a-specific-workflow-in-batch-mode Running a Specific Workflow in Batch Mode]&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines. [http://www.vistrails.org/usersguide/batch.html#running-a-workflow-with-specific-parameters Running a Workflow with Specific Parameters]&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never. [http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path. [http://www.vistrails.org/usersguide/batch.html#executing-workflows-in-parallel Executing Workflows in Parallel]&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.  [http://www.vistrails.org/usersguide/creating.html#changing-module-labels Changing Module Labels]&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.  [http://www.vistrails.org/usersguide/getting_started.html#vistrails-interaction Vistrails Interaction]&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.  [http://www.vistrails.org/usersguide/querying.html#textual-queries Textual Queries]&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The spreadsheet package uses this feature, so look there for usage examples (vistrails/packages/spreadsheet/basic_widgets.py)&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports]&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#module-hierarchy-and-visibility Module Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#module-hierarchy-and-visibility Module Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
=== Are there shortcuts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#options-for-configuring-modules-and-ports Options for Configuring Modules and Ports]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports]&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports]&lt;br /&gt;
&lt;br /&gt;
=== I need to determine, at run-time, whether or not a &amp;quot;child&amp;quot; module is attached to the output port of a &amp;quot;parent&amp;quot; module.  (I do not specifically need to know which child; just if there is one). ===&lt;br /&gt;
&lt;br /&gt;
The outputPorts dictionary of the base Module stores this information.  Thus, you should be able to check&lt;br /&gt;
&lt;br /&gt;
 (&amp;quot;myPortName&amp;quot; in self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
on the parent module to check if there are any downstream connections from the port &amp;quot;myPortName&amp;quot;.  This might be used, for example, to only set results for output ports that will be used.  ***Note***, however, that the caching algorithm assumes that all outputs are set so adding a new connection to a previously unconnected output port will not work as desired if that module is cached.  For this reason, I would currently recommend making such a module not cacheable.  Another possibility is overriding the update() method to check the outputPorts and set the upToDate flag if they are not equal.  In a single, limited test, this seemed to work, but be warned that it is not fully tested.  Here is an example:&lt;br /&gt;
&lt;br /&gt;
 class TestModule(Module):&lt;br /&gt;
     _output_ports = [('a1', '(edu.utah.sci.vistrails.basic:String)'),&lt;br /&gt;
                      ('a2', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
     def __init__(self):&lt;br /&gt;
         Module.__init__(self)&lt;br /&gt;
         self._cached_output_ports = set()&lt;br /&gt;
     &lt;br /&gt;
     def update(self):&lt;br /&gt;
         if len(set(self.outputPorts) - self._cached_output_ports) &amp;gt; 0:&lt;br /&gt;
             self.upToDate = False&lt;br /&gt;
         Module.update(self)&lt;br /&gt;
     &lt;br /&gt;
     def compute(self):&lt;br /&gt;
         if &amp;quot;a1&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a1&amp;quot;, &amp;quot;test&amp;quot;)&lt;br /&gt;
         if &amp;quot;a2&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a2&amp;quot;, &amp;quot;test2&amp;quot;)&lt;br /&gt;
         self._cached_output_ports = set(self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
=== How can I make a module not display in the modules list? ===&lt;br /&gt;
&lt;br /&gt;
You should set the abstract parameter to True when adding the module to the registry.  Using the original syntax, this looks like:&lt;br /&gt;
&lt;br /&gt;
 def initialize():&lt;br /&gt;
     reg = core.modules.module_registry.get_module_registry()&lt;br /&gt;
     reg.add_module(InvisibleModule, abstract=True)&lt;br /&gt;
     # ...&lt;br /&gt;
&lt;br /&gt;
With the _modules dictionary shortcut (for more details, see [http://www.vistrails.org/index.php/FAQ#Are_there_shortucts_for_registry_initialization.3F the FAQ section on this]), you include it in a kwargs dict as part of a module tuple:&lt;br /&gt;
&lt;br /&gt;
 _modules = [AnotherModule, (InvisibleModule, {'abstract': True})]&lt;br /&gt;
&lt;br /&gt;
There is also a 'hide_descriptor' parameter that prevents the module from appearing in the module palette without declaring it to be abstract.&lt;br /&gt;
&lt;br /&gt;
The technical difference between the two is that 'abstract' will not add the item to the module palette while 'hide_descriptor' does add the item but immediately hides it.  If the module should never be instantiated in a workflow, declare it abstract.  If you don't want users to be able to add the module to a pipeline, but you have code that may add it programmatically, declare it with hide_descriptor=True.&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#module-hierarchy-and-visibility Module Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.  [http://www.vistrails.org/usersguide/log.html Accessing the Execution Log]&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=3980</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=3980"/>
		<updated>2011-04-01T00:05:05Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* Can I define ports to be of types that I do not import into my package? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt; [http://www.vistrails.org/usersguide/batch.html#running-a-specific-workflow-in-batch-mode Running a Specific Workflow in Batch Mode]&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines. [http://www.vistrails.org/usersguide/batch.html#running-a-workflow-with-specific-parameters Running a Workflow with Specific Parameters]&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never. [http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path. [http://www.vistrails.org/usersguide/batch.html#executing-workflows-in-parallel Executing Workflows in Parallel]&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.  [http://www.vistrails.org/usersguide/creating.html#changing-module-labels Changing Module Labels]&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.  [http://www.vistrails.org/usersguide/getting_started.html#vistrails-interaction Vistrails Interaction]&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.  [http://www.vistrails.org/usersguide/querying.html#textual-queries Textual Queries]&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The spreadsheet package uses this feature, so look there for usage examples (vistrails/packages/spreadsheet/basic_widgets.py)&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports]&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#module-hierarchy-and-visibility Module Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#module-hierarchy-and-visibility Module Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
=== Are there shortcuts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#options-for-configuring-modules-and-ports Options for Configuring Modules and Ports]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports]&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
&lt;br /&gt;
=== I need to determine, at run-time, whether or not a &amp;quot;child&amp;quot; module is attached to the output port of a &amp;quot;parent&amp;quot; module.  (I do not specifically need to know which child; just if there is one). ===&lt;br /&gt;
&lt;br /&gt;
The outputPorts dictionary of the base Module stores this information.  Thus, you should be able to check&lt;br /&gt;
&lt;br /&gt;
 (&amp;quot;myPortName&amp;quot; in self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
on the parent module to check if there are any downstream connections from the port &amp;quot;myPortName&amp;quot;.  This might be used, for example, to only set results for output ports that will be used.  ***Note***, however, that the caching algorithm assumes that all outputs are set so adding a new connection to a previously unconnected output port will not work as desired if that module is cached.  For this reason, I would currently recommend making such a module not cacheable.  Another possibility is overriding the update() method to check the outputPorts and set the upToDate flag if they are not equal.  In a single, limited test, this seemed to work, but be warned that it is not fully tested.  Here is an example:&lt;br /&gt;
&lt;br /&gt;
 class TestModule(Module):&lt;br /&gt;
     _output_ports = [('a1', '(edu.utah.sci.vistrails.basic:String)'),&lt;br /&gt;
                      ('a2', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
     def __init__(self):&lt;br /&gt;
         Module.__init__(self)&lt;br /&gt;
         self._cached_output_ports = set()&lt;br /&gt;
     &lt;br /&gt;
     def update(self):&lt;br /&gt;
         if len(set(self.outputPorts) - self._cached_output_ports) &amp;gt; 0:&lt;br /&gt;
             self.upToDate = False&lt;br /&gt;
         Module.update(self)&lt;br /&gt;
     &lt;br /&gt;
     def compute(self):&lt;br /&gt;
         if &amp;quot;a1&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a1&amp;quot;, &amp;quot;test&amp;quot;)&lt;br /&gt;
         if &amp;quot;a2&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a2&amp;quot;, &amp;quot;test2&amp;quot;)&lt;br /&gt;
         self._cached_output_ports = set(self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
=== How can I make a module not display in the modules list? ===&lt;br /&gt;
&lt;br /&gt;
You should set the abstract parameter to True when adding the module to the registry.  Using the original syntax, this looks like:&lt;br /&gt;
&lt;br /&gt;
 def initialize():&lt;br /&gt;
     reg = core.modules.module_registry.get_module_registry()&lt;br /&gt;
     reg.add_module(InvisibleModule, abstract=True)&lt;br /&gt;
     # ...&lt;br /&gt;
&lt;br /&gt;
With the _modules dictionary shortcut (for more details, see [http://www.vistrails.org/index.php/FAQ#Are_there_shortucts_for_registry_initialization.3F the FAQ section on this]), you include it in a kwargs dict as part of a module tuple:&lt;br /&gt;
&lt;br /&gt;
 _modules = [AnotherModule, (InvisibleModule, {'abstract': True})]&lt;br /&gt;
&lt;br /&gt;
There is also a 'hide_descriptor' parameter that prevents the module from appearing in the module palette without declaring it to be abstract.&lt;br /&gt;
&lt;br /&gt;
The technical difference between the two is that 'abstract' will not add the item to the module palette while 'hide_descriptor' does add the item but immediately hides it.  If the module should never be instantiated in a workflow, declare it abstract.  If you don't want users to be able to add the module to a pipeline, but you have code that may add it programmatically, declare it with hide_descriptor=True.&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#module-hierarchy-and-visibility Module Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.  [http://www.vistrails.org/usersguide/log.html Accessing the Execution Log]&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=3979</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=3979"/>
		<updated>2011-03-31T23:54:44Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* How do modules deal with multiple inputs in a same port? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt; [http://www.vistrails.org/usersguide/batch.html#running-a-specific-workflow-in-batch-mode Running a Specific Workflow in Batch Mode]&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines. [http://www.vistrails.org/usersguide/batch.html#running-a-workflow-with-specific-parameters Running a Workflow with Specific Parameters]&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never. [http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path. [http://www.vistrails.org/usersguide/batch.html#executing-workflows-in-parallel Executing Workflows in Parallel]&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.  [http://www.vistrails.org/usersguide/creating.html#changing-module-labels Changing Module Labels]&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.  [http://www.vistrails.org/usersguide/getting_started.html#vistrails-interaction Vistrails Interaction]&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.  [http://www.vistrails.org/usersguide/querying.html#textual-queries Textual Queries]&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The spreadsheet package uses this feature, so look there for usage examples (vistrails/packages/spreadsheet/basic_widgets.py)&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports]&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#module-hierarchy-and-visibility Module Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#module-hierarchy-and-visibility Module Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
=== Are there shortcuts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#options-for-configuring-modules-and-ports Options for Configuring Modules and Ports]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports]&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
&lt;br /&gt;
=== I need to determine, at run-time, whether or not a &amp;quot;child&amp;quot; module is attached to the output port of a &amp;quot;parent&amp;quot; module.  (I do not specifically need to know which child; just if there is one). ===&lt;br /&gt;
&lt;br /&gt;
The outputPorts dictionary of the base Module stores this information.  Thus, you should be able to check&lt;br /&gt;
&lt;br /&gt;
 (&amp;quot;myPortName&amp;quot; in self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
on the parent module to check if there are any downstream connections from the port &amp;quot;myPortName&amp;quot;.  This might be used, for example, to only set results for output ports that will be used.  ***Note***, however, that the caching algorithm assumes that all outputs are set so adding a new connection to a previously unconnected output port will not work as desired if that module is cached.  For this reason, I would currently recommend making such a module not cacheable.  Another possibility is overriding the update() method to check the outputPorts and set the upToDate flag if they are not equal.  In a single, limited test, this seemed to work, but be warned that it is not fully tested.  Here is an example:&lt;br /&gt;
&lt;br /&gt;
 class TestModule(Module):&lt;br /&gt;
     _output_ports = [('a1', '(edu.utah.sci.vistrails.basic:String)'),&lt;br /&gt;
                      ('a2', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
     def __init__(self):&lt;br /&gt;
         Module.__init__(self)&lt;br /&gt;
         self._cached_output_ports = set()&lt;br /&gt;
     &lt;br /&gt;
     def update(self):&lt;br /&gt;
         if len(set(self.outputPorts) - self._cached_output_ports) &amp;gt; 0:&lt;br /&gt;
             self.upToDate = False&lt;br /&gt;
         Module.update(self)&lt;br /&gt;
     &lt;br /&gt;
     def compute(self):&lt;br /&gt;
         if &amp;quot;a1&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a1&amp;quot;, &amp;quot;test&amp;quot;)&lt;br /&gt;
         if &amp;quot;a2&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a2&amp;quot;, &amp;quot;test2&amp;quot;)&lt;br /&gt;
         self._cached_output_ports = set(self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
=== How can I make a module not display in the modules list? ===&lt;br /&gt;
&lt;br /&gt;
You should set the abstract parameter to True when adding the module to the registry.  Using the original syntax, this looks like:&lt;br /&gt;
&lt;br /&gt;
 def initialize():&lt;br /&gt;
     reg = core.modules.module_registry.get_module_registry()&lt;br /&gt;
     reg.add_module(InvisibleModule, abstract=True)&lt;br /&gt;
     # ...&lt;br /&gt;
&lt;br /&gt;
With the _modules dictionary shortcut (for more details, see [http://www.vistrails.org/index.php/FAQ#Are_there_shortucts_for_registry_initialization.3F the FAQ section on this]), you include it in a kwargs dict as part of a module tuple:&lt;br /&gt;
&lt;br /&gt;
 _modules = [AnotherModule, (InvisibleModule, {'abstract': True})]&lt;br /&gt;
&lt;br /&gt;
There is also a 'hide_descriptor' parameter that prevents the module from appearing in the module palette without declaring it to be abstract.&lt;br /&gt;
&lt;br /&gt;
The technical difference between the two is that 'abstract' will not add the item to the module palette while 'hide_descriptor' does add the item but immediately hides it.  If the module should never be instantiated in a workflow, declare it abstract.  If you don't want users to be able to add the module to a pipeline, but you have code that may add it programmatically, declare it with hide_descriptor=True.&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#module-hierarchy-and-visibility Module Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.  [http://www.vistrails.org/usersguide/log.html Accessing the Execution Log]&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=3978</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=3978"/>
		<updated>2011-03-31T23:50:07Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* Can I add default values or labels for parameters? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt; [http://www.vistrails.org/usersguide/batch.html#running-a-specific-workflow-in-batch-mode Running a Specific Workflow in Batch Mode]&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines. [http://www.vistrails.org/usersguide/batch.html#running-a-workflow-with-specific-parameters Running a Workflow with Specific Parameters]&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never. [http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path. [http://www.vistrails.org/usersguide/batch.html#executing-workflows-in-parallel Executing Workflows in Parallel]&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.  [http://www.vistrails.org/usersguide/creating.html#changing-module-labels Changing Module Labels]&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.  [http://www.vistrails.org/usersguide/getting_started.html#vistrails-interaction Vistrails Interaction]&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.  [http://www.vistrails.org/usersguide/querying.html#textual-queries Textual Queries]&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The spreadsheet package uses this feature, so look there for usage examples (vistrails/packages/spreadsheet/basic_widgets.py)&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#module-hierarchy-and-visibility Module Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#module-hierarchy-and-visibility Module Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
=== Are there shortcuts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#options-for-configuring-modules-and-ports Options for Configuring Modules and Ports]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#configuring-ports Configuring Ports]&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
&lt;br /&gt;
=== I need to determine, at run-time, whether or not a &amp;quot;child&amp;quot; module is attached to the output port of a &amp;quot;parent&amp;quot; module.  (I do not specifically need to know which child; just if there is one). ===&lt;br /&gt;
&lt;br /&gt;
The outputPorts dictionary of the base Module stores this information.  Thus, you should be able to check&lt;br /&gt;
&lt;br /&gt;
 (&amp;quot;myPortName&amp;quot; in self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
on the parent module to check if there are any downstream connections from the port &amp;quot;myPortName&amp;quot;.  This might be used, for example, to only set results for output ports that will be used.  ***Note***, however, that the caching algorithm assumes that all outputs are set so adding a new connection to a previously unconnected output port will not work as desired if that module is cached.  For this reason, I would currently recommend making such a module not cacheable.  Another possibility is overriding the update() method to check the outputPorts and set the upToDate flag if they are not equal.  In a single, limited test, this seemed to work, but be warned that it is not fully tested.  Here is an example:&lt;br /&gt;
&lt;br /&gt;
 class TestModule(Module):&lt;br /&gt;
     _output_ports = [('a1', '(edu.utah.sci.vistrails.basic:String)'),&lt;br /&gt;
                      ('a2', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
     def __init__(self):&lt;br /&gt;
         Module.__init__(self)&lt;br /&gt;
         self._cached_output_ports = set()&lt;br /&gt;
     &lt;br /&gt;
     def update(self):&lt;br /&gt;
         if len(set(self.outputPorts) - self._cached_output_ports) &amp;gt; 0:&lt;br /&gt;
             self.upToDate = False&lt;br /&gt;
         Module.update(self)&lt;br /&gt;
     &lt;br /&gt;
     def compute(self):&lt;br /&gt;
         if &amp;quot;a1&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a1&amp;quot;, &amp;quot;test&amp;quot;)&lt;br /&gt;
         if &amp;quot;a2&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a2&amp;quot;, &amp;quot;test2&amp;quot;)&lt;br /&gt;
         self._cached_output_ports = set(self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
=== How can I make a module not display in the modules list? ===&lt;br /&gt;
&lt;br /&gt;
You should set the abstract parameter to True when adding the module to the registry.  Using the original syntax, this looks like:&lt;br /&gt;
&lt;br /&gt;
 def initialize():&lt;br /&gt;
     reg = core.modules.module_registry.get_module_registry()&lt;br /&gt;
     reg.add_module(InvisibleModule, abstract=True)&lt;br /&gt;
     # ...&lt;br /&gt;
&lt;br /&gt;
With the _modules dictionary shortcut (for more details, see [http://www.vistrails.org/index.php/FAQ#Are_there_shortucts_for_registry_initialization.3F the FAQ section on this]), you include it in a kwargs dict as part of a module tuple:&lt;br /&gt;
&lt;br /&gt;
 _modules = [AnotherModule, (InvisibleModule, {'abstract': True})]&lt;br /&gt;
&lt;br /&gt;
There is also a 'hide_descriptor' parameter that prevents the module from appearing in the module palette without declaring it to be abstract.&lt;br /&gt;
&lt;br /&gt;
The technical difference between the two is that 'abstract' will not add the item to the module palette while 'hide_descriptor' does add the item but immediately hides it.  If the module should never be instantiated in a workflow, declare it abstract.  If you don't want users to be able to add the module to a pipeline, but you have code that may add it programmatically, declare it with hide_descriptor=True.&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#module-hierarchy-and-visibility Module Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.  [http://www.vistrails.org/usersguide/log.html Accessing the Execution Log]&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=3977</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=3977"/>
		<updated>2011-03-31T23:40:07Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* How can I make a module not display in the modules list? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt; [http://www.vistrails.org/usersguide/batch.html#running-a-specific-workflow-in-batch-mode Running a Specific Workflow in Batch Mode]&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines. [http://www.vistrails.org/usersguide/batch.html#running-a-workflow-with-specific-parameters Running a Workflow with Specific Parameters]&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never. [http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path. [http://www.vistrails.org/usersguide/batch.html#executing-workflows-in-parallel Executing Workflows in Parallel]&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.  [http://www.vistrails.org/usersguide/creating.html#changing-module-labels Changing Module Labels]&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.  [http://www.vistrails.org/usersguide/getting_started.html#vistrails-interaction Vistrails Interaction]&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.  [http://www.vistrails.org/usersguide/querying.html#textual-queries Textual Queries]&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The spreadsheet package uses this feature, so look there for usage examples (vistrails/packages/spreadsheet/basic_widgets.py)&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#module-hierarchy-and-visibility Module Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#module-hierarchy-and-visibility Module Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
=== Are there shortcuts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#options-for-configuring-modules-and-ports Options for Configuring Modules and Ports]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
&lt;br /&gt;
=== I need to determine, at run-time, whether or not a &amp;quot;child&amp;quot; module is attached to the output port of a &amp;quot;parent&amp;quot; module.  (I do not specifically need to know which child; just if there is one). ===&lt;br /&gt;
&lt;br /&gt;
The outputPorts dictionary of the base Module stores this information.  Thus, you should be able to check&lt;br /&gt;
&lt;br /&gt;
 (&amp;quot;myPortName&amp;quot; in self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
on the parent module to check if there are any downstream connections from the port &amp;quot;myPortName&amp;quot;.  This might be used, for example, to only set results for output ports that will be used.  ***Note***, however, that the caching algorithm assumes that all outputs are set so adding a new connection to a previously unconnected output port will not work as desired if that module is cached.  For this reason, I would currently recommend making such a module not cacheable.  Another possibility is overriding the update() method to check the outputPorts and set the upToDate flag if they are not equal.  In a single, limited test, this seemed to work, but be warned that it is not fully tested.  Here is an example:&lt;br /&gt;
&lt;br /&gt;
 class TestModule(Module):&lt;br /&gt;
     _output_ports = [('a1', '(edu.utah.sci.vistrails.basic:String)'),&lt;br /&gt;
                      ('a2', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
     def __init__(self):&lt;br /&gt;
         Module.__init__(self)&lt;br /&gt;
         self._cached_output_ports = set()&lt;br /&gt;
     &lt;br /&gt;
     def update(self):&lt;br /&gt;
         if len(set(self.outputPorts) - self._cached_output_ports) &amp;gt; 0:&lt;br /&gt;
             self.upToDate = False&lt;br /&gt;
         Module.update(self)&lt;br /&gt;
     &lt;br /&gt;
     def compute(self):&lt;br /&gt;
         if &amp;quot;a1&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a1&amp;quot;, &amp;quot;test&amp;quot;)&lt;br /&gt;
         if &amp;quot;a2&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a2&amp;quot;, &amp;quot;test2&amp;quot;)&lt;br /&gt;
         self._cached_output_ports = set(self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
=== How can I make a module not display in the modules list? ===&lt;br /&gt;
&lt;br /&gt;
You should set the abstract parameter to True when adding the module to the registry.  Using the original syntax, this looks like:&lt;br /&gt;
&lt;br /&gt;
 def initialize():&lt;br /&gt;
     reg = core.modules.module_registry.get_module_registry()&lt;br /&gt;
     reg.add_module(InvisibleModule, abstract=True)&lt;br /&gt;
     # ...&lt;br /&gt;
&lt;br /&gt;
With the _modules dictionary shortcut (for more details, see [http://www.vistrails.org/index.php/FAQ#Are_there_shortucts_for_registry_initialization.3F the FAQ section on this]), you include it in a kwargs dict as part of a module tuple:&lt;br /&gt;
&lt;br /&gt;
 _modules = [AnotherModule, (InvisibleModule, {'abstract': True})]&lt;br /&gt;
&lt;br /&gt;
There is also a 'hide_descriptor' parameter that prevents the module from appearing in the module palette without declaring it to be abstract.&lt;br /&gt;
&lt;br /&gt;
The technical difference between the two is that 'abstract' will not add the item to the module palette while 'hide_descriptor' does add the item but immediately hides it.  If the module should never be instantiated in a workflow, declare it abstract.  If you don't want users to be able to add the module to a pipeline, but you have code that may add it programmatically, declare it with hide_descriptor=True.&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#module-hierarchy-and-visibility Module Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.  [http://www.vistrails.org/usersguide/log.html Accessing the Execution Log]&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=3976</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=3976"/>
		<updated>2011-03-31T23:38:48Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* Are there shortcuts for registry initialization? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt; [http://www.vistrails.org/usersguide/batch.html#running-a-specific-workflow-in-batch-mode Running a Specific Workflow in Batch Mode]&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines. [http://www.vistrails.org/usersguide/batch.html#running-a-workflow-with-specific-parameters Running a Workflow with Specific Parameters]&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never. [http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path. [http://www.vistrails.org/usersguide/batch.html#executing-workflows-in-parallel Executing Workflows in Parallel]&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.  [http://www.vistrails.org/usersguide/creating.html#changing-module-labels Changing Module Labels]&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.  [http://www.vistrails.org/usersguide/getting_started.html#vistrails-interaction Vistrails Interaction]&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.  [http://www.vistrails.org/usersguide/querying.html#textual-queries Textual Queries]&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The spreadsheet package uses this feature, so look there for usage examples (vistrails/packages/spreadsheet/basic_widgets.py)&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#module-hierarchy-and-visibility Module Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#module-hierarchy-and-visibility Module Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
=== Are there shortcuts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#options-for-configuring-modules-and-ports Options for Configuring Modules and Ports]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
&lt;br /&gt;
=== I need to determine, at run-time, whether or not a &amp;quot;child&amp;quot; module is attached to the output port of a &amp;quot;parent&amp;quot; module.  (I do not specifically need to know which child; just if there is one). ===&lt;br /&gt;
&lt;br /&gt;
The outputPorts dictionary of the base Module stores this information.  Thus, you should be able to check&lt;br /&gt;
&lt;br /&gt;
 (&amp;quot;myPortName&amp;quot; in self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
on the parent module to check if there are any downstream connections from the port &amp;quot;myPortName&amp;quot;.  This might be used, for example, to only set results for output ports that will be used.  ***Note***, however, that the caching algorithm assumes that all outputs are set so adding a new connection to a previously unconnected output port will not work as desired if that module is cached.  For this reason, I would currently recommend making such a module not cacheable.  Another possibility is overriding the update() method to check the outputPorts and set the upToDate flag if they are not equal.  In a single, limited test, this seemed to work, but be warned that it is not fully tested.  Here is an example:&lt;br /&gt;
&lt;br /&gt;
 class TestModule(Module):&lt;br /&gt;
     _output_ports = [('a1', '(edu.utah.sci.vistrails.basic:String)'),&lt;br /&gt;
                      ('a2', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
     def __init__(self):&lt;br /&gt;
         Module.__init__(self)&lt;br /&gt;
         self._cached_output_ports = set()&lt;br /&gt;
     &lt;br /&gt;
     def update(self):&lt;br /&gt;
         if len(set(self.outputPorts) - self._cached_output_ports) &amp;gt; 0:&lt;br /&gt;
             self.upToDate = False&lt;br /&gt;
         Module.update(self)&lt;br /&gt;
     &lt;br /&gt;
     def compute(self):&lt;br /&gt;
         if &amp;quot;a1&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a1&amp;quot;, &amp;quot;test&amp;quot;)&lt;br /&gt;
         if &amp;quot;a2&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a2&amp;quot;, &amp;quot;test2&amp;quot;)&lt;br /&gt;
         self._cached_output_ports = set(self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
=== How can I make a module not display in the modules list? ===&lt;br /&gt;
&lt;br /&gt;
You should set the abstract parameter to True when adding the module to the registry.  Using the original syntax, this looks like:&lt;br /&gt;
&lt;br /&gt;
 def initialize():&lt;br /&gt;
     reg = core.modules.module_registry.get_module_registry()&lt;br /&gt;
     reg.add_module(InvisibleModule, abstract=True)&lt;br /&gt;
     # ...&lt;br /&gt;
&lt;br /&gt;
With the _modules dictionary shortcut (for more details, see [http://www.vistrails.org/index.php/FAQ#Are_there_shortucts_for_registry_initialization.3F the FAQ section on this]), you include it in a kwargs dict as part of a module tuple:&lt;br /&gt;
&lt;br /&gt;
 _modules = [AnotherModule, (InvisibleModule, {'abstract': True})]&lt;br /&gt;
&lt;br /&gt;
There is also a 'hide_descriptor' parameter that prevents the module from appearing in the module palette without declaring it to be abstract.&lt;br /&gt;
&lt;br /&gt;
The technical difference between the two is that 'abstract' will not add the item to the module palette while 'hide_descriptor' does add the item but immediately hides it.  If the module should never be instantiated in a workflow, declare it abstract.  If you don't want users to be able to add the module to a pipeline, but you have code that may add it programmatically, declare it with hide_descriptor=True.&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.  [http://www.vistrails.org/usersguide/log.html Accessing the Execution Log]&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=3975</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=3975"/>
		<updated>2011-03-31T23:37:17Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* Can I nest namespaces? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt; [http://www.vistrails.org/usersguide/batch.html#running-a-specific-workflow-in-batch-mode Running a Specific Workflow in Batch Mode]&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines. [http://www.vistrails.org/usersguide/batch.html#running-a-workflow-with-specific-parameters Running a Workflow with Specific Parameters]&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never. [http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path. [http://www.vistrails.org/usersguide/batch.html#executing-workflows-in-parallel Executing Workflows in Parallel]&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.  [http://www.vistrails.org/usersguide/creating.html#changing-module-labels Changing Module Labels]&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.  [http://www.vistrails.org/usersguide/getting_started.html#vistrails-interaction Vistrails Interaction]&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.  [http://www.vistrails.org/usersguide/querying.html#textual-queries Textual Queries]&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The spreadsheet package uses this feature, so look there for usage examples (vistrails/packages/spreadsheet/basic_widgets.py)&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#module-hierarchy-and-visibility Module Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#module-hierarchy-and-visibility Module Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
=== Are there shortcuts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
&lt;br /&gt;
=== I need to determine, at run-time, whether or not a &amp;quot;child&amp;quot; module is attached to the output port of a &amp;quot;parent&amp;quot; module.  (I do not specifically need to know which child; just if there is one). ===&lt;br /&gt;
&lt;br /&gt;
The outputPorts dictionary of the base Module stores this information.  Thus, you should be able to check&lt;br /&gt;
&lt;br /&gt;
 (&amp;quot;myPortName&amp;quot; in self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
on the parent module to check if there are any downstream connections from the port &amp;quot;myPortName&amp;quot;.  This might be used, for example, to only set results for output ports that will be used.  ***Note***, however, that the caching algorithm assumes that all outputs are set so adding a new connection to a previously unconnected output port will not work as desired if that module is cached.  For this reason, I would currently recommend making such a module not cacheable.  Another possibility is overriding the update() method to check the outputPorts and set the upToDate flag if they are not equal.  In a single, limited test, this seemed to work, but be warned that it is not fully tested.  Here is an example:&lt;br /&gt;
&lt;br /&gt;
 class TestModule(Module):&lt;br /&gt;
     _output_ports = [('a1', '(edu.utah.sci.vistrails.basic:String)'),&lt;br /&gt;
                      ('a2', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
     def __init__(self):&lt;br /&gt;
         Module.__init__(self)&lt;br /&gt;
         self._cached_output_ports = set()&lt;br /&gt;
     &lt;br /&gt;
     def update(self):&lt;br /&gt;
         if len(set(self.outputPorts) - self._cached_output_ports) &amp;gt; 0:&lt;br /&gt;
             self.upToDate = False&lt;br /&gt;
         Module.update(self)&lt;br /&gt;
     &lt;br /&gt;
     def compute(self):&lt;br /&gt;
         if &amp;quot;a1&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a1&amp;quot;, &amp;quot;test&amp;quot;)&lt;br /&gt;
         if &amp;quot;a2&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a2&amp;quot;, &amp;quot;test2&amp;quot;)&lt;br /&gt;
         self._cached_output_ports = set(self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
=== How can I make a module not display in the modules list? ===&lt;br /&gt;
&lt;br /&gt;
You should set the abstract parameter to True when adding the module to the registry.  Using the original syntax, this looks like:&lt;br /&gt;
&lt;br /&gt;
 def initialize():&lt;br /&gt;
     reg = core.modules.module_registry.get_module_registry()&lt;br /&gt;
     reg.add_module(InvisibleModule, abstract=True)&lt;br /&gt;
     # ...&lt;br /&gt;
&lt;br /&gt;
With the _modules dictionary shortcut (for more details, see [http://www.vistrails.org/index.php/FAQ#Are_there_shortucts_for_registry_initialization.3F the FAQ section on this]), you include it in a kwargs dict as part of a module tuple:&lt;br /&gt;
&lt;br /&gt;
 _modules = [AnotherModule, (InvisibleModule, {'abstract': True})]&lt;br /&gt;
&lt;br /&gt;
There is also a 'hide_descriptor' parameter that prevents the module from appearing in the module palette without declaring it to be abstract.&lt;br /&gt;
&lt;br /&gt;
The technical difference between the two is that 'abstract' will not add the item to the module palette while 'hide_descriptor' does add the item but immediately hides it.  If the module should never be instantiated in a workflow, declare it abstract.  If you don't want users to be able to add the module to a pipeline, but you have code that may add it programmatically, declare it with hide_descriptor=True.&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.  [http://www.vistrails.org/usersguide/log.html Accessing the Execution Log]&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=3974</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=3974"/>
		<updated>2011-03-31T23:37:00Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* Can I organize my package so it appears hierarchical in the module palette? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt; [http://www.vistrails.org/usersguide/batch.html#running-a-specific-workflow-in-batch-mode Running a Specific Workflow in Batch Mode]&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines. [http://www.vistrails.org/usersguide/batch.html#running-a-workflow-with-specific-parameters Running a Workflow with Specific Parameters]&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never. [http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path. [http://www.vistrails.org/usersguide/batch.html#executing-workflows-in-parallel Executing Workflows in Parallel]&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.  [http://www.vistrails.org/usersguide/creating.html#changing-module-labels Changing Module Labels]&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.  [http://www.vistrails.org/usersguide/getting_started.html#vistrails-interaction Vistrails Interaction]&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.  [http://www.vistrails.org/usersguide/querying.html#textual-queries Textual Queries]&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The spreadsheet package uses this feature, so look there for usage examples (vistrails/packages/spreadsheet/basic_widgets.py)&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
[http://www.vistrails.org/usersguide/packages.html#module-hierarchy-and-visibility Module Hierarchy and Visibility]&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Are there shortcuts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
&lt;br /&gt;
=== I need to determine, at run-time, whether or not a &amp;quot;child&amp;quot; module is attached to the output port of a &amp;quot;parent&amp;quot; module.  (I do not specifically need to know which child; just if there is one). ===&lt;br /&gt;
&lt;br /&gt;
The outputPorts dictionary of the base Module stores this information.  Thus, you should be able to check&lt;br /&gt;
&lt;br /&gt;
 (&amp;quot;myPortName&amp;quot; in self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
on the parent module to check if there are any downstream connections from the port &amp;quot;myPortName&amp;quot;.  This might be used, for example, to only set results for output ports that will be used.  ***Note***, however, that the caching algorithm assumes that all outputs are set so adding a new connection to a previously unconnected output port will not work as desired if that module is cached.  For this reason, I would currently recommend making such a module not cacheable.  Another possibility is overriding the update() method to check the outputPorts and set the upToDate flag if they are not equal.  In a single, limited test, this seemed to work, but be warned that it is not fully tested.  Here is an example:&lt;br /&gt;
&lt;br /&gt;
 class TestModule(Module):&lt;br /&gt;
     _output_ports = [('a1', '(edu.utah.sci.vistrails.basic:String)'),&lt;br /&gt;
                      ('a2', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
     def __init__(self):&lt;br /&gt;
         Module.__init__(self)&lt;br /&gt;
         self._cached_output_ports = set()&lt;br /&gt;
     &lt;br /&gt;
     def update(self):&lt;br /&gt;
         if len(set(self.outputPorts) - self._cached_output_ports) &amp;gt; 0:&lt;br /&gt;
             self.upToDate = False&lt;br /&gt;
         Module.update(self)&lt;br /&gt;
     &lt;br /&gt;
     def compute(self):&lt;br /&gt;
         if &amp;quot;a1&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a1&amp;quot;, &amp;quot;test&amp;quot;)&lt;br /&gt;
         if &amp;quot;a2&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a2&amp;quot;, &amp;quot;test2&amp;quot;)&lt;br /&gt;
         self._cached_output_ports = set(self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
=== How can I make a module not display in the modules list? ===&lt;br /&gt;
&lt;br /&gt;
You should set the abstract parameter to True when adding the module to the registry.  Using the original syntax, this looks like:&lt;br /&gt;
&lt;br /&gt;
 def initialize():&lt;br /&gt;
     reg = core.modules.module_registry.get_module_registry()&lt;br /&gt;
     reg.add_module(InvisibleModule, abstract=True)&lt;br /&gt;
     # ...&lt;br /&gt;
&lt;br /&gt;
With the _modules dictionary shortcut (for more details, see [http://www.vistrails.org/index.php/FAQ#Are_there_shortucts_for_registry_initialization.3F the FAQ section on this]), you include it in a kwargs dict as part of a module tuple:&lt;br /&gt;
&lt;br /&gt;
 _modules = [AnotherModule, (InvisibleModule, {'abstract': True})]&lt;br /&gt;
&lt;br /&gt;
There is also a 'hide_descriptor' parameter that prevents the module from appearing in the module palette without declaring it to be abstract.&lt;br /&gt;
&lt;br /&gt;
The technical difference between the two is that 'abstract' will not add the item to the module palette while 'hide_descriptor' does add the item but immediately hides it.  If the module should never be instantiated in a workflow, declare it abstract.  If you don't want users to be able to add the module to a pipeline, but you have code that may add it programmatically, declare it with hide_descriptor=True.&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.  [http://www.vistrails.org/usersguide/log.html Accessing the Execution Log]&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=3964</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=3964"/>
		<updated>2011-03-31T16:09:50Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connec&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt; [http://www.vistrails.org/usersguide/batch.html#running-a-specific-workflow-in-batch-mode Running a Specific Workflow in Batch Mode]&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines. [http://www.vistrails.org/usersguide/batch.html#running-a-workflow-with-specific-parameters Running a Workflow with Specific Parameters]&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never. [http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path. [http://www.vistrails.org/usersguide/batch.html#executing-workflows-in-parallel Executing Workflows in Parallel]&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.  [http://www.vistrails.org/usersguide/creating.html#changing-module-labels Changing Module Labels]&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.  [http://www.vistrails.org/usersguide/getting_started.html#vistrails-interaction Vistrails Interaction]&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.  [http://www.vistrails.org/usersguide/querying.html#textual-queries Textual Queries]&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The spreadsheet package uses this feature, so look there for usage examples (vistrails/packages/spreadsheet/basic_widgets.py)&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Are there shortcuts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
&lt;br /&gt;
=== I need to determine, at run-time, whether or not a &amp;quot;child&amp;quot; module is attached to the output port of a &amp;quot;parent&amp;quot; module.  (I do not specifically need to know which child; just if there is one). ===&lt;br /&gt;
&lt;br /&gt;
The outputPorts dictionary of the base Module stores this information.  Thus, you should be able to check&lt;br /&gt;
&lt;br /&gt;
 (&amp;quot;myPortName&amp;quot; in self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
on the parent module to check if there are any downstream connections from the port &amp;quot;myPortName&amp;quot;.  This might be used, for example, to only set results for output ports that will be used.  ***Note***, however, that the caching algorithm assumes that all outputs are set so adding a new connection to a previously unconnected output port will not work as desired if that module is cached.  For this reason, I would currently recommend making such a module not cacheable.  Another possibility is overriding the update() method to check the outputPorts and set the upToDate flag if they are not equal.  In a single, limited test, this seemed to work, but be warned that it is not fully tested.  Here is an example:&lt;br /&gt;
&lt;br /&gt;
 class TestModule(Module):&lt;br /&gt;
     _output_ports = [('a1', '(edu.utah.sci.vistrails.basic:String)'),&lt;br /&gt;
                      ('a2', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
     def __init__(self):&lt;br /&gt;
         Module.__init__(self)&lt;br /&gt;
         self._cached_output_ports = set()&lt;br /&gt;
     &lt;br /&gt;
     def update(self):&lt;br /&gt;
         if len(set(self.outputPorts) - self._cached_output_ports) &amp;gt; 0:&lt;br /&gt;
             self.upToDate = False&lt;br /&gt;
         Module.update(self)&lt;br /&gt;
     &lt;br /&gt;
     def compute(self):&lt;br /&gt;
         if &amp;quot;a1&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a1&amp;quot;, &amp;quot;test&amp;quot;)&lt;br /&gt;
         if &amp;quot;a2&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a2&amp;quot;, &amp;quot;test2&amp;quot;)&lt;br /&gt;
         self._cached_output_ports = set(self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
=== How can I make a module not display in the modules list? ===&lt;br /&gt;
&lt;br /&gt;
You should set the abstract parameter to True when adding the module to the registry.  Using the original syntax, this looks like:&lt;br /&gt;
&lt;br /&gt;
 def initialize():&lt;br /&gt;
     reg = core.modules.module_registry.get_module_registry()&lt;br /&gt;
     reg.add_module(InvisibleModule, abstract=True)&lt;br /&gt;
     # ...&lt;br /&gt;
&lt;br /&gt;
With the _modules dictionary shortcut (for more details, see [http://www.vistrails.org/index.php/FAQ#Are_there_shortucts_for_registry_initialization.3F the FAQ section on this]), you include it in a kwargs dict as part of a module tuple:&lt;br /&gt;
&lt;br /&gt;
 _modules = [AnotherModule, (InvisibleModule, {'abstract': True})]&lt;br /&gt;
&lt;br /&gt;
There is also a 'hide_descriptor' parameter that prevents the module from appearing in the module palette without declaring it to be abstract.&lt;br /&gt;
&lt;br /&gt;
The technical difference between the two is that 'abstract' will not add the item to the module palette while 'hide_descriptor' does add the item but immediately hides it.  If the module should never be instantiated in a workflow, declare it abstract.  If you don't want users to be able to add the module to a pipeline, but you have code that may add it programmatically, declare it with hide_descriptor=True.&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.  [http://www.vistrails.org/usersguide/log.html Accessing the Execution Log]&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=UsersGuideVisTrailsPackages&amp;diff=3963</id>
		<title>UsersGuideVisTrailsPackages</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=UsersGuideVisTrailsPackages&amp;diff=3963"/>
		<updated>2011-03-31T15:24:14Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* Adding default values and/or labels for parameters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
VisTrails provides a plugin infrastructure to integrate user-defined &lt;br /&gt;
functions and libraries.  Specifically, users can incorporate their own visualization and simulation codes into pipelines by defining custom modules (or wrappers). These modules are bundled in what we call '''packages'''. A VisTrails package is simply a collection of Python classes -- each of these classes will represent a new module -- created by the user that respects a certain convention. Here's a simplified example of a very simple user-defined module:&lt;br /&gt;
&lt;br /&gt;
 class Divide(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
         arg1 = self.getInputFromPort(&amp;quot;arg1&amp;quot;)&lt;br /&gt;
         arg2 = self.getInputFromPort(&amp;quot;arg2&amp;quot;)&lt;br /&gt;
         if arg2 == 0.0:&lt;br /&gt;
             raise ModuleError(self, &amp;quot;Division by zero&amp;quot;)&lt;br /&gt;
         self.setResult(&amp;quot;result&amp;quot;, arg1 / arg2)&lt;br /&gt;
 &lt;br /&gt;
 registry.addModule(Divide)&lt;br /&gt;
 registry.addInputPort(Divide, &amp;quot;arg1&amp;quot;, (basic.Float, 'dividend'))&lt;br /&gt;
 registry.addInputPort(Divide, &amp;quot;arg2&amp;quot;, (basic.Float, 'divisor'))&lt;br /&gt;
 registry.addOutputPort(Divide, &amp;quot;result&amp;quot;, (basic.Float, 'quotient'))&lt;br /&gt;
&lt;br /&gt;
New VisTrails modules must subclass from Module, the base class that defines basic functionality. The only required override is the &amp;lt;tt&amp;gt;compute()&amp;lt;/tt&amp;gt; method, which performs the actual module computation. Input and output is specified through ''ports'', which currently have to be explicitly registered with VisTrails. However, this is straightforward, and done through method calls to the module registry. A complete documented example of a (slightly) more complicated module is available [[VistrailsPackagePythonCalcExample | here]].&lt;br /&gt;
&lt;br /&gt;
== Dealing with command line tools and side effects ==&lt;br /&gt;
&lt;br /&gt;
In an ideal world a module's outputs should be completely determined by its inputs. This is important for provenance purposes - if modules have implicit dependencies, it is not possible to be certain that the same results will be generated when the process is reexecuted.&lt;br /&gt;
&lt;br /&gt;
However, it is clear that certain modules are inherently side-effectful (reading/writing files, network, etc). For the common case of temporary files, VisTrails provides a convenience layer that removes part of the burden of managing temporary files. As an illustrative example, consider one of the packages we make available for image conversion, using the [http://www.imagemagick.org/ ImageMagick] suite:&lt;br /&gt;
&lt;br /&gt;
 class Convert(ImageMagick):&lt;br /&gt;
     &amp;quot;&amp;quot;&amp;quot;Convert is the base Module for VisTrails Modules in the ImageMagick&lt;br /&gt;
 package that deal with operations on images. Convert is a bit of a misnomer since&lt;br /&gt;
 the 'convert' tool does more than simply file format conversion. Each subclass&lt;br /&gt;
 has a descriptive name of the operation it implements.&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
     def create_output_file(self):&lt;br /&gt;
         &amp;quot;&amp;quot;&amp;quot;Creates a File with the output format given by the&lt;br /&gt;
 outputFormat port.&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
         if self.hasInputFromPort('outputFormat'):&lt;br /&gt;
             s = '.' + self.getInputFromPort('outputFormat')&lt;br /&gt;
             return self.interpreter.filePool.create_file(suffix=s)&lt;br /&gt;
 &lt;br /&gt;
     def geometry_description(self):&lt;br /&gt;
         &amp;quot;&amp;quot;&amp;quot;returns a string with the description of the geometry as&lt;br /&gt;
 indicated by the appropriate ports (geometry or width and height)&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
         # if complete geometry is available, ignore rest&lt;br /&gt;
         if self.hasInputFromPort(&amp;quot;geometry&amp;quot;):&lt;br /&gt;
             return self.getInputFromPort(&amp;quot;geometry&amp;quot;)&lt;br /&gt;
         elif self.hasInputFromPort(&amp;quot;width&amp;quot;):&lt;br /&gt;
             w = self.getInputFromPort(&amp;quot;width&amp;quot;)&lt;br /&gt;
             h = self.getInputFromPort(&amp;quot;height&amp;quot;)&lt;br /&gt;
             return &amp;quot;'%sx%s'&amp;quot; % (w, h)&lt;br /&gt;
         else:&lt;br /&gt;
             raise ModuleError(self, &amp;quot;Needs geometry or width/height&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
     def run(self, *args):&lt;br /&gt;
         &amp;quot;&amp;quot;&amp;quot;run(*args), runs ImageMagick's 'convert' on a shell, passing all&lt;br /&gt;
 arguments to the program.&amp;quot;&amp;quot;&amp;quot;        &lt;br /&gt;
         cmdline = (&amp;quot;convert&amp;quot; + (&amp;quot; %s&amp;quot; * len(args))) % args&lt;br /&gt;
         if not self.__quiet:&lt;br /&gt;
             print cmdline&lt;br /&gt;
         r = os.system(cmdline)&lt;br /&gt;
         if r != 0:&lt;br /&gt;
             raise ModuleError(self, &amp;quot;system call failed: '%s'&amp;quot; % cmdline)&lt;br /&gt;
 &lt;br /&gt;
     def compute(self):&lt;br /&gt;
         o = self.create_output_file()&lt;br /&gt;
         i = self.input_file_description()&lt;br /&gt;
         self.run(i, o.name)&lt;br /&gt;
         self.setResult(&amp;quot;output&amp;quot;, o)&lt;br /&gt;
 &lt;br /&gt;
 (...)&lt;br /&gt;
 &lt;br /&gt;
     reg.addModule(Convert)&lt;br /&gt;
     reg.addInputPort(Convert, &amp;quot;geometry&amp;quot;, (basic.String, 'ImageMagick geometry'))&lt;br /&gt;
     reg.addInputPort(Convert, &amp;quot;width&amp;quot;, (basic.String, 'width of the geometry for operation'))&lt;br /&gt;
     reg.addInputPort(Convert, &amp;quot;height&amp;quot;, (basic.String, 'height of the geometry for operation'))&lt;br /&gt;
     reg.addOutputPort(Convert, &amp;quot;output&amp;quot;, (basic.File, 'the output file'))&lt;br /&gt;
&lt;br /&gt;
This example introduces several new VisTrails features. The last line of the snippet registers an output port that provides a file. Immediately, a file output presents several problems when a pipeline is to be shared among users in heterogenous environments. For example, where should a file be written to? For temporary files, VisTrails provides a ''file pool'' class, that manages temporary files and their lifetimes automatically, so that users don't have to worry about deleting them post-execution. To create a temporary file, a user calls, for example&lt;br /&gt;
&lt;br /&gt;
 fileObj = self.interpreter.filePool.create(suffix=&amp;quot;.png&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;fileObj&amp;lt;/tt&amp;gt; will then contain a module that represents a file. The file pool simply creates a temporary file with write permissions, whose local name is available, in this case, as &amp;lt;tt&amp;gt;fileObj.name&amp;lt;/tt&amp;gt;. The package developer is then free to use this file for any purpose.&lt;br /&gt;
&lt;br /&gt;
Another feature of this example is the use of command line tools. Notice that Python provides a very convenient way to execute commands through a shell. In this case, we use &amp;lt;tt&amp;gt;os.system&amp;lt;/tt&amp;gt; on a command-line that executes the appropriate program.&lt;br /&gt;
&lt;br /&gt;
== Interaction with Caching ==&lt;br /&gt;
&lt;br /&gt;
VisTrails provides a caching mechanism, in which portions of pipelines that are common across different executions are automatically shared. However, some modules are intrinsically side-effectful (writing a report to stdout, or a file to disk, or creating a user interface widget), and should not be shared. Caching control is therefore up to the package developer. By default, '''''caching is enabled'''''. So a developer that doesn't want caching to apply must make small changes to the module. There's a convenient way to disable caching entirely, by using multiple inheritance, and deriving from a ''mixin'' class that's provided by VisTrails. For example, look at the StandardOutput module:&lt;br /&gt;
&lt;br /&gt;
 from core.modules.vistrails_module import Module, newModule, \&lt;br /&gt;
     NotCacheable, ModuleError&lt;br /&gt;
 (...)&lt;br /&gt;
 class StandardOutput(NotCacheable, Module):&lt;br /&gt;
     &amp;quot;&amp;quot;&amp;quot;StandardOutput is a VisTrails Module that simply prints the&lt;br /&gt;
     value connected on its port to standard output. It is intended&lt;br /&gt;
     mostly as a debugging device.&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
     &lt;br /&gt;
     def compute(self):&lt;br /&gt;
         v = self.getInputFromPort(&amp;quot;value&amp;quot;)&lt;br /&gt;
         print v&lt;br /&gt;
&lt;br /&gt;
By subclassing from &amp;lt;tt&amp;gt;NotCacheable&amp;lt;/tt&amp;gt; as well as from Module (or one of its subclasses), VisTrails automatically will not cache this module, or anything downstream from it.&lt;br /&gt;
&lt;br /&gt;
VisTrails also allows a more sophisticated decision on whether to use caching or not. To do that, a user simply overrides the method &amp;lt;tt&amp;gt;is_cacheable&amp;lt;/tt&amp;gt; to return the correct value. This allows context-dependent decisions. For example, in the [http://teem.sourceforge.net teem] package, there's a module that generates a scalar field with random numbers. This is non-deterministic, so shouldn't be cached. However, this module only generates non-deterministic values in special occasions, depending on its input port values. To keep efficiency when caching is possible, while still maintaining correctness, that module implements the following override:&lt;br /&gt;
&lt;br /&gt;
 class Unu1op(Unu):&lt;br /&gt;
 (...)&lt;br /&gt;
     def is_cacheable(self):&lt;br /&gt;
         return not self.getInputFromPort('op') in ['rand', 'nrand']&lt;br /&gt;
 (...)&lt;br /&gt;
&lt;br /&gt;
Notice that the module explicitly uses inputs to decide whether it should be cached. This allows reasonably fine-grained control over the process.&lt;br /&gt;
&lt;br /&gt;
== Interaction with Other Packages ==&lt;br /&gt;
&lt;br /&gt;
When developing more complicated packages, it becomes natural to split code among different VisTrails packages, and have one logically depend on the other. For example, in one package (say, named ' ''package_base'' '), a user might define&lt;br /&gt;
&lt;br /&gt;
 class PackageBaseModule(Module):&lt;br /&gt;
  ...&lt;br /&gt;
&lt;br /&gt;
 def initialize():&lt;br /&gt;
  registry.addModule(PackageBaseModule)&lt;br /&gt;
  ...&lt;br /&gt;
&lt;br /&gt;
And then, in another package (say, ' ''package_derived'' '),&lt;br /&gt;
&lt;br /&gt;
 class DerivedModule(PackageBaseModule):&lt;br /&gt;
  ...&lt;br /&gt;
&lt;br /&gt;
 def initialize():&lt;br /&gt;
  registry.addModule(DerivedModule)&lt;br /&gt;
  ...&lt;br /&gt;
&lt;br /&gt;
Because of the way packages are loaded, ''package_derived'' cannot be initialized before ''package_base''. VisTrails provides a mechanism for specifying interpackage dependencies. Every VisTrails package can provide a list of necessary installed packages. This is done by providing a callable in the package under the name '''package_dependencies'''. For example, here's how the VTK VisTrails package declares dependencies:&lt;br /&gt;
&lt;br /&gt;
 def package_dependencies():&lt;br /&gt;
     import core.packagemanager&lt;br /&gt;
     manager = core.packagemanager.get_package_manager()&lt;br /&gt;
     if manager.has_package('spreadsheet'):&lt;br /&gt;
         return ['spreadsheet']&lt;br /&gt;
     else:&lt;br /&gt;
         return []&lt;br /&gt;
&lt;br /&gt;
The callable must return a list of strings, representing the name of the packages it depends on. We also use this example to introduce the package manager API, that is useful here for inspecting packages present in the system. Notice that the dependencies are not static. '''vtk''' depends on '''spreadsheet''' if and only if '''spreadsheet''' is present in the system. Otherwise, it has no dependencies.&lt;br /&gt;
&lt;br /&gt;
''Note'': Circular dependencies are not allowed. They will be detected by VisTrails and an error will be signalled.&lt;br /&gt;
&lt;br /&gt;
''Note'': Currently, package names are reasonably brittle, in the sense that conflicts in package naming might become an issue. We are in the process of designing an API that will allow more robust naming schemes.&lt;br /&gt;
&lt;br /&gt;
== User-defined module shapes and colors ==&lt;br /&gt;
&lt;br /&gt;
VisTrails allows users to define custom colors and shapes to modules. This must be done at module registration time, by passing special parameters to addModule. For example:&lt;br /&gt;
&lt;br /&gt;
 reg.addModule(Afront,&lt;br /&gt;
               moduleColor=(1.0,0.0,0.0),&lt;br /&gt;
               moduleFringe=[(0.0, 0.0),&lt;br /&gt;
                             (0.2, 0.0),&lt;br /&gt;
                             (0.2, 0.4),&lt;br /&gt;
                             (0.0, 0.4),&lt;br /&gt;
                             (0.0, 1.0)])&lt;br /&gt;
&lt;br /&gt;
gives this result:&lt;br /&gt;
&lt;br /&gt;
[[Image:PackageCustomColorShape1.png]]&lt;br /&gt;
&lt;br /&gt;
This piece of code&lt;br /&gt;
&lt;br /&gt;
 reg = core.modules.module_registry&lt;br /&gt;
 reg.addModule(Afront,&lt;br /&gt;
               moduleColor=(0.4,0.6,0.8),&lt;br /&gt;
               moduleFringe=[(0.0, 0.0),&lt;br /&gt;
                             (0.2, 0.0),&lt;br /&gt;
                             (0.0, 0.2),&lt;br /&gt;
                             (0.2, 0.4),&lt;br /&gt;
                             (0.0, 0.6),&lt;br /&gt;
                             (0.2, 0.8),&lt;br /&gt;
                             (0.0, 1.0)])&lt;br /&gt;
 &lt;br /&gt;
gives this result:&lt;br /&gt;
&lt;br /&gt;
[[Image:PackageCustomColorShape2.png]]&lt;br /&gt;
&lt;br /&gt;
The moduleColor parameter must be a tuple of three floats between 0 and 1 that specify RGB colors for the module background, while moduleFringe is a list of pairs of floats that specify points as they go around a side of the module (the same one is used to go from the top-right corner to bottom-right corner, and from the bottom-left corner to the top-left one. If this is not enough, let the developers know!)&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use different fringes for the left and right borders:&lt;br /&gt;
&lt;br /&gt;
    reg.addModule(Afront,&lt;br /&gt;
                  moduleColor=(1.0,0.8,0.6),&lt;br /&gt;
                  moduleLeftFringe=[(0.0, 0.0),&lt;br /&gt;
                                    (-0.2, 0.0),&lt;br /&gt;
                                    (0.0, 1.0)],&lt;br /&gt;
                  moduleRightFringe=[(0.0, 0.0),&lt;br /&gt;
                                     (0.2, 1.0),&lt;br /&gt;
                                     (0.0, 1.0)])&lt;br /&gt;
&lt;br /&gt;
which gives this:&lt;br /&gt;
&lt;br /&gt;
[[Image:PackageCustomColorShape3.png]]&lt;br /&gt;
&lt;br /&gt;
== How to make your package reloadable ==&lt;br /&gt;
&lt;br /&gt;
You need to move almost everything in the __init__.py file to a new file &amp;quot;init.py&amp;quot;, but keep the identifier, name, version, configuration, and package_dependencies fields/methods in the __init__.py file.  Specifically, make sure that imports (excluding things like core.configuration) and the initialize method are in the init.py file.  For example, take a look at the __init__.py file of the pylab package included in VisTrails:&lt;br /&gt;
&lt;br /&gt;
 identifier = 'edu.utah.sci.vistrails.matplotlib'&lt;br /&gt;
 name = 'matplotlib'&lt;br /&gt;
 version = '0.9.0'&lt;br /&gt;
&lt;br /&gt;
 def package_dependencies():&lt;br /&gt;
     import core.packagemanager&lt;br /&gt;
     manager = core.packagemanager.get_package_manager()&lt;br /&gt;
     if manager.has_package('edu.utah.sci.vistrails.spreadsheet'):&lt;br /&gt;
         return ['edu.utah.sci.vistrails.spreadsheet']&lt;br /&gt;
     else:&lt;br /&gt;
         return []&lt;br /&gt;
 &lt;br /&gt;
 def package_requirements():&lt;br /&gt;
     import core.requirements&lt;br /&gt;
     if not core.requirements.python_module_exists('matplotlib'):&lt;br /&gt;
         raise core.requirements.MissingRequirement('matplotlib')&lt;br /&gt;
     if not core.requirements.python_module_exists('pylab'):&lt;br /&gt;
         raise core.requirements.MissingRequirement('pylab')&lt;br /&gt;
&lt;br /&gt;
And the init.py contains the other imports, class definitions and the initialize method.&lt;br /&gt;
&lt;br /&gt;
== Adding default values and/or labels for parameters ==&lt;br /&gt;
&lt;br /&gt;
In versions 1.4 and greater, package developers can add labels and default values for parameters.  To add this functionality, you need to use the &amp;lt;code&amp;gt;defaults&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;labels&amp;lt;/code&amp;gt; keyword arguments and pass the values as '''strings'''.  For example,&lt;br /&gt;
&lt;br /&gt;
  class TestDefaults(Module):&lt;br /&gt;
      _input_ports = [(&amp;quot;f1&amp;quot;, &amp;quot;(edu.utah.sci.vistrails.basic:Float)&amp;quot;,&lt;br /&gt;
                       {&amp;quot;defaults&amp;quot;: str([1.23]), &amp;quot;labels&amp;quot;: str([&amp;quot;temp&amp;quot;])})]&lt;br /&gt;
  _modules = [TestDefaults]&lt;br /&gt;
&lt;br /&gt;
or in the older syntax,&lt;br /&gt;
&lt;br /&gt;
  def initialize():&lt;br /&gt;
      reg = core.modules.module_registry.get_module_registry()&lt;br /&gt;
      reg.add_module(TestDefaults2)&lt;br /&gt;
      reg.add_input_port(TestDefaults2, &amp;quot;f2&amp;quot;, [Float, String], &lt;br /&gt;
                         defaults=str([4.56, &amp;quot;abc&amp;quot;]), &lt;br /&gt;
                         labels=str([&amp;quot;temp&amp;quot;, &amp;quot;name&amp;quot;]))&lt;br /&gt;
&lt;br /&gt;
== Packages that generate modules dynamically ==&lt;br /&gt;
&lt;br /&gt;
When wrapping existing libraries or trying to generate modules in a more procedural manner, it is useful to dynamically generate modules.  In our work, we have created some shortcuts to make this easier.  In addition, the list of modules can also be based based on the package configuration.  Here is some example code:&lt;br /&gt;
&lt;br /&gt;
=== __init__.py ===&lt;br /&gt;
&lt;br /&gt;
  from core.configuration import ConfigurationObject&lt;br /&gt;
  &lt;br /&gt;
  identifier = &amp;quot;edu.utah.sci.dakoop.auto_example&amp;quot;&lt;br /&gt;
  version = &amp;quot;0.0.1&amp;quot;&lt;br /&gt;
  name = &amp;quot;AutoExample&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  configuration = ConfigurationObject(use_b=True)&lt;br /&gt;
&lt;br /&gt;
=== init.py ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;expand_ports&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;build_modules&amp;lt;/code&amp;gt; methods are functions to help the construction of the modules easier.  The key parts are the &amp;lt;code&amp;gt;new_module&amp;lt;/code&amp;gt; call and setting the &amp;lt;code&amp;gt;_modules&amp;lt;/code&amp;gt; variable.&lt;br /&gt;
&lt;br /&gt;
  from core.modules.vistrails_module import new_module, Module&lt;br /&gt;
  &lt;br /&gt;
  identifier = &amp;quot;edu.utah.sci.dakoop.auto_example&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  def expand_ports(port_list):&lt;br /&gt;
      new_port_list = []&lt;br /&gt;
      for port in port_list:&lt;br /&gt;
          port_spec = port[1]&lt;br /&gt;
          if type(port_spec) == str: # or unicode...&lt;br /&gt;
              if port_spec.startswith('('):&lt;br /&gt;
                  port_spec = port_spec[1:]&lt;br /&gt;
              if port_spec.endswith(')'):&lt;br /&gt;
                  port_spec = port_spec[:-1]&lt;br /&gt;
              new_spec_list = []&lt;br /&gt;
              for spec in port_spec.split(','):&lt;br /&gt;
                  spec = spec.strip()&lt;br /&gt;
                  parts = spec.split(':', 1)&lt;br /&gt;
                  print 'parts:', parts&lt;br /&gt;
                  namespace = None&lt;br /&gt;
                  if len(parts) &amp;gt; 1:&lt;br /&gt;
                      mod_parts = parts[1].rsplit('|', 1)&lt;br /&gt;
                      if len(mod_parts) &amp;gt; 1:&lt;br /&gt;
                          namespace, module_name = mod_parts&lt;br /&gt;
                      else:&lt;br /&gt;
                          module_name = parts[1]&lt;br /&gt;
                      if len(parts[0].split('.')) == 1:&lt;br /&gt;
                          id_str = 'edu.utah.sci.vistrails.' + parts[0]&lt;br /&gt;
                      else:&lt;br /&gt;
                          id_str = parts[0]&lt;br /&gt;
                  else:&lt;br /&gt;
                      mod_parts = spec.rsplit('|', 1)&lt;br /&gt;
                      if len(mod_parts) &amp;gt; 1:&lt;br /&gt;
                          namespace, module_name = mod_parts&lt;br /&gt;
                      else:&lt;br /&gt;
                          module_name = spec&lt;br /&gt;
                      id_str = identifier&lt;br /&gt;
                  if namespace:&lt;br /&gt;
                      new_spec_list.append(id_str + ':' + module_name + ':' + \&lt;br /&gt;
                                               namespace)&lt;br /&gt;
                  else:&lt;br /&gt;
                      new_spec_list.append(id_str + ':' + module_name)&lt;br /&gt;
              port_spec = '(' + ','.join(new_spec_list) + ')'&lt;br /&gt;
          new_port_list.append((port[0], port_spec) + port[2:])&lt;br /&gt;
      print new_port_list&lt;br /&gt;
      return new_port_list&lt;br /&gt;
  &lt;br /&gt;
  def build_modules(module_descs):&lt;br /&gt;
      new_classes = {}&lt;br /&gt;
      for m_name, m_dict in module_descs:&lt;br /&gt;
          m_doc = m_dict.get(&amp;quot;_doc&amp;quot;, None)&lt;br /&gt;
          m_inputs = m_dict.get(&amp;quot;_inputs&amp;quot;, [])&lt;br /&gt;
          m_outputs = m_dict.get(&amp;quot;_outputs&amp;quot;, [])&lt;br /&gt;
          if &amp;quot;_inputs&amp;quot; in m_dict:&lt;br /&gt;
              del m_dict[&amp;quot;_inputs&amp;quot;]&lt;br /&gt;
          if &amp;quot;_outputs&amp;quot; in m_dict:&lt;br /&gt;
              del m_dict[&amp;quot;_outputs&amp;quot;]&lt;br /&gt;
          if &amp;quot;_doc&amp;quot; in m_dict:&lt;br /&gt;
              del m_dict[&amp;quot;_doc&amp;quot;]&lt;br /&gt;
          klass_dict = {}&lt;br /&gt;
          if &amp;quot;_compute&amp;quot; in m_dict:&lt;br /&gt;
              klass_dict[&amp;quot;compute&amp;quot;] = m_dict[&amp;quot;_compute&amp;quot;]&lt;br /&gt;
              del m_dict[&amp;quot;_compute&amp;quot;]&lt;br /&gt;
          m_class = new_module(Module, m_name, klass_dict, m_doc)&lt;br /&gt;
          m_class._input_ports = expand_ports(m_inputs)&lt;br /&gt;
          m_class._output_ports = expand_ports(m_outputs)&lt;br /&gt;
          new_classes[m_name] = (m_class, m_dict)&lt;br /&gt;
      return new_classes.values()&lt;br /&gt;
  &lt;br /&gt;
  def initialize():&lt;br /&gt;
      global _modules&lt;br /&gt;
      def a_compute(self):&lt;br /&gt;
          a = self.getInputFromPort(&amp;quot;a&amp;quot;)&lt;br /&gt;
          i = 0&lt;br /&gt;
          if self.hasInputFromPort(&amp;quot;i&amp;quot;):&lt;br /&gt;
              i = self.getInputFromPort(&amp;quot;i&amp;quot;)&lt;br /&gt;
          if a == &amp;quot;abc&amp;quot;:&lt;br /&gt;
              i += 100&lt;br /&gt;
          self.setResult(&amp;quot;b&amp;quot;, i)&lt;br /&gt;
  &lt;br /&gt;
      module_descs = [(&amp;quot;ModuleA&amp;quot;, {&amp;quot;_inputs&amp;quot;: [(&amp;quot;a&amp;quot;, &amp;quot;basic:String&amp;quot;)],&lt;br /&gt;
                                   &amp;quot;_outputs&amp;quot;: [(&amp;quot;b&amp;quot;, &amp;quot;basic:Integer&amp;quot;)],&lt;br /&gt;
                                   &amp;quot;_doc&amp;quot;: &amp;quot;ModuleA documentation&amp;quot;,&lt;br /&gt;
                                   &amp;quot;_compute&amp;quot;: a_compute,&lt;br /&gt;
                                   &amp;quot;namespace&amp;quot;: &amp;quot;Test&amp;quot;}),&lt;br /&gt;
                      (&amp;quot;ModuleB&amp;quot;, {&amp;quot;_inputs&amp;quot;: [(&amp;quot;a&amp;quot;, &amp;quot;Test|ModuleA&amp;quot;)],&lt;br /&gt;
                                   &amp;quot;_outputs&amp;quot;: [(&amp;quot;b&amp;quot;, &amp;quot;Test|ModuleA&amp;quot;)],&lt;br /&gt;
                                   &amp;quot;_doc&amp;quot;: &amp;quot;ModuleB documentation&amp;quot;})&lt;br /&gt;
                      ]&lt;br /&gt;
  &lt;br /&gt;
      if configuration.use_b:&lt;br /&gt;
          _modules = build_modules(module_descs)&lt;br /&gt;
      else:&lt;br /&gt;
          _modules = build_modules(module_descs[:1])&lt;br /&gt;
  &lt;br /&gt;
  _modules = []&lt;br /&gt;
&lt;br /&gt;
== Help! This documentation wasn't good enough! ==&lt;br /&gt;
&lt;br /&gt;
Sorry, it's our fault! If you need help, join the vistrails-users list and post your question there.&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=UsersGuideVisTrailsPackages&amp;diff=3962</id>
		<title>UsersGuideVisTrailsPackages</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=UsersGuideVisTrailsPackages&amp;diff=3962"/>
		<updated>2011-03-31T15:23:14Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* How to make you package reloadable */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
VisTrails provides a plugin infrastructure to integrate user-defined &lt;br /&gt;
functions and libraries.  Specifically, users can incorporate their own visualization and simulation codes into pipelines by defining custom modules (or wrappers). These modules are bundled in what we call '''packages'''. A VisTrails package is simply a collection of Python classes -- each of these classes will represent a new module -- created by the user that respects a certain convention. Here's a simplified example of a very simple user-defined module:&lt;br /&gt;
&lt;br /&gt;
 class Divide(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
         arg1 = self.getInputFromPort(&amp;quot;arg1&amp;quot;)&lt;br /&gt;
         arg2 = self.getInputFromPort(&amp;quot;arg2&amp;quot;)&lt;br /&gt;
         if arg2 == 0.0:&lt;br /&gt;
             raise ModuleError(self, &amp;quot;Division by zero&amp;quot;)&lt;br /&gt;
         self.setResult(&amp;quot;result&amp;quot;, arg1 / arg2)&lt;br /&gt;
 &lt;br /&gt;
 registry.addModule(Divide)&lt;br /&gt;
 registry.addInputPort(Divide, &amp;quot;arg1&amp;quot;, (basic.Float, 'dividend'))&lt;br /&gt;
 registry.addInputPort(Divide, &amp;quot;arg2&amp;quot;, (basic.Float, 'divisor'))&lt;br /&gt;
 registry.addOutputPort(Divide, &amp;quot;result&amp;quot;, (basic.Float, 'quotient'))&lt;br /&gt;
&lt;br /&gt;
New VisTrails modules must subclass from Module, the base class that defines basic functionality. The only required override is the &amp;lt;tt&amp;gt;compute()&amp;lt;/tt&amp;gt; method, which performs the actual module computation. Input and output is specified through ''ports'', which currently have to be explicitly registered with VisTrails. However, this is straightforward, and done through method calls to the module registry. A complete documented example of a (slightly) more complicated module is available [[VistrailsPackagePythonCalcExample | here]].&lt;br /&gt;
&lt;br /&gt;
== Dealing with command line tools and side effects ==&lt;br /&gt;
&lt;br /&gt;
In an ideal world a module's outputs should be completely determined by its inputs. This is important for provenance purposes - if modules have implicit dependencies, it is not possible to be certain that the same results will be generated when the process is reexecuted.&lt;br /&gt;
&lt;br /&gt;
However, it is clear that certain modules are inherently side-effectful (reading/writing files, network, etc). For the common case of temporary files, VisTrails provides a convenience layer that removes part of the burden of managing temporary files. As an illustrative example, consider one of the packages we make available for image conversion, using the [http://www.imagemagick.org/ ImageMagick] suite:&lt;br /&gt;
&lt;br /&gt;
 class Convert(ImageMagick):&lt;br /&gt;
     &amp;quot;&amp;quot;&amp;quot;Convert is the base Module for VisTrails Modules in the ImageMagick&lt;br /&gt;
 package that deal with operations on images. Convert is a bit of a misnomer since&lt;br /&gt;
 the 'convert' tool does more than simply file format conversion. Each subclass&lt;br /&gt;
 has a descriptive name of the operation it implements.&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
     def create_output_file(self):&lt;br /&gt;
         &amp;quot;&amp;quot;&amp;quot;Creates a File with the output format given by the&lt;br /&gt;
 outputFormat port.&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
         if self.hasInputFromPort('outputFormat'):&lt;br /&gt;
             s = '.' + self.getInputFromPort('outputFormat')&lt;br /&gt;
             return self.interpreter.filePool.create_file(suffix=s)&lt;br /&gt;
 &lt;br /&gt;
     def geometry_description(self):&lt;br /&gt;
         &amp;quot;&amp;quot;&amp;quot;returns a string with the description of the geometry as&lt;br /&gt;
 indicated by the appropriate ports (geometry or width and height)&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
         # if complete geometry is available, ignore rest&lt;br /&gt;
         if self.hasInputFromPort(&amp;quot;geometry&amp;quot;):&lt;br /&gt;
             return self.getInputFromPort(&amp;quot;geometry&amp;quot;)&lt;br /&gt;
         elif self.hasInputFromPort(&amp;quot;width&amp;quot;):&lt;br /&gt;
             w = self.getInputFromPort(&amp;quot;width&amp;quot;)&lt;br /&gt;
             h = self.getInputFromPort(&amp;quot;height&amp;quot;)&lt;br /&gt;
             return &amp;quot;'%sx%s'&amp;quot; % (w, h)&lt;br /&gt;
         else:&lt;br /&gt;
             raise ModuleError(self, &amp;quot;Needs geometry or width/height&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
     def run(self, *args):&lt;br /&gt;
         &amp;quot;&amp;quot;&amp;quot;run(*args), runs ImageMagick's 'convert' on a shell, passing all&lt;br /&gt;
 arguments to the program.&amp;quot;&amp;quot;&amp;quot;        &lt;br /&gt;
         cmdline = (&amp;quot;convert&amp;quot; + (&amp;quot; %s&amp;quot; * len(args))) % args&lt;br /&gt;
         if not self.__quiet:&lt;br /&gt;
             print cmdline&lt;br /&gt;
         r = os.system(cmdline)&lt;br /&gt;
         if r != 0:&lt;br /&gt;
             raise ModuleError(self, &amp;quot;system call failed: '%s'&amp;quot; % cmdline)&lt;br /&gt;
 &lt;br /&gt;
     def compute(self):&lt;br /&gt;
         o = self.create_output_file()&lt;br /&gt;
         i = self.input_file_description()&lt;br /&gt;
         self.run(i, o.name)&lt;br /&gt;
         self.setResult(&amp;quot;output&amp;quot;, o)&lt;br /&gt;
 &lt;br /&gt;
 (...)&lt;br /&gt;
 &lt;br /&gt;
     reg.addModule(Convert)&lt;br /&gt;
     reg.addInputPort(Convert, &amp;quot;geometry&amp;quot;, (basic.String, 'ImageMagick geometry'))&lt;br /&gt;
     reg.addInputPort(Convert, &amp;quot;width&amp;quot;, (basic.String, 'width of the geometry for operation'))&lt;br /&gt;
     reg.addInputPort(Convert, &amp;quot;height&amp;quot;, (basic.String, 'height of the geometry for operation'))&lt;br /&gt;
     reg.addOutputPort(Convert, &amp;quot;output&amp;quot;, (basic.File, 'the output file'))&lt;br /&gt;
&lt;br /&gt;
This example introduces several new VisTrails features. The last line of the snippet registers an output port that provides a file. Immediately, a file output presents several problems when a pipeline is to be shared among users in heterogenous environments. For example, where should a file be written to? For temporary files, VisTrails provides a ''file pool'' class, that manages temporary files and their lifetimes automatically, so that users don't have to worry about deleting them post-execution. To create a temporary file, a user calls, for example&lt;br /&gt;
&lt;br /&gt;
 fileObj = self.interpreter.filePool.create(suffix=&amp;quot;.png&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;fileObj&amp;lt;/tt&amp;gt; will then contain a module that represents a file. The file pool simply creates a temporary file with write permissions, whose local name is available, in this case, as &amp;lt;tt&amp;gt;fileObj.name&amp;lt;/tt&amp;gt;. The package developer is then free to use this file for any purpose.&lt;br /&gt;
&lt;br /&gt;
Another feature of this example is the use of command line tools. Notice that Python provides a very convenient way to execute commands through a shell. In this case, we use &amp;lt;tt&amp;gt;os.system&amp;lt;/tt&amp;gt; on a command-line that executes the appropriate program.&lt;br /&gt;
&lt;br /&gt;
== Interaction with Caching ==&lt;br /&gt;
&lt;br /&gt;
VisTrails provides a caching mechanism, in which portions of pipelines that are common across different executions are automatically shared. However, some modules are intrinsically side-effectful (writing a report to stdout, or a file to disk, or creating a user interface widget), and should not be shared. Caching control is therefore up to the package developer. By default, '''''caching is enabled'''''. So a developer that doesn't want caching to apply must make small changes to the module. There's a convenient way to disable caching entirely, by using multiple inheritance, and deriving from a ''mixin'' class that's provided by VisTrails. For example, look at the StandardOutput module:&lt;br /&gt;
&lt;br /&gt;
 from core.modules.vistrails_module import Module, newModule, \&lt;br /&gt;
     NotCacheable, ModuleError&lt;br /&gt;
 (...)&lt;br /&gt;
 class StandardOutput(NotCacheable, Module):&lt;br /&gt;
     &amp;quot;&amp;quot;&amp;quot;StandardOutput is a VisTrails Module that simply prints the&lt;br /&gt;
     value connected on its port to standard output. It is intended&lt;br /&gt;
     mostly as a debugging device.&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
     &lt;br /&gt;
     def compute(self):&lt;br /&gt;
         v = self.getInputFromPort(&amp;quot;value&amp;quot;)&lt;br /&gt;
         print v&lt;br /&gt;
&lt;br /&gt;
By subclassing from &amp;lt;tt&amp;gt;NotCacheable&amp;lt;/tt&amp;gt; as well as from Module (or one of its subclasses), VisTrails automatically will not cache this module, or anything downstream from it.&lt;br /&gt;
&lt;br /&gt;
VisTrails also allows a more sophisticated decision on whether to use caching or not. To do that, a user simply overrides the method &amp;lt;tt&amp;gt;is_cacheable&amp;lt;/tt&amp;gt; to return the correct value. This allows context-dependent decisions. For example, in the [http://teem.sourceforge.net teem] package, there's a module that generates a scalar field with random numbers. This is non-deterministic, so shouldn't be cached. However, this module only generates non-deterministic values in special occasions, depending on its input port values. To keep efficiency when caching is possible, while still maintaining correctness, that module implements the following override:&lt;br /&gt;
&lt;br /&gt;
 class Unu1op(Unu):&lt;br /&gt;
 (...)&lt;br /&gt;
     def is_cacheable(self):&lt;br /&gt;
         return not self.getInputFromPort('op') in ['rand', 'nrand']&lt;br /&gt;
 (...)&lt;br /&gt;
&lt;br /&gt;
Notice that the module explicitly uses inputs to decide whether it should be cached. This allows reasonably fine-grained control over the process.&lt;br /&gt;
&lt;br /&gt;
== Interaction with Other Packages ==&lt;br /&gt;
&lt;br /&gt;
When developing more complicated packages, it becomes natural to split code among different VisTrails packages, and have one logically depend on the other. For example, in one package (say, named ' ''package_base'' '), a user might define&lt;br /&gt;
&lt;br /&gt;
 class PackageBaseModule(Module):&lt;br /&gt;
  ...&lt;br /&gt;
&lt;br /&gt;
 def initialize():&lt;br /&gt;
  registry.addModule(PackageBaseModule)&lt;br /&gt;
  ...&lt;br /&gt;
&lt;br /&gt;
And then, in another package (say, ' ''package_derived'' '),&lt;br /&gt;
&lt;br /&gt;
 class DerivedModule(PackageBaseModule):&lt;br /&gt;
  ...&lt;br /&gt;
&lt;br /&gt;
 def initialize():&lt;br /&gt;
  registry.addModule(DerivedModule)&lt;br /&gt;
  ...&lt;br /&gt;
&lt;br /&gt;
Because of the way packages are loaded, ''package_derived'' cannot be initialized before ''package_base''. VisTrails provides a mechanism for specifying interpackage dependencies. Every VisTrails package can provide a list of necessary installed packages. This is done by providing a callable in the package under the name '''package_dependencies'''. For example, here's how the VTK VisTrails package declares dependencies:&lt;br /&gt;
&lt;br /&gt;
 def package_dependencies():&lt;br /&gt;
     import core.packagemanager&lt;br /&gt;
     manager = core.packagemanager.get_package_manager()&lt;br /&gt;
     if manager.has_package('spreadsheet'):&lt;br /&gt;
         return ['spreadsheet']&lt;br /&gt;
     else:&lt;br /&gt;
         return []&lt;br /&gt;
&lt;br /&gt;
The callable must return a list of strings, representing the name of the packages it depends on. We also use this example to introduce the package manager API, that is useful here for inspecting packages present in the system. Notice that the dependencies are not static. '''vtk''' depends on '''spreadsheet''' if and only if '''spreadsheet''' is present in the system. Otherwise, it has no dependencies.&lt;br /&gt;
&lt;br /&gt;
''Note'': Circular dependencies are not allowed. They will be detected by VisTrails and an error will be signalled.&lt;br /&gt;
&lt;br /&gt;
''Note'': Currently, package names are reasonably brittle, in the sense that conflicts in package naming might become an issue. We are in the process of designing an API that will allow more robust naming schemes.&lt;br /&gt;
&lt;br /&gt;
== User-defined module shapes and colors ==&lt;br /&gt;
&lt;br /&gt;
VisTrails allows users to define custom colors and shapes to modules. This must be done at module registration time, by passing special parameters to addModule. For example:&lt;br /&gt;
&lt;br /&gt;
 reg.addModule(Afront,&lt;br /&gt;
               moduleColor=(1.0,0.0,0.0),&lt;br /&gt;
               moduleFringe=[(0.0, 0.0),&lt;br /&gt;
                             (0.2, 0.0),&lt;br /&gt;
                             (0.2, 0.4),&lt;br /&gt;
                             (0.0, 0.4),&lt;br /&gt;
                             (0.0, 1.0)])&lt;br /&gt;
&lt;br /&gt;
gives this result:&lt;br /&gt;
&lt;br /&gt;
[[Image:PackageCustomColorShape1.png]]&lt;br /&gt;
&lt;br /&gt;
This piece of code&lt;br /&gt;
&lt;br /&gt;
 reg = core.modules.module_registry&lt;br /&gt;
 reg.addModule(Afront,&lt;br /&gt;
               moduleColor=(0.4,0.6,0.8),&lt;br /&gt;
               moduleFringe=[(0.0, 0.0),&lt;br /&gt;
                             (0.2, 0.0),&lt;br /&gt;
                             (0.0, 0.2),&lt;br /&gt;
                             (0.2, 0.4),&lt;br /&gt;
                             (0.0, 0.6),&lt;br /&gt;
                             (0.2, 0.8),&lt;br /&gt;
                             (0.0, 1.0)])&lt;br /&gt;
 &lt;br /&gt;
gives this result:&lt;br /&gt;
&lt;br /&gt;
[[Image:PackageCustomColorShape2.png]]&lt;br /&gt;
&lt;br /&gt;
The moduleColor parameter must be a tuple of three floats between 0 and 1 that specify RGB colors for the module background, while moduleFringe is a list of pairs of floats that specify points as they go around a side of the module (the same one is used to go from the top-right corner to bottom-right corner, and from the bottom-left corner to the top-left one. If this is not enough, let the developers know!)&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use different fringes for the left and right borders:&lt;br /&gt;
&lt;br /&gt;
    reg.addModule(Afront,&lt;br /&gt;
                  moduleColor=(1.0,0.8,0.6),&lt;br /&gt;
                  moduleLeftFringe=[(0.0, 0.0),&lt;br /&gt;
                                    (-0.2, 0.0),&lt;br /&gt;
                                    (0.0, 1.0)],&lt;br /&gt;
                  moduleRightFringe=[(0.0, 0.0),&lt;br /&gt;
                                     (0.2, 1.0),&lt;br /&gt;
                                     (0.0, 1.0)])&lt;br /&gt;
&lt;br /&gt;
which gives this:&lt;br /&gt;
&lt;br /&gt;
[[Image:PackageCustomColorShape3.png]]&lt;br /&gt;
&lt;br /&gt;
== How to make your package reloadable ==&lt;br /&gt;
&lt;br /&gt;
You need to move almost everything in the __init__.py file to a new file &amp;quot;init.py&amp;quot;, but keep the identifier, name, version, configuration, and package_dependencies fields/methods in the __init__.py file.  Specifically, make sure that imports (excluding things like core.configuration) and the initialize method are in the init.py file.  For example, take a look at the __init__.py file of the pylab package included in VisTrails:&lt;br /&gt;
&lt;br /&gt;
 identifier = 'edu.utah.sci.vistrails.matplotlib'&lt;br /&gt;
 name = 'matplotlib'&lt;br /&gt;
 version = '0.9.0'&lt;br /&gt;
&lt;br /&gt;
 def package_dependencies():&lt;br /&gt;
     import core.packagemanager&lt;br /&gt;
     manager = core.packagemanager.get_package_manager()&lt;br /&gt;
     if manager.has_package('edu.utah.sci.vistrails.spreadsheet'):&lt;br /&gt;
         return ['edu.utah.sci.vistrails.spreadsheet']&lt;br /&gt;
     else:&lt;br /&gt;
         return []&lt;br /&gt;
 &lt;br /&gt;
 def package_requirements():&lt;br /&gt;
     import core.requirements&lt;br /&gt;
     if not core.requirements.python_module_exists('matplotlib'):&lt;br /&gt;
         raise core.requirements.MissingRequirement('matplotlib')&lt;br /&gt;
     if not core.requirements.python_module_exists('pylab'):&lt;br /&gt;
         raise core.requirements.MissingRequirement('pylab')&lt;br /&gt;
&lt;br /&gt;
And the init.py contains the other imports, class definitions and the initialize method.&lt;br /&gt;
&lt;br /&gt;
== Adding default values and/or labels for parameters ==&lt;br /&gt;
&lt;br /&gt;
In versions 1.4 and greater, package developers can add labels and default values for parameters.  To add this functionality, you need to use the &amp;lt;code&amp;gt;defaults&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;labels&amp;lt;/code&amp;gt; keyward arguments and pass the values as '''strings'''.  For example,&lt;br /&gt;
&lt;br /&gt;
  class TestDefaults(Module):&lt;br /&gt;
      _input_ports = [(&amp;quot;f1&amp;quot;, &amp;quot;(edu.utah.sci.vistrails.basic:Float)&amp;quot;,&lt;br /&gt;
                       {&amp;quot;defaults&amp;quot;: str([1.23]), &amp;quot;labels&amp;quot;: str([&amp;quot;temp&amp;quot;])})]&lt;br /&gt;
  _modules = [TestDefaults]&lt;br /&gt;
&lt;br /&gt;
or in the older syntax,&lt;br /&gt;
&lt;br /&gt;
  def initialize():&lt;br /&gt;
      reg = core.modules.module_registry.get_module_registry()&lt;br /&gt;
      reg.add_module(TestDefaults2)&lt;br /&gt;
      reg.add_input_port(TestDefaults2, &amp;quot;f2&amp;quot;, [Float, String], &lt;br /&gt;
                         defaults=str([4.56, &amp;quot;abc&amp;quot;]), &lt;br /&gt;
                         labels=str([&amp;quot;temp&amp;quot;, &amp;quot;name&amp;quot;]))&lt;br /&gt;
&lt;br /&gt;
== Packages that generate modules dynamically ==&lt;br /&gt;
&lt;br /&gt;
When wrapping existing libraries or trying to generate modules in a more procedural manner, it is useful to dynamically generate modules.  In our work, we have created some shortcuts to make this easier.  In addition, the list of modules can also be based based on the package configuration.  Here is some example code:&lt;br /&gt;
&lt;br /&gt;
=== __init__.py ===&lt;br /&gt;
&lt;br /&gt;
  from core.configuration import ConfigurationObject&lt;br /&gt;
  &lt;br /&gt;
  identifier = &amp;quot;edu.utah.sci.dakoop.auto_example&amp;quot;&lt;br /&gt;
  version = &amp;quot;0.0.1&amp;quot;&lt;br /&gt;
  name = &amp;quot;AutoExample&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  configuration = ConfigurationObject(use_b=True)&lt;br /&gt;
&lt;br /&gt;
=== init.py ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;expand_ports&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;build_modules&amp;lt;/code&amp;gt; methods are functions to help the construction of the modules easier.  The key parts are the &amp;lt;code&amp;gt;new_module&amp;lt;/code&amp;gt; call and setting the &amp;lt;code&amp;gt;_modules&amp;lt;/code&amp;gt; variable.&lt;br /&gt;
&lt;br /&gt;
  from core.modules.vistrails_module import new_module, Module&lt;br /&gt;
  &lt;br /&gt;
  identifier = &amp;quot;edu.utah.sci.dakoop.auto_example&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  def expand_ports(port_list):&lt;br /&gt;
      new_port_list = []&lt;br /&gt;
      for port in port_list:&lt;br /&gt;
          port_spec = port[1]&lt;br /&gt;
          if type(port_spec) == str: # or unicode...&lt;br /&gt;
              if port_spec.startswith('('):&lt;br /&gt;
                  port_spec = port_spec[1:]&lt;br /&gt;
              if port_spec.endswith(')'):&lt;br /&gt;
                  port_spec = port_spec[:-1]&lt;br /&gt;
              new_spec_list = []&lt;br /&gt;
              for spec in port_spec.split(','):&lt;br /&gt;
                  spec = spec.strip()&lt;br /&gt;
                  parts = spec.split(':', 1)&lt;br /&gt;
                  print 'parts:', parts&lt;br /&gt;
                  namespace = None&lt;br /&gt;
                  if len(parts) &amp;gt; 1:&lt;br /&gt;
                      mod_parts = parts[1].rsplit('|', 1)&lt;br /&gt;
                      if len(mod_parts) &amp;gt; 1:&lt;br /&gt;
                          namespace, module_name = mod_parts&lt;br /&gt;
                      else:&lt;br /&gt;
                          module_name = parts[1]&lt;br /&gt;
                      if len(parts[0].split('.')) == 1:&lt;br /&gt;
                          id_str = 'edu.utah.sci.vistrails.' + parts[0]&lt;br /&gt;
                      else:&lt;br /&gt;
                          id_str = parts[0]&lt;br /&gt;
                  else:&lt;br /&gt;
                      mod_parts = spec.rsplit('|', 1)&lt;br /&gt;
                      if len(mod_parts) &amp;gt; 1:&lt;br /&gt;
                          namespace, module_name = mod_parts&lt;br /&gt;
                      else:&lt;br /&gt;
                          module_name = spec&lt;br /&gt;
                      id_str = identifier&lt;br /&gt;
                  if namespace:&lt;br /&gt;
                      new_spec_list.append(id_str + ':' + module_name + ':' + \&lt;br /&gt;
                                               namespace)&lt;br /&gt;
                  else:&lt;br /&gt;
                      new_spec_list.append(id_str + ':' + module_name)&lt;br /&gt;
              port_spec = '(' + ','.join(new_spec_list) + ')'&lt;br /&gt;
          new_port_list.append((port[0], port_spec) + port[2:])&lt;br /&gt;
      print new_port_list&lt;br /&gt;
      return new_port_list&lt;br /&gt;
  &lt;br /&gt;
  def build_modules(module_descs):&lt;br /&gt;
      new_classes = {}&lt;br /&gt;
      for m_name, m_dict in module_descs:&lt;br /&gt;
          m_doc = m_dict.get(&amp;quot;_doc&amp;quot;, None)&lt;br /&gt;
          m_inputs = m_dict.get(&amp;quot;_inputs&amp;quot;, [])&lt;br /&gt;
          m_outputs = m_dict.get(&amp;quot;_outputs&amp;quot;, [])&lt;br /&gt;
          if &amp;quot;_inputs&amp;quot; in m_dict:&lt;br /&gt;
              del m_dict[&amp;quot;_inputs&amp;quot;]&lt;br /&gt;
          if &amp;quot;_outputs&amp;quot; in m_dict:&lt;br /&gt;
              del m_dict[&amp;quot;_outputs&amp;quot;]&lt;br /&gt;
          if &amp;quot;_doc&amp;quot; in m_dict:&lt;br /&gt;
              del m_dict[&amp;quot;_doc&amp;quot;]&lt;br /&gt;
          klass_dict = {}&lt;br /&gt;
          if &amp;quot;_compute&amp;quot; in m_dict:&lt;br /&gt;
              klass_dict[&amp;quot;compute&amp;quot;] = m_dict[&amp;quot;_compute&amp;quot;]&lt;br /&gt;
              del m_dict[&amp;quot;_compute&amp;quot;]&lt;br /&gt;
          m_class = new_module(Module, m_name, klass_dict, m_doc)&lt;br /&gt;
          m_class._input_ports = expand_ports(m_inputs)&lt;br /&gt;
          m_class._output_ports = expand_ports(m_outputs)&lt;br /&gt;
          new_classes[m_name] = (m_class, m_dict)&lt;br /&gt;
      return new_classes.values()&lt;br /&gt;
  &lt;br /&gt;
  def initialize():&lt;br /&gt;
      global _modules&lt;br /&gt;
      def a_compute(self):&lt;br /&gt;
          a = self.getInputFromPort(&amp;quot;a&amp;quot;)&lt;br /&gt;
          i = 0&lt;br /&gt;
          if self.hasInputFromPort(&amp;quot;i&amp;quot;):&lt;br /&gt;
              i = self.getInputFromPort(&amp;quot;i&amp;quot;)&lt;br /&gt;
          if a == &amp;quot;abc&amp;quot;:&lt;br /&gt;
              i += 100&lt;br /&gt;
          self.setResult(&amp;quot;b&amp;quot;, i)&lt;br /&gt;
  &lt;br /&gt;
      module_descs = [(&amp;quot;ModuleA&amp;quot;, {&amp;quot;_inputs&amp;quot;: [(&amp;quot;a&amp;quot;, &amp;quot;basic:String&amp;quot;)],&lt;br /&gt;
                                   &amp;quot;_outputs&amp;quot;: [(&amp;quot;b&amp;quot;, &amp;quot;basic:Integer&amp;quot;)],&lt;br /&gt;
                                   &amp;quot;_doc&amp;quot;: &amp;quot;ModuleA documentation&amp;quot;,&lt;br /&gt;
                                   &amp;quot;_compute&amp;quot;: a_compute,&lt;br /&gt;
                                   &amp;quot;namespace&amp;quot;: &amp;quot;Test&amp;quot;}),&lt;br /&gt;
                      (&amp;quot;ModuleB&amp;quot;, {&amp;quot;_inputs&amp;quot;: [(&amp;quot;a&amp;quot;, &amp;quot;Test|ModuleA&amp;quot;)],&lt;br /&gt;
                                   &amp;quot;_outputs&amp;quot;: [(&amp;quot;b&amp;quot;, &amp;quot;Test|ModuleA&amp;quot;)],&lt;br /&gt;
                                   &amp;quot;_doc&amp;quot;: &amp;quot;ModuleB documentation&amp;quot;})&lt;br /&gt;
                      ]&lt;br /&gt;
  &lt;br /&gt;
      if configuration.use_b:&lt;br /&gt;
          _modules = build_modules(module_descs)&lt;br /&gt;
      else:&lt;br /&gt;
          _modules = build_modules(module_descs[:1])&lt;br /&gt;
  &lt;br /&gt;
  _modules = []&lt;br /&gt;
&lt;br /&gt;
== Help! This documentation wasn't good enough! ==&lt;br /&gt;
&lt;br /&gt;
Sorry, it's our fault! If you need help, join the vistrails-users list and post your question there.&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=UsersGuideVisTrailsPackages&amp;diff=3961</id>
		<title>UsersGuideVisTrailsPackages</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=UsersGuideVisTrailsPackages&amp;diff=3961"/>
		<updated>2011-03-31T15:17:41Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* Dealing with command line tools and side effects */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
VisTrails provides a plugin infrastructure to integrate user-defined &lt;br /&gt;
functions and libraries.  Specifically, users can incorporate their own visualization and simulation codes into pipelines by defining custom modules (or wrappers). These modules are bundled in what we call '''packages'''. A VisTrails package is simply a collection of Python classes -- each of these classes will represent a new module -- created by the user that respects a certain convention. Here's a simplified example of a very simple user-defined module:&lt;br /&gt;
&lt;br /&gt;
 class Divide(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
         arg1 = self.getInputFromPort(&amp;quot;arg1&amp;quot;)&lt;br /&gt;
         arg2 = self.getInputFromPort(&amp;quot;arg2&amp;quot;)&lt;br /&gt;
         if arg2 == 0.0:&lt;br /&gt;
             raise ModuleError(self, &amp;quot;Division by zero&amp;quot;)&lt;br /&gt;
         self.setResult(&amp;quot;result&amp;quot;, arg1 / arg2)&lt;br /&gt;
 &lt;br /&gt;
 registry.addModule(Divide)&lt;br /&gt;
 registry.addInputPort(Divide, &amp;quot;arg1&amp;quot;, (basic.Float, 'dividend'))&lt;br /&gt;
 registry.addInputPort(Divide, &amp;quot;arg2&amp;quot;, (basic.Float, 'divisor'))&lt;br /&gt;
 registry.addOutputPort(Divide, &amp;quot;result&amp;quot;, (basic.Float, 'quotient'))&lt;br /&gt;
&lt;br /&gt;
New VisTrails modules must subclass from Module, the base class that defines basic functionality. The only required override is the &amp;lt;tt&amp;gt;compute()&amp;lt;/tt&amp;gt; method, which performs the actual module computation. Input and output is specified through ''ports'', which currently have to be explicitly registered with VisTrails. However, this is straightforward, and done through method calls to the module registry. A complete documented example of a (slightly) more complicated module is available [[VistrailsPackagePythonCalcExample | here]].&lt;br /&gt;
&lt;br /&gt;
== Dealing with command line tools and side effects ==&lt;br /&gt;
&lt;br /&gt;
In an ideal world a module's outputs should be completely determined by its inputs. This is important for provenance purposes - if modules have implicit dependencies, it is not possible to be certain that the same results will be generated when the process is reexecuted.&lt;br /&gt;
&lt;br /&gt;
However, it is clear that certain modules are inherently side-effectful (reading/writing files, network, etc). For the common case of temporary files, VisTrails provides a convenience layer that removes part of the burden of managing temporary files. As an illustrative example, consider one of the packages we make available for image conversion, using the [http://www.imagemagick.org/ ImageMagick] suite:&lt;br /&gt;
&lt;br /&gt;
 class Convert(ImageMagick):&lt;br /&gt;
     &amp;quot;&amp;quot;&amp;quot;Convert is the base Module for VisTrails Modules in the ImageMagick&lt;br /&gt;
 package that deal with operations on images. Convert is a bit of a misnomer since&lt;br /&gt;
 the 'convert' tool does more than simply file format conversion. Each subclass&lt;br /&gt;
 has a descriptive name of the operation it implements.&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
     def create_output_file(self):&lt;br /&gt;
         &amp;quot;&amp;quot;&amp;quot;Creates a File with the output format given by the&lt;br /&gt;
 outputFormat port.&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
         if self.hasInputFromPort('outputFormat'):&lt;br /&gt;
             s = '.' + self.getInputFromPort('outputFormat')&lt;br /&gt;
             return self.interpreter.filePool.create_file(suffix=s)&lt;br /&gt;
 &lt;br /&gt;
     def geometry_description(self):&lt;br /&gt;
         &amp;quot;&amp;quot;&amp;quot;returns a string with the description of the geometry as&lt;br /&gt;
 indicated by the appropriate ports (geometry or width and height)&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
         # if complete geometry is available, ignore rest&lt;br /&gt;
         if self.hasInputFromPort(&amp;quot;geometry&amp;quot;):&lt;br /&gt;
             return self.getInputFromPort(&amp;quot;geometry&amp;quot;)&lt;br /&gt;
         elif self.hasInputFromPort(&amp;quot;width&amp;quot;):&lt;br /&gt;
             w = self.getInputFromPort(&amp;quot;width&amp;quot;)&lt;br /&gt;
             h = self.getInputFromPort(&amp;quot;height&amp;quot;)&lt;br /&gt;
             return &amp;quot;'%sx%s'&amp;quot; % (w, h)&lt;br /&gt;
         else:&lt;br /&gt;
             raise ModuleError(self, &amp;quot;Needs geometry or width/height&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
     def run(self, *args):&lt;br /&gt;
         &amp;quot;&amp;quot;&amp;quot;run(*args), runs ImageMagick's 'convert' on a shell, passing all&lt;br /&gt;
 arguments to the program.&amp;quot;&amp;quot;&amp;quot;        &lt;br /&gt;
         cmdline = (&amp;quot;convert&amp;quot; + (&amp;quot; %s&amp;quot; * len(args))) % args&lt;br /&gt;
         if not self.__quiet:&lt;br /&gt;
             print cmdline&lt;br /&gt;
         r = os.system(cmdline)&lt;br /&gt;
         if r != 0:&lt;br /&gt;
             raise ModuleError(self, &amp;quot;system call failed: '%s'&amp;quot; % cmdline)&lt;br /&gt;
 &lt;br /&gt;
     def compute(self):&lt;br /&gt;
         o = self.create_output_file()&lt;br /&gt;
         i = self.input_file_description()&lt;br /&gt;
         self.run(i, o.name)&lt;br /&gt;
         self.setResult(&amp;quot;output&amp;quot;, o)&lt;br /&gt;
 &lt;br /&gt;
 (...)&lt;br /&gt;
 &lt;br /&gt;
     reg.addModule(Convert)&lt;br /&gt;
     reg.addInputPort(Convert, &amp;quot;geometry&amp;quot;, (basic.String, 'ImageMagick geometry'))&lt;br /&gt;
     reg.addInputPort(Convert, &amp;quot;width&amp;quot;, (basic.String, 'width of the geometry for operation'))&lt;br /&gt;
     reg.addInputPort(Convert, &amp;quot;height&amp;quot;, (basic.String, 'height of the geometry for operation'))&lt;br /&gt;
     reg.addOutputPort(Convert, &amp;quot;output&amp;quot;, (basic.File, 'the output file'))&lt;br /&gt;
&lt;br /&gt;
This example introduces several new VisTrails features. The last line of the snippet registers an output port that provides a file. Immediately, a file output presents several problems when a pipeline is to be shared among users in heterogenous environments. For example, where should a file be written to? For temporary files, VisTrails provides a ''file pool'' class, that manages temporary files and their lifetimes automatically, so that users don't have to worry about deleting them post-execution. To create a temporary file, a user calls, for example&lt;br /&gt;
&lt;br /&gt;
 fileObj = self.interpreter.filePool.create(suffix=&amp;quot;.png&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;fileObj&amp;lt;/tt&amp;gt; will then contain a module that represents a file. The file pool simply creates a temporary file with write permissions, whose local name is available, in this case, as &amp;lt;tt&amp;gt;fileObj.name&amp;lt;/tt&amp;gt;. The package developer is then free to use this file for any purpose.&lt;br /&gt;
&lt;br /&gt;
Another feature of this example is the use of command line tools. Notice that Python provides a very convenient way to execute commands through a shell. In this case, we use &amp;lt;tt&amp;gt;os.system&amp;lt;/tt&amp;gt; on a command-line that executes the appropriate program.&lt;br /&gt;
&lt;br /&gt;
== Interaction with Caching ==&lt;br /&gt;
&lt;br /&gt;
VisTrails provides a caching mechanism, in which portions of pipelines that are common across different executions are automatically shared. However, some modules are intrinsically side-effectful (writing a report to stdout, or a file to disk, or creating a user interface widget), and should not be shared. Caching control is therefore up to the package developer. By default, '''''caching is enabled'''''. So a developer that doesn't want caching to apply must make small changes to the module. There's a convenient way to disable caching entirely, by using multiple inheritance, and deriving from a ''mixin'' class that's provided by VisTrails. For example, look at the StandardOutput module:&lt;br /&gt;
&lt;br /&gt;
 from core.modules.vistrails_module import Module, newModule, \&lt;br /&gt;
     NotCacheable, ModuleError&lt;br /&gt;
 (...)&lt;br /&gt;
 class StandardOutput(NotCacheable, Module):&lt;br /&gt;
     &amp;quot;&amp;quot;&amp;quot;StandardOutput is a VisTrails Module that simply prints the&lt;br /&gt;
     value connected on its port to standard output. It is intended&lt;br /&gt;
     mostly as a debugging device.&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
     &lt;br /&gt;
     def compute(self):&lt;br /&gt;
         v = self.getInputFromPort(&amp;quot;value&amp;quot;)&lt;br /&gt;
         print v&lt;br /&gt;
&lt;br /&gt;
By subclassing from &amp;lt;tt&amp;gt;NotCacheable&amp;lt;/tt&amp;gt; as well as from Module (or one of its subclasses), VisTrails automatically will not cache this module, or anything downstream from it.&lt;br /&gt;
&lt;br /&gt;
VisTrails also allows a more sophisticated decision on whether to use caching or not. To do that, a user simply overrides the method &amp;lt;tt&amp;gt;is_cacheable&amp;lt;/tt&amp;gt; to return the correct value. This allows context-dependent decisions. For example, in the [http://teem.sourceforge.net teem] package, there's a module that generates a scalar field with random numbers. This is non-deterministic, so shouldn't be cached. However, this module only generates non-deterministic values in special occasions, depending on its input port values. To keep efficiency when caching is possible, while still maintaining correctness, that module implements the following override:&lt;br /&gt;
&lt;br /&gt;
 class Unu1op(Unu):&lt;br /&gt;
 (...)&lt;br /&gt;
     def is_cacheable(self):&lt;br /&gt;
         return not self.getInputFromPort('op') in ['rand', 'nrand']&lt;br /&gt;
 (...)&lt;br /&gt;
&lt;br /&gt;
Notice that the module explicitly uses inputs to decide whether it should be cached. This allows reasonably fine-grained control over the process.&lt;br /&gt;
&lt;br /&gt;
== Interaction with Other Packages ==&lt;br /&gt;
&lt;br /&gt;
When developing more complicated packages, it becomes natural to split code among different VisTrails packages, and have one logically depend on the other. For example, in one package (say, named ' ''package_base'' '), a user might define&lt;br /&gt;
&lt;br /&gt;
 class PackageBaseModule(Module):&lt;br /&gt;
  ...&lt;br /&gt;
&lt;br /&gt;
 def initialize():&lt;br /&gt;
  registry.addModule(PackageBaseModule)&lt;br /&gt;
  ...&lt;br /&gt;
&lt;br /&gt;
And then, in another package (say, ' ''package_derived'' '),&lt;br /&gt;
&lt;br /&gt;
 class DerivedModule(PackageBaseModule):&lt;br /&gt;
  ...&lt;br /&gt;
&lt;br /&gt;
 def initialize():&lt;br /&gt;
  registry.addModule(DerivedModule)&lt;br /&gt;
  ...&lt;br /&gt;
&lt;br /&gt;
Because of the way packages are loaded, ''package_derived'' cannot be initialized before ''package_base''. VisTrails provides a mechanism for specifying interpackage dependencies. Every VisTrails package can provide a list of necessary installed packages. This is done by providing a callable in the package under the name '''package_dependencies'''. For example, here's how the VTK VisTrails package declares dependencies:&lt;br /&gt;
&lt;br /&gt;
 def package_dependencies():&lt;br /&gt;
     import core.packagemanager&lt;br /&gt;
     manager = core.packagemanager.get_package_manager()&lt;br /&gt;
     if manager.has_package('spreadsheet'):&lt;br /&gt;
         return ['spreadsheet']&lt;br /&gt;
     else:&lt;br /&gt;
         return []&lt;br /&gt;
&lt;br /&gt;
The callable must return a list of strings, representing the name of the packages it depends on. We also use this example to introduce the package manager API, that is useful here for inspecting packages present in the system. Notice that the dependencies are not static. '''vtk''' depends on '''spreadsheet''' if and only if '''spreadsheet''' is present in the system. Otherwise, it has no dependencies.&lt;br /&gt;
&lt;br /&gt;
''Note'': Circular dependencies are not allowed. They will be detected by VisTrails and an error will be signalled.&lt;br /&gt;
&lt;br /&gt;
''Note'': Currently, package names are reasonably brittle, in the sense that conflicts in package naming might become an issue. We are in the process of designing an API that will allow more robust naming schemes.&lt;br /&gt;
&lt;br /&gt;
== User-defined module shapes and colors ==&lt;br /&gt;
&lt;br /&gt;
VisTrails allows users to define custom colors and shapes to modules. This must be done at module registration time, by passing special parameters to addModule. For example:&lt;br /&gt;
&lt;br /&gt;
 reg.addModule(Afront,&lt;br /&gt;
               moduleColor=(1.0,0.0,0.0),&lt;br /&gt;
               moduleFringe=[(0.0, 0.0),&lt;br /&gt;
                             (0.2, 0.0),&lt;br /&gt;
                             (0.2, 0.4),&lt;br /&gt;
                             (0.0, 0.4),&lt;br /&gt;
                             (0.0, 1.0)])&lt;br /&gt;
&lt;br /&gt;
gives this result:&lt;br /&gt;
&lt;br /&gt;
[[Image:PackageCustomColorShape1.png]]&lt;br /&gt;
&lt;br /&gt;
This piece of code&lt;br /&gt;
&lt;br /&gt;
 reg = core.modules.module_registry&lt;br /&gt;
 reg.addModule(Afront,&lt;br /&gt;
               moduleColor=(0.4,0.6,0.8),&lt;br /&gt;
               moduleFringe=[(0.0, 0.0),&lt;br /&gt;
                             (0.2, 0.0),&lt;br /&gt;
                             (0.0, 0.2),&lt;br /&gt;
                             (0.2, 0.4),&lt;br /&gt;
                             (0.0, 0.6),&lt;br /&gt;
                             (0.2, 0.8),&lt;br /&gt;
                             (0.0, 1.0)])&lt;br /&gt;
 &lt;br /&gt;
gives this result:&lt;br /&gt;
&lt;br /&gt;
[[Image:PackageCustomColorShape2.png]]&lt;br /&gt;
&lt;br /&gt;
The moduleColor parameter must be a tuple of three floats between 0 and 1 that specify RGB colors for the module background, while moduleFringe is a list of pairs of floats that specify points as they go around a side of the module (the same one is used to go from the top-right corner to bottom-right corner, and from the bottom-left corner to the top-left one. If this is not enough, let the developers know!)&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can use different fringes for the left and right borders:&lt;br /&gt;
&lt;br /&gt;
    reg.addModule(Afront,&lt;br /&gt;
                  moduleColor=(1.0,0.8,0.6),&lt;br /&gt;
                  moduleLeftFringe=[(0.0, 0.0),&lt;br /&gt;
                                    (-0.2, 0.0),&lt;br /&gt;
                                    (0.0, 1.0)],&lt;br /&gt;
                  moduleRightFringe=[(0.0, 0.0),&lt;br /&gt;
                                     (0.2, 1.0),&lt;br /&gt;
                                     (0.0, 1.0)])&lt;br /&gt;
&lt;br /&gt;
which gives this:&lt;br /&gt;
&lt;br /&gt;
[[Image:PackageCustomColorShape3.png]]&lt;br /&gt;
&lt;br /&gt;
== How to make you package reloadable ==&lt;br /&gt;
&lt;br /&gt;
You need to move almost everything in the __init__.py file to a new file &amp;quot;init.py&amp;quot;, but keep the identifier, name, version, configuration, and package_dependencies fields/methods in the __init__.py file.  Specifically, make sure that imports (excluding things like core.configuration) and the initialize method are in the init.py file.  For example, take a look at the __init__.py file of the pylab package included in VisTrails:&lt;br /&gt;
&lt;br /&gt;
 identifier = 'edu.utah.sci.vistrails.matplotlib'&lt;br /&gt;
 name = 'matplotlib'&lt;br /&gt;
 version = '0.9.0'&lt;br /&gt;
&lt;br /&gt;
 def package_dependencies():&lt;br /&gt;
     import core.packagemanager&lt;br /&gt;
     manager = core.packagemanager.get_package_manager()&lt;br /&gt;
     if manager.has_package('edu.utah.sci.vistrails.spreadsheet'):&lt;br /&gt;
         return ['edu.utah.sci.vistrails.spreadsheet']&lt;br /&gt;
     else:&lt;br /&gt;
         return []&lt;br /&gt;
 &lt;br /&gt;
 def package_requirements():&lt;br /&gt;
     import core.requirements&lt;br /&gt;
     if not core.requirements.python_module_exists('matplotlib'):&lt;br /&gt;
         raise core.requirements.MissingRequirement('matplotlib')&lt;br /&gt;
     if not core.requirements.python_module_exists('pylab'):&lt;br /&gt;
         raise core.requirements.MissingRequirement('pylab')&lt;br /&gt;
&lt;br /&gt;
And the init.py contains the other imports, class definitions and the initialize method.&lt;br /&gt;
&lt;br /&gt;
== Adding default values and/or labels for parameters ==&lt;br /&gt;
&lt;br /&gt;
In versions 1.4 and greater, package developers can add labels and default values for parameters.  To add this functionality, you need to use the &amp;lt;code&amp;gt;defaults&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;labels&amp;lt;/code&amp;gt; keyward arguments and pass the values as '''strings'''.  For example,&lt;br /&gt;
&lt;br /&gt;
  class TestDefaults(Module):&lt;br /&gt;
      _input_ports = [(&amp;quot;f1&amp;quot;, &amp;quot;(edu.utah.sci.vistrails.basic:Float)&amp;quot;,&lt;br /&gt;
                       {&amp;quot;defaults&amp;quot;: str([1.23]), &amp;quot;labels&amp;quot;: str([&amp;quot;temp&amp;quot;])})]&lt;br /&gt;
  _modules = [TestDefaults]&lt;br /&gt;
&lt;br /&gt;
or in the older syntax,&lt;br /&gt;
&lt;br /&gt;
  def initialize():&lt;br /&gt;
      reg = core.modules.module_registry.get_module_registry()&lt;br /&gt;
      reg.add_module(TestDefaults2)&lt;br /&gt;
      reg.add_input_port(TestDefaults2, &amp;quot;f2&amp;quot;, [Float, String], &lt;br /&gt;
                         defaults=str([4.56, &amp;quot;abc&amp;quot;]), &lt;br /&gt;
                         labels=str([&amp;quot;temp&amp;quot;, &amp;quot;name&amp;quot;]))&lt;br /&gt;
&lt;br /&gt;
== Packages that generate modules dynamically ==&lt;br /&gt;
&lt;br /&gt;
When wrapping existing libraries or trying to generate modules in a more procedural manner, it is useful to dynamically generate modules.  In our work, we have created some shortcuts to make this easier.  In addition, the list of modules can also be based based on the package configuration.  Here is some example code:&lt;br /&gt;
&lt;br /&gt;
=== __init__.py ===&lt;br /&gt;
&lt;br /&gt;
  from core.configuration import ConfigurationObject&lt;br /&gt;
  &lt;br /&gt;
  identifier = &amp;quot;edu.utah.sci.dakoop.auto_example&amp;quot;&lt;br /&gt;
  version = &amp;quot;0.0.1&amp;quot;&lt;br /&gt;
  name = &amp;quot;AutoExample&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  configuration = ConfigurationObject(use_b=True)&lt;br /&gt;
&lt;br /&gt;
=== init.py ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;expand_ports&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;build_modules&amp;lt;/code&amp;gt; methods are functions to help the construction of the modules easier.  The key parts are the &amp;lt;code&amp;gt;new_module&amp;lt;/code&amp;gt; call and setting the &amp;lt;code&amp;gt;_modules&amp;lt;/code&amp;gt; variable.&lt;br /&gt;
&lt;br /&gt;
  from core.modules.vistrails_module import new_module, Module&lt;br /&gt;
  &lt;br /&gt;
  identifier = &amp;quot;edu.utah.sci.dakoop.auto_example&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  def expand_ports(port_list):&lt;br /&gt;
      new_port_list = []&lt;br /&gt;
      for port in port_list:&lt;br /&gt;
          port_spec = port[1]&lt;br /&gt;
          if type(port_spec) == str: # or unicode...&lt;br /&gt;
              if port_spec.startswith('('):&lt;br /&gt;
                  port_spec = port_spec[1:]&lt;br /&gt;
              if port_spec.endswith(')'):&lt;br /&gt;
                  port_spec = port_spec[:-1]&lt;br /&gt;
              new_spec_list = []&lt;br /&gt;
              for spec in port_spec.split(','):&lt;br /&gt;
                  spec = spec.strip()&lt;br /&gt;
                  parts = spec.split(':', 1)&lt;br /&gt;
                  print 'parts:', parts&lt;br /&gt;
                  namespace = None&lt;br /&gt;
                  if len(parts) &amp;gt; 1:&lt;br /&gt;
                      mod_parts = parts[1].rsplit('|', 1)&lt;br /&gt;
                      if len(mod_parts) &amp;gt; 1:&lt;br /&gt;
                          namespace, module_name = mod_parts&lt;br /&gt;
                      else:&lt;br /&gt;
                          module_name = parts[1]&lt;br /&gt;
                      if len(parts[0].split('.')) == 1:&lt;br /&gt;
                          id_str = 'edu.utah.sci.vistrails.' + parts[0]&lt;br /&gt;
                      else:&lt;br /&gt;
                          id_str = parts[0]&lt;br /&gt;
                  else:&lt;br /&gt;
                      mod_parts = spec.rsplit('|', 1)&lt;br /&gt;
                      if len(mod_parts) &amp;gt; 1:&lt;br /&gt;
                          namespace, module_name = mod_parts&lt;br /&gt;
                      else:&lt;br /&gt;
                          module_name = spec&lt;br /&gt;
                      id_str = identifier&lt;br /&gt;
                  if namespace:&lt;br /&gt;
                      new_spec_list.append(id_str + ':' + module_name + ':' + \&lt;br /&gt;
                                               namespace)&lt;br /&gt;
                  else:&lt;br /&gt;
                      new_spec_list.append(id_str + ':' + module_name)&lt;br /&gt;
              port_spec = '(' + ','.join(new_spec_list) + ')'&lt;br /&gt;
          new_port_list.append((port[0], port_spec) + port[2:])&lt;br /&gt;
      print new_port_list&lt;br /&gt;
      return new_port_list&lt;br /&gt;
  &lt;br /&gt;
  def build_modules(module_descs):&lt;br /&gt;
      new_classes = {}&lt;br /&gt;
      for m_name, m_dict in module_descs:&lt;br /&gt;
          m_doc = m_dict.get(&amp;quot;_doc&amp;quot;, None)&lt;br /&gt;
          m_inputs = m_dict.get(&amp;quot;_inputs&amp;quot;, [])&lt;br /&gt;
          m_outputs = m_dict.get(&amp;quot;_outputs&amp;quot;, [])&lt;br /&gt;
          if &amp;quot;_inputs&amp;quot; in m_dict:&lt;br /&gt;
              del m_dict[&amp;quot;_inputs&amp;quot;]&lt;br /&gt;
          if &amp;quot;_outputs&amp;quot; in m_dict:&lt;br /&gt;
              del m_dict[&amp;quot;_outputs&amp;quot;]&lt;br /&gt;
          if &amp;quot;_doc&amp;quot; in m_dict:&lt;br /&gt;
              del m_dict[&amp;quot;_doc&amp;quot;]&lt;br /&gt;
          klass_dict = {}&lt;br /&gt;
          if &amp;quot;_compute&amp;quot; in m_dict:&lt;br /&gt;
              klass_dict[&amp;quot;compute&amp;quot;] = m_dict[&amp;quot;_compute&amp;quot;]&lt;br /&gt;
              del m_dict[&amp;quot;_compute&amp;quot;]&lt;br /&gt;
          m_class = new_module(Module, m_name, klass_dict, m_doc)&lt;br /&gt;
          m_class._input_ports = expand_ports(m_inputs)&lt;br /&gt;
          m_class._output_ports = expand_ports(m_outputs)&lt;br /&gt;
          new_classes[m_name] = (m_class, m_dict)&lt;br /&gt;
      return new_classes.values()&lt;br /&gt;
  &lt;br /&gt;
  def initialize():&lt;br /&gt;
      global _modules&lt;br /&gt;
      def a_compute(self):&lt;br /&gt;
          a = self.getInputFromPort(&amp;quot;a&amp;quot;)&lt;br /&gt;
          i = 0&lt;br /&gt;
          if self.hasInputFromPort(&amp;quot;i&amp;quot;):&lt;br /&gt;
              i = self.getInputFromPort(&amp;quot;i&amp;quot;)&lt;br /&gt;
          if a == &amp;quot;abc&amp;quot;:&lt;br /&gt;
              i += 100&lt;br /&gt;
          self.setResult(&amp;quot;b&amp;quot;, i)&lt;br /&gt;
  &lt;br /&gt;
      module_descs = [(&amp;quot;ModuleA&amp;quot;, {&amp;quot;_inputs&amp;quot;: [(&amp;quot;a&amp;quot;, &amp;quot;basic:String&amp;quot;)],&lt;br /&gt;
                                   &amp;quot;_outputs&amp;quot;: [(&amp;quot;b&amp;quot;, &amp;quot;basic:Integer&amp;quot;)],&lt;br /&gt;
                                   &amp;quot;_doc&amp;quot;: &amp;quot;ModuleA documentation&amp;quot;,&lt;br /&gt;
                                   &amp;quot;_compute&amp;quot;: a_compute,&lt;br /&gt;
                                   &amp;quot;namespace&amp;quot;: &amp;quot;Test&amp;quot;}),&lt;br /&gt;
                      (&amp;quot;ModuleB&amp;quot;, {&amp;quot;_inputs&amp;quot;: [(&amp;quot;a&amp;quot;, &amp;quot;Test|ModuleA&amp;quot;)],&lt;br /&gt;
                                   &amp;quot;_outputs&amp;quot;: [(&amp;quot;b&amp;quot;, &amp;quot;Test|ModuleA&amp;quot;)],&lt;br /&gt;
                                   &amp;quot;_doc&amp;quot;: &amp;quot;ModuleB documentation&amp;quot;})&lt;br /&gt;
                      ]&lt;br /&gt;
  &lt;br /&gt;
      if configuration.use_b:&lt;br /&gt;
          _modules = build_modules(module_descs)&lt;br /&gt;
      else:&lt;br /&gt;
          _modules = build_modules(module_descs[:1])&lt;br /&gt;
  &lt;br /&gt;
  _modules = []&lt;br /&gt;
&lt;br /&gt;
== Help! This documentation wasn't good enough! ==&lt;br /&gt;
&lt;br /&gt;
Sorry, it's our fault! If you need help, join the vistrails-users list and post your question there.&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=3960</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=3960"/>
		<updated>2011-03-28T16:45:29Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* How do I access the information in the execution log? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt; [http://www.vistrails.org/usersguide/batch.html#running-a-specific-workflow-in-batch-mode Running a Specific Workflow in Batch Mode]&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines. [http://www.vistrails.org/usersguide/batch.html#running-a-workflow-with-specific-parameters Running a Workflow with Specific Parameters]&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never. [http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path. [http://www.vistrails.org/usersguide/batch.html#executing-workflows-in-parallel Executing Workflows in Parallel]&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.  [http://www.vistrails.org/usersguide/creating.html#changing-module-labels Changing Module Labels]&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.  [http://www.vistrails.org/usersguide/getting_started.html#vistrails-interaction Vistrails Interaction]&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.  [http://www.vistrails.org/usersguide/querying.html#textual-queries Textual Queries]&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The spreadsheet package uses this feature, so look there for usage examples (vistrails/packages/spreadsheet/basic_widgets.py)&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Are there shortcuts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
  There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
  A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
&lt;br /&gt;
=== I need to determine, at run-time, whether or not a &amp;quot;child&amp;quot; module is attached to the output port of a &amp;quot;parent&amp;quot; module.  (I do not specifically need to know which child; just if there is one). ===&lt;br /&gt;
&lt;br /&gt;
The outputPorts dictionary of the base Module stores this information.  Thus, you should be able to check&lt;br /&gt;
&lt;br /&gt;
 (&amp;quot;myPortName&amp;quot; in self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
on the parent module to check if there are any downstream connections from the port &amp;quot;myPortName&amp;quot;.  This might be used, for example, to only set results for output ports that will be used.  ***Note***, however, that the caching algorithm assumes that all outputs are set so adding a new connection to a previously unconnected output port will not work as desired if that module is cached.  For this reason, I would currently recommend making such a module not cacheable.  Another possibility is overriding the update() method to check the outputPorts and set the upToDate flag if they are not equal.  In a single, limited test, this seemed to work, but be warned that it is not fully tested.  Here is an example:&lt;br /&gt;
&lt;br /&gt;
 class TestModule(Module):&lt;br /&gt;
     _output_ports = [('a1', '(edu.utah.sci.vistrails.basic:String)'),&lt;br /&gt;
                      ('a2', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
     def __init__(self):&lt;br /&gt;
         Module.__init__(self)&lt;br /&gt;
         self._cached_output_ports = set()&lt;br /&gt;
     &lt;br /&gt;
     def update(self):&lt;br /&gt;
         if len(set(self.outputPorts) - self._cached_output_ports) &amp;gt; 0:&lt;br /&gt;
             self.upToDate = False&lt;br /&gt;
         Module.update(self)&lt;br /&gt;
     &lt;br /&gt;
     def compute(self):&lt;br /&gt;
         if &amp;quot;a1&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a1&amp;quot;, &amp;quot;test&amp;quot;)&lt;br /&gt;
         if &amp;quot;a2&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a2&amp;quot;, &amp;quot;test2&amp;quot;)&lt;br /&gt;
         self._cached_output_ports = set(self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
=== How can I make a module not display in the modules list? ===&lt;br /&gt;
&lt;br /&gt;
You should set the abstract parameter to True when adding the module to the registry.  Using the original syntax, this looks like:&lt;br /&gt;
&lt;br /&gt;
 def initialize():&lt;br /&gt;
     reg = core.modules.module_registry.get_module_registry()&lt;br /&gt;
     reg.add_module(InvisibleModule, abstract=True)&lt;br /&gt;
     # ...&lt;br /&gt;
&lt;br /&gt;
With the _modules dictionary shortcut (for more details, see [http://www.vistrails.org/index.php/FAQ#Are_there_shortucts_for_registry_initialization.3F the FAQ section on this]), you include it in a kwargs dict as part of a module tuple:&lt;br /&gt;
&lt;br /&gt;
 _modules = [AnotherModule, (InvisibleModule, {'abstract': True})]&lt;br /&gt;
&lt;br /&gt;
There is also a 'hide_descriptor' parameter that prevents the module from appearing in the module palette without declaring it to be abstract.&lt;br /&gt;
&lt;br /&gt;
The technical difference between the two is that 'abstract' will not add the item to the module palette while 'hide_descriptor' does add the item but immediately hides it.  If the module should never be instantiated in a workflow, declare it abstract.  If you don't want users to be able to add the module to a pipeline, but you have code that may add it programmatically, declare it with hide_descriptor=True.&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.  [http://www.vistrails.org/usersguide/log.html Accessing the Execution Log]&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=3959</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=3959"/>
		<updated>2011-03-28T14:35:48Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* How do modules deal with multiple inputs in a same port? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt; [http://www.vistrails.org/usersguide/batch.html#running-a-specific-workflow-in-batch-mode Running a Specific Workflow in Batch Mode]&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines. [http://www.vistrails.org/usersguide/batch.html#running-a-workflow-with-specific-parameters Running a Workflow with Specific Parameters]&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never. [http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path. [http://www.vistrails.org/usersguide/batch.html#executing-workflows-in-parallel Executing Workflows in Parallel]&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.  [http://www.vistrails.org/usersguide/creating.html#changing-module-labels Changing Module Labels]&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.  [http://www.vistrails.org/usersguide/getting_started.html#vistrails-interaction Vistrails Interaction]&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.  [http://www.vistrails.org/usersguide/querying.html#textual-queries Textual Queries]&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The spreadsheet package uses this feature, so look there for usage examples (vistrails/packages/spreadsheet/basic_widgets.py)&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Are there shortcuts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
  There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
  A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
&lt;br /&gt;
=== I need to determine, at run-time, whether or not a &amp;quot;child&amp;quot; module is attached to the output port of a &amp;quot;parent&amp;quot; module.  (I do not specifically need to know which child; just if there is one). ===&lt;br /&gt;
&lt;br /&gt;
The outputPorts dictionary of the base Module stores this information.  Thus, you should be able to check&lt;br /&gt;
&lt;br /&gt;
 (&amp;quot;myPortName&amp;quot; in self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
on the parent module to check if there are any downstream connections from the port &amp;quot;myPortName&amp;quot;.  This might be used, for example, to only set results for output ports that will be used.  ***Note***, however, that the caching algorithm assumes that all outputs are set so adding a new connection to a previously unconnected output port will not work as desired if that module is cached.  For this reason, I would currently recommend making such a module not cacheable.  Another possibility is overriding the update() method to check the outputPorts and set the upToDate flag if they are not equal.  In a single, limited test, this seemed to work, but be warned that it is not fully tested.  Here is an example:&lt;br /&gt;
&lt;br /&gt;
 class TestModule(Module):&lt;br /&gt;
     _output_ports = [('a1', '(edu.utah.sci.vistrails.basic:String)'),&lt;br /&gt;
                      ('a2', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
     def __init__(self):&lt;br /&gt;
         Module.__init__(self)&lt;br /&gt;
         self._cached_output_ports = set()&lt;br /&gt;
     &lt;br /&gt;
     def update(self):&lt;br /&gt;
         if len(set(self.outputPorts) - self._cached_output_ports) &amp;gt; 0:&lt;br /&gt;
             self.upToDate = False&lt;br /&gt;
         Module.update(self)&lt;br /&gt;
     &lt;br /&gt;
     def compute(self):&lt;br /&gt;
         if &amp;quot;a1&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a1&amp;quot;, &amp;quot;test&amp;quot;)&lt;br /&gt;
         if &amp;quot;a2&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a2&amp;quot;, &amp;quot;test2&amp;quot;)&lt;br /&gt;
         self._cached_output_ports = set(self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
=== How can I make a module not display in the modules list? ===&lt;br /&gt;
&lt;br /&gt;
You should set the abstract parameter to True when adding the module to the registry.  Using the original syntax, this looks like:&lt;br /&gt;
&lt;br /&gt;
 def initialize():&lt;br /&gt;
     reg = core.modules.module_registry.get_module_registry()&lt;br /&gt;
     reg.add_module(InvisibleModule, abstract=True)&lt;br /&gt;
     # ...&lt;br /&gt;
&lt;br /&gt;
With the _modules dictionary shortcut (for more details, see [http://www.vistrails.org/index.php/FAQ#Are_there_shortucts_for_registry_initialization.3F the FAQ section on this]), you include it in a kwargs dict as part of a module tuple:&lt;br /&gt;
&lt;br /&gt;
 _modules = [AnotherModule, (InvisibleModule, {'abstract': True})]&lt;br /&gt;
&lt;br /&gt;
There is also a 'hide_descriptor' parameter that prevents the module from appearing in the module palette without declaring it to be abstract.&lt;br /&gt;
&lt;br /&gt;
The technical difference between the two is that 'abstract' will not add the item to the module palette while 'hide_descriptor' does add the item but immediately hides it.  If the module should never be instantiated in a workflow, declare it abstract.  If you don't want users to be able to add the module to a pipeline, but you have code that may add it programmatically, declare it with hide_descriptor=True.&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=3958</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=3958"/>
		<updated>2011-03-26T18:29:59Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt; [http://www.vistrails.org/usersguide/batch.html#running-a-specific-workflow-in-batch-mode Running a Specific Workflow in Batch Mode]&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines. [http://www.vistrails.org/usersguide/batch.html#running-a-workflow-with-specific-parameters Running a Workflow with Specific Parameters]&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never. [http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path. [http://www.vistrails.org/usersguide/batch.html#executing-workflows-in-parallel Executing Workflows in Parallel]&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.  [http://www.vistrails.org/usersguide/creating.html#changing-module-labels Changing Module Labels]&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.  [http://www.vistrails.org/usersguide/getting_started.html#vistrails-interaction Vistrails Interaction]&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.  [http://www.vistrails.org/usersguide/querying.html#textual-queries Textual Queries]&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The VTK package uses this feature, so look there for usage examples (packages/vtk/base_widget.py)&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Are there shortcuts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
  There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
  A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
&lt;br /&gt;
=== I need to determine, at run-time, whether or not a &amp;quot;child&amp;quot; module is attached to the output port of a &amp;quot;parent&amp;quot; module.  (I do not specifically need to know which child; just if there is one). ===&lt;br /&gt;
&lt;br /&gt;
The outputPorts dictionary of the base Module stores this information.  Thus, you should be able to check&lt;br /&gt;
&lt;br /&gt;
 (&amp;quot;myPortName&amp;quot; in self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
on the parent module to check if there are any downstream connections from the port &amp;quot;myPortName&amp;quot;.  This might be used, for example, to only set results for output ports that will be used.  ***Note***, however, that the caching algorithm assumes that all outputs are set so adding a new connection to a previously unconnected output port will not work as desired if that module is cached.  For this reason, I would currently recommend making such a module not cacheable.  Another possibility is overriding the update() method to check the outputPorts and set the upToDate flag if they are not equal.  In a single, limited test, this seemed to work, but be warned that it is not fully tested.  Here is an example:&lt;br /&gt;
&lt;br /&gt;
 class TestModule(Module):&lt;br /&gt;
     _output_ports = [('a1', '(edu.utah.sci.vistrails.basic:String)'),&lt;br /&gt;
                      ('a2', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
     def __init__(self):&lt;br /&gt;
         Module.__init__(self)&lt;br /&gt;
         self._cached_output_ports = set()&lt;br /&gt;
     &lt;br /&gt;
     def update(self):&lt;br /&gt;
         if len(set(self.outputPorts) - self._cached_output_ports) &amp;gt; 0:&lt;br /&gt;
             self.upToDate = False&lt;br /&gt;
         Module.update(self)&lt;br /&gt;
     &lt;br /&gt;
     def compute(self):&lt;br /&gt;
         if &amp;quot;a1&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a1&amp;quot;, &amp;quot;test&amp;quot;)&lt;br /&gt;
         if &amp;quot;a2&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a2&amp;quot;, &amp;quot;test2&amp;quot;)&lt;br /&gt;
         self._cached_output_ports = set(self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
=== How can I make a module not display in the modules list? ===&lt;br /&gt;
&lt;br /&gt;
You should set the abstract parameter to True when adding the module to the registry.  Using the original syntax, this looks like:&lt;br /&gt;
&lt;br /&gt;
 def initialize():&lt;br /&gt;
     reg = core.modules.module_registry.get_module_registry()&lt;br /&gt;
     reg.add_module(InvisibleModule, abstract=True)&lt;br /&gt;
     # ...&lt;br /&gt;
&lt;br /&gt;
With the _modules dictionary shortcut (for more details, see [http://www.vistrails.org/index.php/FAQ#Are_there_shortucts_for_registry_initialization.3F the FAQ section on this]), you include it in a kwargs dict as part of a module tuple:&lt;br /&gt;
&lt;br /&gt;
 _modules = [AnotherModule, (InvisibleModule, {'abstract': True})]&lt;br /&gt;
&lt;br /&gt;
There is also a 'hide_descriptor' parameter that prevents the module from appearing in the module palette without declaring it to be abstract.&lt;br /&gt;
&lt;br /&gt;
The technical difference between the two is that 'abstract' will not add the item to the module palette while 'hide_descriptor' does add the item but immediately hides it.  If the module should never be instantiated in a workflow, declare it abstract.  If you don't want users to be able to add the module to a pipeline, but you have code that may add it programmatically, declare it with hide_descriptor=True.&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=3957</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=3957"/>
		<updated>2011-03-26T18:27:59Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* How can I run a workflow using the command line? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt; [http://www.vistrails.org/usersguide/batch.html#running-a-specific-workflow-in-batch-mode Running a Specific Workflow in Batch Mode]&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines. [http://www.vistrails.org/batch.html#running-a-workflow-with-specific-parameters Running a Workflow with Specific Parameters]&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never. [http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path. [http://www.vistrails.org/usersguide/batch.html#executing-workflows-in-parallel Executing Workflows in Parallel]&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.  [http://www.vistrails.org/usersguide/creating.html#changing-module-labels Changing Module Labels]&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.  [http://www.vistrails.org/usersguide/getting_started.html#vistrails-interaction Vistrails Interaction]&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.  [http://www.vistrails.org/usersguide/querying.html#textual-queries Textual Queries]&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The VTK package uses this feature, so look there for usage examples (packages/vtk/base_widget.py)&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Are there shortcuts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
  There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
  A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
&lt;br /&gt;
=== I need to determine, at run-time, whether or not a &amp;quot;child&amp;quot; module is attached to the output port of a &amp;quot;parent&amp;quot; module.  (I do not specifically need to know which child; just if there is one). ===&lt;br /&gt;
&lt;br /&gt;
The outputPorts dictionary of the base Module stores this information.  Thus, you should be able to check&lt;br /&gt;
&lt;br /&gt;
 (&amp;quot;myPortName&amp;quot; in self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
on the parent module to check if there are any downstream connections from the port &amp;quot;myPortName&amp;quot;.  This might be used, for example, to only set results for output ports that will be used.  ***Note***, however, that the caching algorithm assumes that all outputs are set so adding a new connection to a previously unconnected output port will not work as desired if that module is cached.  For this reason, I would currently recommend making such a module not cacheable.  Another possibility is overriding the update() method to check the outputPorts and set the upToDate flag if they are not equal.  In a single, limited test, this seemed to work, but be warned that it is not fully tested.  Here is an example:&lt;br /&gt;
&lt;br /&gt;
 class TestModule(Module):&lt;br /&gt;
     _output_ports = [('a1', '(edu.utah.sci.vistrails.basic:String)'),&lt;br /&gt;
                      ('a2', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
     def __init__(self):&lt;br /&gt;
         Module.__init__(self)&lt;br /&gt;
         self._cached_output_ports = set()&lt;br /&gt;
     &lt;br /&gt;
     def update(self):&lt;br /&gt;
         if len(set(self.outputPorts) - self._cached_output_ports) &amp;gt; 0:&lt;br /&gt;
             self.upToDate = False&lt;br /&gt;
         Module.update(self)&lt;br /&gt;
     &lt;br /&gt;
     def compute(self):&lt;br /&gt;
         if &amp;quot;a1&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a1&amp;quot;, &amp;quot;test&amp;quot;)&lt;br /&gt;
         if &amp;quot;a2&amp;quot; in self.outputPorts:&lt;br /&gt;
             self.setResult(&amp;quot;a2&amp;quot;, &amp;quot;test2&amp;quot;)&lt;br /&gt;
         self._cached_output_ports = set(self.outputPorts)&lt;br /&gt;
&lt;br /&gt;
=== How can I make a module not display in the modules list? ===&lt;br /&gt;
&lt;br /&gt;
You should set the abstract parameter to True when adding the module to the registry.  Using the original syntax, this looks like:&lt;br /&gt;
&lt;br /&gt;
 def initialize():&lt;br /&gt;
     reg = core.modules.module_registry.get_module_registry()&lt;br /&gt;
     reg.add_module(InvisibleModule, abstract=True)&lt;br /&gt;
     # ...&lt;br /&gt;
&lt;br /&gt;
With the _modules dictionary shortcut (for more details, see [http://www.vistrails.org/index.php/FAQ#Are_there_shortucts_for_registry_initialization.3F the FAQ section on this]), you include it in a kwargs dict as part of a module tuple:&lt;br /&gt;
&lt;br /&gt;
 _modules = [AnotherModule, (InvisibleModule, {'abstract': True})]&lt;br /&gt;
&lt;br /&gt;
There is also a 'hide_descriptor' parameter that prevents the module from appearing in the module palette without declaring it to be abstract.&lt;br /&gt;
&lt;br /&gt;
The technical difference between the two is that 'abstract' will not add the item to the module palette while 'hide_descriptor' does add the item but immediately hides it.  If the module should never be instantiated in a workflow, declare it abstract.  If you don't want users to be able to add the module to a pipeline, but you have code that may add it programmatically, declare it with hide_descriptor=True.&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=3955</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=3955"/>
		<updated>2011-03-25T23:40:45Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* Are there shortucts for registry initialization? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt; [http://www.vistrails.org/usersguidebatch.html#running-a-specific-workflow-in-batch-mode Running a Specific Workflow in Batch Mode]&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines. [http://www.vistrails.org/batch.html#running-a-workflow-with-specific-parameters Running a Workflow with Specific Parameters]&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never. [http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path. [http://www.vistrails.org/usersguide/batch.html#executing-workflows-in-parallel Executing Workflows in Parallel]&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.  [http://www.vistrails.org/usersguide/creating.html#changing-module-labels Changing Module Labels]&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.  [http://www.vistrails.org/usersguide/getting_started.html#vistrails-interaction Vistrails Interaction]&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.  [http://www.vistrails.org/usersguide/querying.html#textual-queries Textual Queries]&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The VTK package uses this feature, so look there for usage examples (packages/vtk/base_widget.py)&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Are there shortcuts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
  There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
  A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=3954</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=3954"/>
		<updated>2011-03-25T22:47:36Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* Running workflows */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt; [http://www.vistrails.org/usersguidebatch.html#running-a-specific-workflow-in-batch-mode Running a Specific Workflow in Batch Mode]&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines. [http://www.vistrails.org/batch.html#running-a-workflow-with-specific-parameters Running a Workflow with Specific Parameters]&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never. [http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path. [http://www.vistrails.org/usersguide/batch.html#executing-workflows-in-parallel Executing Workflows in Parallel]&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.  [http://www.vistrails.org/usersguide/creating.html#changing-module-labels Changing Module Labels]&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.  [http://www.vistrails.org/usersguide/getting_started.html#vistrails-interaction Vistrails Interaction]&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.  [http://www.vistrails.org/usersguide/querying.html#textual-queries Textual Queries]&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The VTK package uses this feature, so look there for usage examples (packages/vtk/base_widget.py)&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Are there shortucts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
  There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
  A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=3953</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=3953"/>
		<updated>2011-03-25T22:34:31Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* Running workflows */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt; [http://www.vistrails.org/usersguidebatch.html#running-a-specific-workflow-in-batch-mode Running a Specific Workflow in Batch Mode]&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines. [http://www.vistrails.org/batch.html#running-a-workflow-with-specific-parameters Running a Workflow with Specific Parameters]&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never. [http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path.&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.  [http://www.vistrails.org/usersguide/creating.html#changing-module-labels Changing Module Labels]&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.  [http://www.vistrails.org/usersguide/getting_started.html#vistrails-interaction Vistrails Interaction]&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.  [http://www.vistrails.org/usersguide/querying.html#textual-queries Textual Queries]&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The VTK package uses this feature, so look there for usage examples (packages/vtk/base_widget.py)&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Are there shortucts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
  There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
  A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=3952</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=3952"/>
		<updated>2011-03-25T22:21:58Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* Running workflows */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt; [http://www.vistrails.org/usersguide/batch.html#running-vistrails-in-batch-mode Running Vistrails in Batch Mode]&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines.&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never. [http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path.&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.  [http://www.vistrails.org/usersguide/creating.html#changing-module-labels Changing Module Labels]&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.  [http://www.vistrails.org/usersguide/getting_started.html#vistrails-interaction Vistrails Interaction]&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.  [http://www.vistrails.org/usersguide/querying.html#textual-queries Textual Queries]&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The VTK package uses this feature, so look there for usage examples (packages/vtk/base_widget.py)&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Are there shortucts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
  There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
  A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=3951</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=3951"/>
		<updated>2011-03-25T17:39:21Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* Running workflows */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines.&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never. [http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path.&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#workflow-execution Workflow Execution]&lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.  [http://www.vistrails.org/usersguide/creating.html#changing-module-labels Changing Module Labels]&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.  [http://www.vistrails.org/usersguide/getting_started.html#vistrails-interaction Vistrails Interaction]&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.  [http://www.vistrails.org/usersguide/querying.html#textual-queries Textual Queries]&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The VTK package uses this feature, so look there for usage examples (packages/vtk/base_widget.py)&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Are there shortucts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
  There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
  A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=3950</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=3950"/>
		<updated>2011-03-25T17:25:23Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* When a workflow is executed, what do the colors mean? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines.&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never.&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path.&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed&lt;br /&gt;
&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#vistrails-interaction Vistrails Interaction]&lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.  [http://www.vistrails.org/usersguide/creating.html#changing-module-labels Changing Module Labels]&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.  [http://www.vistrails.org/usersguide/getting_started.html#vistrails-interaction Vistrails Interaction]&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.  [http://www.vistrails.org/usersguide/querying.html#textual-queries Textual Queries]&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The VTK package uses this feature, so look there for usage examples (packages/vtk/base_widget.py)&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Are there shortucts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
  There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
  A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=3949</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=3949"/>
		<updated>2011-03-25T17:24:18Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* When a workflow is executed, what do the colors mean? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines.&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never.&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path.&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed&lt;br /&gt;
&lt;br /&gt;
getting_started.html#vistrails-interaction&lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.  [http://www.vistrails.org/usersguide/creating.html#changing-module-labels Changing Module Labels]&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.  [http://www.vistrails.org/usersguide/getting_started.html#vistrails-interaction Vistrails Interaction]&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.  [http://www.vistrails.org/usersguide/querying.html#textual-queries Textual Queries]&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The VTK package uses this feature, so look there for usage examples (packages/vtk/base_widget.py)&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Are there shortucts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
  There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
  A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=3948</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=3948"/>
		<updated>2011-03-25T17:07:54Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* Building workflows */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines.&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never.&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path.&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed &lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.  [http://www.vistrails.org/usersguide/creating.html#changing-module-labels Changing Module Labels]&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.  [http://www.vistrails.org/usersguide/getting_started.html#vistrails-interaction Vistrails Interaction]&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.  [http://www.vistrails.org/usersguide/querying.html#textual-queries Textual Queries]&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The VTK package uses this feature, so look there for usage examples (packages/vtk/base_widget.py)&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Are there shortucts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
  There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
  A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=3947</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=3947"/>
		<updated>2011-03-25T16:51:21Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* Building workflows */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines.&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never.&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path.&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed &lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.  [http://www.vistrails.org/usersguide/creating.html#changing-module-labels Changing Module Labels]&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.  [http://www.vistrails.org/usersguide/querying.html#textual-queries Textual Queries]&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The VTK package uses this feature, so look there for usage examples (packages/vtk/base_widget.py)&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Are there shortucts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
  There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
  A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=3946</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=3946"/>
		<updated>2011-03-25T01:43:57Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* Building workflows */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines.&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never.&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path.&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed &lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.  [http://www.vistrails.org/usersguide/creating.html#changing-module-labels Changing Module Labels]&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The VTK package uses this feature, so look there for usage examples (packages/vtk/base_widget.py)&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Are there shortucts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
  There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
  A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=3945</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=3945"/>
		<updated>2011-03-25T01:25:41Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines.&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never.&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path.&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed &lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, a &amp;quot;display name&amp;quot; can be assigned to a module by selecting the triangle in its top right corner to open a popup menu and selecting the Set Module Label... menu item.  You will then be prompted to enter the &amp;quot;display name&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The VTK package uses this feature, so look there for usage examples (packages/vtk/base_widget.py)&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Are there shortucts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
  There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
  A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
	<entry>
		<id>https://www.vistrails.org//index.php?title=FAQ&amp;diff=3944</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://www.vistrails.org//index.php?title=FAQ&amp;diff=3944"/>
		<updated>2011-03-25T01:01:25Z</updated>

		<summary type="html">&lt;p&gt;Ctuttle: /* Using VisTrails as a server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Also check our [[known_issues|Known Issues]] page for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== Running workflows ==&lt;br /&gt;
&lt;br /&gt;
=== How can I run a workflow using the command line? ===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') Call vistrails using the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b path_to_vistrails_file:pipeline &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where pipeline can be a version '''tag name''' or version '''id'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you downloaded the MacOS X bundle, you can run vistrails from the command line via the following commands in the Terminal.  Change the current directory to wherever VisTrails was installed (often &amp;lt;code&amp;gt;/Applications&amp;lt;/code&amp;gt;), and then type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vistrails.app/Contents/MacOS/vistrails [&amp;lt;cmd_line_options&amp;gt;]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using the command line, we'd like to execute a workflow multiple times, with slightly different parameters, and create a series of output files. Is this possible?===&lt;br /&gt;
&lt;br /&gt;
('''Updated for version 1.2''') We can change parameters that have an alias through the command line.&lt;br /&gt;
&lt;br /&gt;
For example, offscreen pipeline in offscreen.vt always creates the file called image.png. If you want generate it with a different filename:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/offscreen.vt:offscreen -a&amp;quot;filename=other.png&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;filename&amp;lt;/code&amp;gt; in the example above is the alias name assigned to the parameter in the &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; method inside the String module. When running a pipeline from the command line, VisTrails will try to start the spreadsheet automatically if the pipeline requires it. For example, this other execution will also start the spreadsheet (attention to how $ characters are escaped when running on bash): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases -a&amp;quot;isovalue=30\$&amp;amp;\$diffuse_color=0.8,0.4,0.2&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute more than one pipeline on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python vistrails.py -b ../examples/head.vt:aliases ../examples/spx.vt:spx \&lt;br /&gt;
-a&amp;quot;isovalue=30&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the -a parameter only once regardless the number of pipelines.&lt;br /&gt;
&lt;br /&gt;
=== I can load a vistrail, and the version tree shows up fine. However, no pipelines appear when I click on a version. What gives? ===&lt;br /&gt;
&lt;br /&gt;
The most likely reason is that the vistrail uses a package that is not registered with VisTrails. You need to identify the needed package and add it to your &amp;lt;code&amp;gt;.vistrails/startup.py&amp;lt;/code&amp;gt;. A single line like the following should be enough:&lt;br /&gt;
&lt;br /&gt;
 addPackage('enter_package_name_here')&lt;br /&gt;
&lt;br /&gt;
Some packages might need more information. For example:&lt;br /&gt;
&lt;br /&gt;
 addPackage('afront', executable_path='/path/to/afront')&lt;br /&gt;
&lt;br /&gt;
Refer to the package documentation for details. The one inconvenient step is that currently there's no automated way to describe what is the missing package. We're working on this feature for future releases.&lt;br /&gt;
&lt;br /&gt;
=== I have a workflow that reads a file and then does some processing. The first time it runs, it executes correctly. But in subsequent, nothing happens. ===&lt;br /&gt;
&lt;br /&gt;
VisTrails caches by default, so after a workflow is executed, if none of its parameters change, it won't be executed again. &lt;br /&gt;
&lt;br /&gt;
If a workflow reads a file using the basic module File, VisTrails does check whether the file was modified since the last run. It does so by keeping a signature that is based on the modification time of the file. And if the file was modified, the File module and all downstream modules (the ones which depend on File) will be executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: If you would like your input and output data to be versioned, you can use the Persistence package.''&lt;br /&gt;
&lt;br /&gt;
If you do not want VisTrails to cache executions, you can turn off caching: go to Menu Edit -&amp;gt; Preferences and in the General Configuration tab, change Cache execution results to Never.&lt;br /&gt;
&lt;br /&gt;
=== Can VisTrails execute workflows in parallel? ===&lt;br /&gt;
&lt;br /&gt;
The VisTrails server can only execute pipelines in parallel if there's more than one instance of VisTrails running. The command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; self.rpcserver = ThreadedXMLRPCServer((self.temp_xml_rpc_options.server, self.temp_xml_rpc_options.port))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
starts a multithreaded version of the XML-RPC server, so it will create a thread for each request received by the server. The problem is that Qt/PyQT doesn't allow these multiple threads create GUI objects, only in the main thread. To overcome this limitation, the multithreaded version can instantiate other single threaded versions of VisTrails and put them in a queue, so workflow executions and other GUI-related requests, such as generating workflow graphs and history trees can be forwarded to this queue, and each instance takes turns in answering the request. If the results are in the cache, the multithreaded version answers the requests directly.&lt;br /&gt;
&lt;br /&gt;
Note that this infrastructure works on Linux only. To make this work on Windows, you have to create a script similar to start_vistrails_xvfb.sh (located in the scripts folder) where you can send the number of other instances via command-line options to VisTrails. The command line options are:&lt;br /&gt;
&lt;br /&gt;
python vistrails_server.py -T &amp;lt;ADDRESS&amp;gt; -R &amp;lt;PORT&amp;gt; -O&amp;lt;NUMBER_OF_OTHER_VISTRAILS_INSTANCES&amp;gt; [-M]&amp;amp;&lt;br /&gt;
&lt;br /&gt;
If you want the main vistrails instance to be multithreaded, use the -M at the end.&lt;br /&gt;
&lt;br /&gt;
After creating this script, update function start_other_instances in vistrails/gui/application_server.py lines 1007-1023 and set the script variable to point to your script. You may also have to change the arguments sent to your script (line 1016: for example, you  don't need to set a virtual display).  You will need to change the path to the stop_vistrails_server.py script (on line 1026) according to your installation path.&lt;br /&gt;
&lt;br /&gt;
=== When a workflow is executed, what do the colors mean? ===&lt;br /&gt;
&lt;br /&gt;
- lilac: module was notexecuted&lt;br /&gt;
  &lt;br /&gt;
- yellow: module is currently being executed &lt;br /&gt;
  &lt;br /&gt;
- green: module was successfully executed &lt;br /&gt;
  &lt;br /&gt;
- orange: module was cached&lt;br /&gt;
  &lt;br /&gt;
- red: the execution of the module failed &lt;br /&gt;
&lt;br /&gt;
== Building workflows ==&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to give each widget a &amp;quot;display name&amp;quot; in addition to the module name at the center of the widget? ===&lt;br /&gt;
&lt;br /&gt;
Yes, but it is not easily accessible from the GUI and it definitely needs to be more intuitive. For now, we use the annotation value of key &amp;quot;__desc__&amp;quot; as a module label. If you want to set a PythonSource label, you have to select the module. Then click on the Annotation tab, and add a key named &amp;quot;__desc__&amp;quot;, whatever value you set to this key will be the label. We are currently working on a new interface for this functionality.&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to re-center the picture-in-picture (PiP) view? ===&lt;br /&gt;
&lt;br /&gt;
Yes.   If you click on the PIP window to bring it to focus, you can press Ctrl-R (or Command-R on Mac) to re-center the PiP window.&lt;br /&gt;
&lt;br /&gt;
=== How do I search for a literal &amp;quot;?&amp;quot; (question mark) in the search box in the Property panel? ===&lt;br /&gt;
&lt;br /&gt;
Since we allow regular expressions in our search box, question marks are treated as meta-characters. Thus, searching for &amp;quot;?&amp;quot; returns everything and &amp;quot;abc?&amp;quot; will return everything containing &amp;quot;abc&amp;quot;.  You need to use &amp;quot;\?&amp;quot; instead to search for &amp;quot;?&amp;quot;. So the search for &amp;quot;??&amp;quot; would be &amp;quot;\?\?&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Using VisTrails as a server ==&lt;br /&gt;
&lt;br /&gt;
=== What is the VisTrails server-mode? ===&lt;br /&gt;
&lt;br /&gt;
Using the VisTrails server mode, it is possible to ''execute workflows and control VisTrails through another application''. For example, the CrowdLabs Web portal (http://www.crowdlabs.org) accesses a VisTrails sever to execute workflows, retrieve and display vistrail trees and workflows. [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
=== How do I execute workflows and control VisTrails through another application? ===&lt;br /&gt;
&lt;br /&gt;
The way you access the server is by doing XML-RPC calls. In the current VisTrails release, we include a set of PHP scripts that can talk to a VisTrails server instance. They are in &amp;quot;extensions/http&amp;quot; folder. The files are reasonably well documented. Also, it should be not difficult to create python scripts to access the server (just use xmlrpclib module).&lt;br /&gt;
&lt;br /&gt;
Note that  the VisTrails server requires the provenance and workflows to be in a database. More detailed instructions on how to setup the server and the database&lt;br /&gt;
are available here:&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_server_setup.html&lt;br /&gt;
&lt;br /&gt;
http://www.crowdlabs.org/site_media/static/dev_docs/vistrails_database_setup.html&lt;br /&gt;
&lt;br /&gt;
If what you want is just to execute a series of workflows in batch mode, a simpler solution would be to ''use the VisTrails client in batch mode''. Chapter 12 of the user's guide contains detailed information and examples on that.  [http://www.vistrails.org/usersguide/batch.html#using-vistrails-as-a-server Using VisTrails as a Server]&lt;br /&gt;
&lt;br /&gt;
== Control Flow ==&lt;br /&gt;
&lt;br /&gt;
=== Note: using map  ===&lt;br /&gt;
&lt;br /&gt;
When using 'map', the module (or subworkflow) used as function port in the map module MUST be a function, i.e., it can only define 1 output port.  [http://www.vistrails.org/usersguide/controlflow.html#the-map-operator The Map Operator]&lt;br /&gt;
&lt;br /&gt;
== Spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
Where ''pipeline'' is a version number or a tag.&lt;br /&gt;
&lt;br /&gt;
=== How can I save an image from the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
While having the focus on a spreadsheet cell and select the camera on the toolbar to take a snapshot. The system will prompt you for the location and file name where it should be saved. The other icons can be used for saving multiple images that can be used for generating an animation on demand. A whole sheet can also be saved by selecting Export (either from the menu or from the toolbar). [http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet-image Saving a Spreadsheet Image]&lt;br /&gt;
&lt;br /&gt;
===Is it possible to save the complete state of the spreadsheet?===&lt;br /&gt;
[http://www.vistrails.org/usersguide/spreadsheet.html#saving-a-spreadsheet Saving a Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== Can I view multiple sheets at the same time? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Each sheet on the spreadsheet can be displayed as a dock widget separated from the main spreadsheet window by dragging its tab name out of the tab bar at the bottom of the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Then, how can I put back a separated sheet? ===&lt;br /&gt;
&lt;br /&gt;
A sheet can be docked back to the main window by dragging it back to the tab bar or double-click on its title bar.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== How can I order sheets on the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
This can be done by dragging the sheet name on the bottom top bar and drop it to the right place.  [http://www.vistrails.org/usersguide/spreadsheet.html#multiple-spreadsheets Multiple Spreadsheets]&lt;br /&gt;
&lt;br /&gt;
=== Can I control where a cell will be placed on the spreadsheet window? ===&lt;br /&gt;
&lt;br /&gt;
By default, an unoccupied cell on the active sheet will be chosen to display the result. However, you can specify exactly in the pipeline where a spreadsheet cell will be placed by using CellLocation and SheetReference. CellLocation specifies the location (row and column) of a cell when connecting to a spreadsheet cell (VTKCell, ImageViewerCell, ...). Similarly, a SheetReference module (when connecting to a CellLocation) will specify which sheet the cell will be put on given its name, minimum row size and minimum column size. There is an example of this in examples/vtk.xml (select the version below Double Renderer).  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
=== How do I output results to the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
By inspecting the VisTrails Spreadsheet package (in the list of packages, to the left of the pipeline builder), you&lt;br /&gt;
can see there are built-in cells for different kinds of data, e.g., RichTextCell to display HTML and plain text. op&lt;br /&gt;
You (the user) can also define new cell types to display application-specific data. For example, we have developed&lt;br /&gt;
VtkCell, MplFigureCell, and  OpenGLCell. It is possible to display pretty much anything on the Spreadsheet!  [http://www.vistrails.org/usersguide/spreadsheet.html#sending-output-to-the-spreadsheet Sending Output to the Spreadsheet]&lt;br /&gt;
&lt;br /&gt;
Examples of writing cell modules can be found in:&lt;br /&gt;
RichTextCell: packages/spreadsheet/widgets/richtext/richtext.py&lt;br /&gt;
VTK: packages/vtk/vtkcell.py&lt;br /&gt;
&lt;br /&gt;
Here is the summary of some requirements on a cell widget:&lt;br /&gt;
&lt;br /&gt;
(1) It must be a Qt widget. It should inherit from spreadsheet_cell.QCellWidget in the spreadsheet package. Although any Qt Widget would work, certain features such as animation will not be available (without rewriting it).&lt;br /&gt;
&lt;br /&gt;
(2) It must re-implement the updateContents() function to take a set of inputs (usually coming from input ports of a wrapper Module) and display on the cells. VisTrails uses this function to update/reuse cells on the spreadsheet when new data comes in.&lt;br /&gt;
&lt;br /&gt;
(3) It needs a wrapper VisTrails Module (inherited from basic_widgets.SpreadsheetCell of the spreadsheet package). Inside the compute() method of this module, it may call self.display(CellWidgetType, (inputs)) to trigger the display event on the spreadsheet.  [http://www.vistrails.org/usersguide/spreadsheet.html#advanced-cell-options Advanced Cell Options]&lt;br /&gt;
&lt;br /&gt;
=== How do I control the default number of cells in the spreadsheet? ===&lt;br /&gt;
&lt;br /&gt;
You can configure the rowCount and colCount using the preferences dialog. Just go to the Module Packages tab, select spreadsheet in the &amp;quot;Enabled packages&amp;quot; and press the Configure button. Then a list of all the configuration options for the spreadsheet will show up.  [http://www.vistrails.org/usersguide/spreadsheet.html#custom-layout-options Custom Layout Options]&lt;br /&gt;
&lt;br /&gt;
=== Is it possible to launch a web browser from the vistrails spreadsheet?  We would like to output several urls from a parameter sweep and then have the option to click on each one to view the resulting page.  I can view the page within the spreadsheet, but it is really too crowded.===&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't a widget that provides exactly this functionality, but I can think of a few solutions that may work for you:&lt;br /&gt;
&lt;br /&gt;
(1) You can use parameter exploration to generate multiple sheets so you might have an exploration that opens each page in a new sheet.  Use the third column/dimension in the exploration interface to have a parameter span sheets.&lt;br /&gt;
&lt;br /&gt;
(2) The spreadsheet is extensible so you can write a custom spreadsheet cell widget that has a button or label with the desired link (a QLabel with openExternalLinks set to True, for example).&lt;br /&gt;
&lt;br /&gt;
(3) You can tweak the existing RichTextCell be adding the line &amp;quot;self.browser.setOpenExternalLinks(True)&amp;quot; at line 63 of the source file &amp;quot;vistrails/packages/spreadsheet/widgets/richtext/richtext.py&amp;quot;.  Then, if your workflow creates a file with html markup text like &amp;quot;&amp;lt;a href=&amp;quot;http://www.vistrails.org&amp;quot;&amp;gt;VisTrails&amp;lt;/a&amp;gt;&amp;quot; connected to a RichTextCell, clicking on the rendered link in the cell will open it in a web browser. You need to add the aforementioned line to the source to let Qt know that you want the link opened externally; by default, it will just issue an event that isn't processed.  [http://www.vistrails.org/usersguide/spreadsheet.html#launching-a-web-browser Launching a Web Browser]&lt;br /&gt;
&lt;br /&gt;
== Integrating your software into VisTrails ==&lt;br /&gt;
&lt;br /&gt;
===How can I integrate my own program into VisTrails?===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to create a package. Writing a package is often very simple, here are instructions on how to do it: [[UsersGuideVisTrailsPackages]]&lt;br /&gt;
&lt;br /&gt;
You can also dynamically generate modules. For an example see:&lt;br /&gt;
&lt;br /&gt;
http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#Packages_that_generate_modules_dynamically&lt;br /&gt;
&lt;br /&gt;
In particular, see the new_module call which uses python's type() function to generate new classes dynamically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How do modules deal with multiple inputs in a same port? ===&lt;br /&gt;
&lt;br /&gt;
(And should that even be allowed?)&lt;br /&gt;
&lt;br /&gt;
For compatibility reasons, we do need to allow multiple connections to an input port. However, most package developers should never have to use this, and so we do our best to hide it. the default behavior for getting inputs from a port, then, is to always return a single input.&lt;br /&gt;
&lt;br /&gt;
If on your module you need multiple inputs connected to a single port, use the 'forceGetInputListFromPort' method. It will return a list of all the data items coming through the port. The VTK package uses this feature, so look there for usage examples (packages/vtk/base_widget.py)&lt;br /&gt;
&lt;br /&gt;
=== Are there mechanisms for attaching widgets to different modules/parameters? ===&lt;br /&gt;
&lt;br /&gt;
Right now, we have a mechanism for putting a specific widget for an input port. For example, if a port is SetColor(red, green, blue), we can put a color wheel widget there. Or we can also replace the SetFileName port with a File Widget. However, this is not per parameter (only per port). We are currently working on this problem.&lt;br /&gt;
&lt;br /&gt;
=== Can I organize my package so it appears hierarchical in the module palette? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the namespace keyword argument when adding the module to the registry.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='MyNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Can I nest namespaces? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Use the '|' character to separate different the hierarchy.  For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_module(MyModule, namespace='ParentNamespace|ChildNamespace')&lt;br /&gt;
&lt;br /&gt;
=== Are there shortucts for registry initialization? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  If you define _modules as a list of classes in the __init__.py file of your package, VisTrails will attempt to load all classes specified as modules.  You can provide add_module options as keyword arguments by specifying a tuple (class, kwargs) in the list.  For example:&lt;br /&gt;
&lt;br /&gt;
 _modules = [MyModule1, (MyModule2, {'namespace': 'MyNamespace'})]&lt;br /&gt;
&lt;br /&gt;
In addition, you need to identify the ports of your modules as a field in your class by defining _input_ports and _output_ports lists.  Here, the items in each list must be tuples of the form (portName, portSignature, optional=False, sort_key=-1).  For example:&lt;br /&gt;
&lt;br /&gt;
 class MyModule(Module):&lt;br /&gt;
     def compute(self):&lt;br /&gt;
        pass&lt;br /&gt;
 &lt;br /&gt;
    _input_ports = [('firstInput', String), ('secondInput', Integer, True)]&lt;br /&gt;
    _output_ports = [('firstOutput', String), ('secondOutput', String)]&lt;br /&gt;
&lt;br /&gt;
=== Can I define ports to be of types that I do not import into my package? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  You can pass an identifier string as the portSignature instead.  The port_signature string is defined by:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;module_string&amp;gt; := &amp;lt;package_identifier&amp;gt;:[&amp;lt;namespace&amp;gt;|]&amp;lt;module_name&amp;gt;,&lt;br /&gt;
 &amp;lt;port_signature&amp;gt; := (&amp;lt;module_string&amp;gt;*)&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
 registry.add_input_port(MyModule, 'myInputPort', '(edu.utah.sci.vistrails.basic:String)')&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  _input_ports = [('myInputPort', '(edu.utah.sci.vistrails.basic:String)')]&lt;br /&gt;
&lt;br /&gt;
=== What do I need to change in my package to make it reloadable (new in v1.4.2)? ===&lt;br /&gt;
See [http://www.vistrails.org/index.php/UsersGuideVisTrailsPackages#How_to_make_you_package_reloadable UsersGuideVisTrailsPackages] for an explanation.&lt;br /&gt;
&lt;br /&gt;
=== Can I add default values or labels for parameters? ===&lt;br /&gt;
&lt;br /&gt;
Yes.  Versions 1.4 and greater support these features.  See [[UsersGuideVisTrailsPackages#Adding_default_values_and.2For_labels_for_parameters | UsersGuideVisTrailsPacakges]] for more details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== I want to write a module to load HDF data whose output (e.g., data, string) varies according to the input I give it. Is is possible to do this in VisTrails, and if yes, how can I do that?  Ideally, I would like to avoid having to change the connection of my output every time I change the input. ===&lt;br /&gt;
&lt;br /&gt;
  There are a few ways to tackle this - each has it's own benefits and pitfalls.  Firstly, module connections do respect class hierarchies as we're familiar with in object oriented languages.  For instance, A module can output a Constant of which String, Float, Integer, etc are specifications.  In this way, you can have a subclass of something like HDFData be passed out of the module and the connections will be established regardless of the sub-type.  This is a bit dangerous though.  Modules downstream of such a class may not really know how to operate on certain types derived from the super-class.  Extreme care must be taken both when creating the modules as well as connecting them to prevent things like this from happening.&lt;br /&gt;
&lt;br /&gt;
  A second method that I employ in several different packages is the idea of a container class.  For instance, the NumSciPy package uses a relatively generic container &amp;quot;Numpy Array&amp;quot; to encapsulate the data.  Of course, these encapsulating objects can store dictionaries that other modules can easily access and understand how to operate on.   Although this method is slightly more work, the benefits of a stricter typing of ports is beneficial - particularly upon interfacing with other packages that may depend on strongly typed constants (for example).&lt;br /&gt;
&lt;br /&gt;
== The Console ==&lt;br /&gt;
&lt;br /&gt;
=== Where should I go to find out what I can call from the console and how to import it?  ===&lt;br /&gt;
&lt;br /&gt;
We have tried to make some methods more accessible in the console via an api.  You can import the api via &amp;lt;code&amp;gt;import api&amp;lt;/code&amp;gt; in the console and see the available methods with &amp;lt;code&amp;gt;dir(api)&amp;lt;/code&amp;gt;.  To open a vistrail:&lt;br /&gt;
&lt;br /&gt;
 import api&lt;br /&gt;
 api.open_vistrail_from_file('/Applications/VisTrails/examples/terminator.vt')&lt;br /&gt;
&lt;br /&gt;
To execute a version of a workflow, you currently have to go through the controller:&lt;br /&gt;
&lt;br /&gt;
 api.select_version('Histogram')&lt;br /&gt;
 api.get_current_controller().execute_current_workflow()&lt;br /&gt;
&lt;br /&gt;
Currently, only a subset of VisTrails functionality is directly available from the api.  However, since VisTrails is written in python, you can dig down starting with the VistrailsApplication or controller object to expose most of our internal methods.  If you have suggestions for calls to be added to the api, please let us know.&lt;br /&gt;
&lt;br /&gt;
One other feature that we're working on, but is still in progress is the ability to construct workflows via the console.  For example:&lt;br /&gt;
&lt;br /&gt;
 vtk = load_package('edu.utah.sci.vistrails.vtk')&lt;br /&gt;
 vtk.vtkDataSetReader() # adds a vtkDataSetReader module to the pipeline&lt;br /&gt;
 # click on the new module&lt;br /&gt;
 a = selected_modules()[0] # get the one currently selected module&lt;br /&gt;
 a.SetFile('/vistrails/examples/data/head120.vtk') # sets the SetFile parmaeter for the data set reader&lt;br /&gt;
 b = vtk.vtkContourFilter() # adds a vtkContourFilter module to the pipeline and saves to var b&lt;br /&gt;
 b.SetInputConnection0(a.GetOutputPort0()) # connects a's GetOutputPort0 port to b's SetInputConnection0&lt;br /&gt;
&lt;br /&gt;
== Persistence Package ==&lt;br /&gt;
&lt;br /&gt;
=== How do I use the output of one workflow as the input for another using the persistence package? ===&lt;br /&gt;
&lt;br /&gt;
You need to configure the persistence modules using the module's configuration dialog.  After adding a &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt; to the workflow, click on the triangle in the upper-right corner of the &amp;lt;code&amp;gt;PersistentOutputFile&amp;lt;/code&amp;gt;, and select &amp;quot;Edit Configuration&amp;quot; from the menu that appears.  In this dialog, select &amp;quot;Create New Reference&amp;quot; and give the reference a name (and any space-delimited tags).  Upon running that workflow, the data will be written to the persistent store.  In the second workflow where you wish to use that file, add a &amp;lt;code&amp;gt;PersistentInputFile&amp;lt;/code&amp;gt; and go to its configuration dialog in the same manner as with the output file.  In that dialog, select &amp;quot;Use Existing Reference&amp;quot; and select the data that you just added in the first workflow in the list of files below.  Now, when you run that workflow, it will grab the data from the persistent store.&lt;br /&gt;
&lt;br /&gt;
Here is an example: [[Media:offscreen_persistent.vt | offscreen_persistent.vt]].  Run the &amp;quot;persistent offscreen&amp;quot; workflow first, and then run the &amp;quot;display persistent output&amp;quot; to use the output of the first workflow as the input for the second.&lt;br /&gt;
&lt;br /&gt;
== VTK ==&lt;br /&gt;
&lt;br /&gt;
=== Given a VTK visualization, how can I generate a webpage from it? ===&lt;br /&gt;
&lt;br /&gt;
Check out the html pipeline in offscreen.xml.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to use VTK, but there doesn't seem to be any output. What is wrong? ===&lt;br /&gt;
&lt;br /&gt;
To use VTK on VisTrails, you need a slightly different way of connecting the renderer modules. Instead of using the standard RenderWindow/RenderWindowInteractor infrastructure, you simply connect the renderer to a VTKCell. The examples directory in the distribution has several VTK examples that illustrate.&lt;br /&gt;
&lt;br /&gt;
=== I am trying to add a module to the workflow via Python, but how can I access vtk modules? ===&lt;br /&gt;
&lt;br /&gt;
Here's an example:&lt;br /&gt;
&lt;br /&gt;
import api&lt;br /&gt;
&lt;br /&gt;
vtvtk = 'edu.utah.sci.vistrails.vtk'&lt;br /&gt;
&lt;br /&gt;
module = api.add_module(0, 0, vtvtk, 'vtkContourFilter', '')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third argument in add_module is the package identifier.  You can find this in the &amp;quot;Module Packages&amp;quot; panel of the Preferences; just click on the package you're interested in and it will appear in the information on the right.&lt;br /&gt;
&lt;br /&gt;
== matplotlib ==&lt;br /&gt;
&lt;br /&gt;
=== I'm experiencing a problem with Latex labels and the matplotlib that comes with VisTrails 1.5. The script below entered to the interpreter that comes with VT is sufficient to reproduce it. ===&lt;br /&gt;
&lt;br /&gt;
   import matplotlib.pyplot as plt&lt;br /&gt;
   plt.plot([1,2,3],[1,2,3])&lt;br /&gt;
   plt.xlabel(&amp;quot;$foo$&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Remove your ~/.matplotlib folder and re-start VisTrails&lt;br /&gt;
&lt;br /&gt;
== VisTrails Development ==&lt;br /&gt;
&lt;br /&gt;
=== I would like to build VisTrails from source. Are there instructions on how to do this? ===&lt;br /&gt;
&lt;br /&gt;
Yes! Take a look at http://www.vistrails.org/index.php/Mac_Intel_Instructions&lt;br /&gt;
[http://www.vistrails.org/usersguide/getting_started.html#installing-vistrails-from-source Installing VisTrails from source]&lt;br /&gt;
&lt;br /&gt;
== Accessing Provenance Information ==&lt;br /&gt;
&lt;br /&gt;
=== How do I access the information in the execution log? ===&lt;br /&gt;
&lt;br /&gt;
The code responsible for storing execution information is located in the &amp;quot;core/log&amp;quot; directories, and the code that generates much of that information is in &amp;quot;core/interpreter/cached.py&amp;quot;.  Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects.  To analyze the log from a vistrail (.vt) file, you might have something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  import core.log.log&lt;br /&gt;
  import db.services.io&lt;br /&gt;
&lt;br /&gt;
  def run(fname):&lt;br /&gt;
   # open the .vt bundle specified by the filename &amp;quot;fname&amp;quot;&lt;br /&gt;
   bundle = db.services.io.open_vistrail_bundle_from_zip_xml(fname)[0]&lt;br /&gt;
   # get the log filename&lt;br /&gt;
   log_fname = bundle.vistrail.db_log_filename&lt;br /&gt;
   if log_fname is not None:&lt;br /&gt;
       # open the log&lt;br /&gt;
       log = db.services.io.open_log_from_xml(log_fname, True)&lt;br /&gt;
       # convert the log from a db object&lt;br /&gt;
       core.log.log.Log.convert(log)&lt;br /&gt;
       for workflow_exec in log.workflow_execs:&lt;br /&gt;
           print 'workflow version:', workflow_exec.parent_version&lt;br /&gt;
           print 'time started:', workflow_exec.ts_start&lt;br /&gt;
           print 'time ended:', workflow_exec.ts_end&lt;br /&gt;
           print 'modules executed:', [i.module_id &lt;br /&gt;
                                       for i in workflow_exec.item_execs]&lt;br /&gt;
  if __name__ == '__main__':&lt;br /&gt;
     run(&amp;quot;some_vistrail.vt&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to see what information is available by looking at the &amp;quot;core/log&amp;quot; classes.&lt;/div&gt;</summary>
		<author><name>Ctuttle</name></author>
	</entry>
</feed>