On Mon, Sep 13, 2010 at 12:05, Dennis Neumann <[email protected]> wrote:
> Hi Stian,
> I am still having a problem with this. Taverna 2.2 now stores the provenance
> to my database. However, the table "Data" is not there, which is the reason
> I am doing the whole thing. Taverna 2.1.2 saves all the workflow inputs and
> outputs in it. I exported the schema for this table and added it to your
> script, but the table remains empty after running Taverna 2.2.

The 'Data' table is no longer populated as it was redundant by the
normal Taverna Database storage of values. If you set up the Taverna
reference service to also store the data values in mySQL, you should
also get the data stored in the database.


Unfortunately the auto-generated table layout from Hibernate is less
than helpful for the average database user.


For instance, to get the string values for every port, try:

mysql> SELECT i.contents,p.portName,pr.processorName,p.isInputPort
FROM Port p JOIN DataBinding db ON (p.portId=db.portId) JOIN
AbstractExternalReference a ON (substring_index(substring_index(a.id,
":", -2),":",1)=substring_index(t2reference, "?", -1)) JOIN
InlineStringReference i ON (i.bean_id=a.bean_id) JOIN Processor pr ON
(p.processorId=pr.processorId);
+----------+----------+---------------+-------------+
| contents | portName | processorName | isInputPort |
+----------+----------+---------------+-------------+
| 666      | value    | userID_value  |           0 |
| 666      | userID   | REST_Service  |           1 |
+----------+----------+---------------+-------------+
2 rows in set (0.00 sec)

(In this case the string "666" was output from the string constant
userID_value and sent to the processor REST_Service.)

You probably also want to join in with ProcessorEnactment and
WorkflowRun to inspect only values for a particular run and exclude
nested workflow ports.


To get error documents you would have to look in a different table:

mysql> SELECT message,p.portName FROM Port p JOIN DataBinding db ON
(p.portId=db.portId) JOIN ErrorDocumentImpl e ON
(e.localPart=substring_index(substring_index(t2reference, "?", -1),
"/", 1)) WHERE p.processorId IS NULL AND p.isInputPort=0;
+-------------------------------------------------------------------------------+--------------+
| message
         | portName     |
+-------------------------------------------------------------------------------+--------------+
| Processor 'REST_Service' - Port 'status': The service is not
executable       | status       |
| Processor 'REST_Service' - Port 'responseBody': The service is not
executable | responseBody |
+-------------------------------------------------------------------------------+--------------+
2 rows in set (0.00 sec)


You'll notice the strange use of substring_index as I had to massage
the identifiers. DataBinding will contain for instance:

+--------------------------------------+--------------------------------------+---------------------------------------------------------------------------------------+--------------------------------------+
| dataBindingId                        | portId
       | t2Reference
                        | workflowRunId                        |
+--------------------------------------+--------------------------------------+---------------------------------------------------------------------------------------+--------------------------------------+
| 96cc74d1-703b-4798-8b53-771ff40ca746 |
36eaa672-edf6-4ac2-b1e7-aba47f5ce0e0 |
t2:ref//15fccf9b-6037-4a12-85f2-0d5e392df731?2e516933-35bb-4dc0-9835-c3190377ae3e
    | 15fccf9b-6037-4a12-85f2-0d5e392df731 |
| b436fc9e-e029-4e0a-b8b7-8ca8622108f0 |
4a0b05eb-12a0-4aa1-9c47-2d1aa74f0922 |
t2:ref//15fccf9b-6037-4a12-85f2-0d5e392df731?2e516933-35bb-4dc0-9835-c3190377ae3e
    | 15fccf9b-6037-4a12-85f2-0d5e392df731 |
| 0d80a8bb-922f-43c5-8c1d-460a4eec04ff |
687f1a73-6dcb-48cc-bc51-aac94f51ab3b |
t2:error//15fccf9b-6037-4a12-85f2-0d5e392df731?cac0558f-f6d0-42b2-9849-c268dfca8a74/0
| 15fccf9b-6037-4a12-85f2-0d5e392df731 |
| 0d80a8bb-922f-43c5-8c1d-460a4eec04ff |
99f92ddb-19e3-4cf8-9965-f3edb9b3fc15 |
t2:error//15fccf9b-6037-4a12-85f2-0d5e392df731?a664507b-ee0e-44e0-96d0-939fcb32e62b/0
| 15fccf9b-6037-4a12-85f2-0d5e392df731 |

so you'll need to dispatch to different tables depending on if it is
t2:ref, t2:error or t2:list. You need to pick up the second UUID (like
2e516933-35bb-4dc0-9835-c3190377ae3e and
a664507b-ee0e-44e0-96d0-939fcb32e62b) as this is the unique 'local
part' within the namespace '15fccf9b-6037-4a12-85f2-0d5e392df731'  -
the namespace is shared for all values produced in the run
15fccf9b-6037-4a12-85f2-0d5e392df731)

Again in AbstractExternalReferences (keeping t2-refs) the identifier
is unfortunately in a different format:

mysql> select * FROM AbstractExternalReference;
+---------+-----------------------------------------------------------------------------+
| bean_id | id
                 |
+---------+-----------------------------------------------------------------------------+
|       1 | 
15fccf9b-6037-4a12-85f2-0d5e392df731:2e516933-35bb-4dc0-9835-c3190377ae3e:0
|
+---------+-----------------------------------------------------------------------------+

where bean_id needs to be looked up depending on the reference type.
Direct references will be found in FileReference or HttpReference (in
which case you need to download the URL), while
InlineByteArrayReference and InlineStringReference will contain
binaries and strings directly in the database.

Lists in T2ReferenceListImpl will again contain references in
listContents - note that when depth is 2 or more all the items will be
either lists or error documents of depth 1, while for depth 1 lists
the contents are depth 0, either external references or error
documents.


We're planning on exposing the Taverna Provenance API and RDF export
of provenance for Taverna 2.3, so this might be much easier for you to
deal with than the internals of the database.



-- 
Stian Soiland-Reyes, myGrid team
School of Computer Science
The University of Manchester

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
taverna-hackers mailing list
[email protected]
Web site: http://www.taverna.org.uk
Mailing lists: http://www.taverna.org.uk/about/contact-us/
Developers Guide: http://www.taverna.org.uk/developers/

Reply via email to