[Swift-commit] r2993 - provenancedb

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Tue Jun 30 07:40:25 CDT 2009


Author: benc
Date: 2009-06-30 07:40:25 -0500 (Tue, 30 Jun 2009)
New Revision: 2993

Modified:
   provenancedb/prov-to-sql.sh
Log:
record root thread as a process

put compounds and internal procedures into the processes_in_workflows table

Modified: provenancedb/prov-to-sql.sh
===================================================================
--- provenancedb/prov-to-sql.sh	2009-06-30 12:39:32 UTC (rev 2992)
+++ provenancedb/prov-to-sql.sh	2009-06-30 12:40:25 UTC (rev 2993)
@@ -12,6 +12,11 @@
 
 rm -f tmp-import.sql
 
+# this gives a distinction between the root process for a workflow and the
+# workflow itself. perhaps better to model the workflow as a process
+echo "INSERT INTO processes_in_workflows (process_id, workflow_id) VALUES ('${WFID}0', '$WF');" >> tmp-import.sql
+  echo "INSERT INTO processes (id, type) VALUES ('${WFID}0', 'rootthread');" >> tmp-import.sql
+
 while read time duration thread localthread endstate app scratch; do
   echo "INSERT INTO processes (id, type) VALUES ('$thread', 'execute');" >> tmp-import.sql
   echo "INSERT INTO processes_in_workflows (process_id, workflow_id) VALUES ('$thread', '$WF');" >> tmp-import.sql
@@ -88,12 +93,14 @@
 while read start duration thread finalstate procname ; do
   compoundid=$WFID$thread
   echo "INSERT INTO processes (id, type) VALUES ('$compoundid', 'compound');" >> tmp-import.sql
+  echo "INSERT INTO processes_in_workflows (process_id, workflow_id) VALUES ('$compound', '$WF');" >> tmp-import.sql
   echo "INSERT INTO invocation_procedure_names (execute_id, procedure_name) VALUES ('$compoundid', '$procname');" >> tmp-import.sql
 done < compound.event
 
 while read start duration thread finalstate procname ; do
   fqid=$WFID$thread
   echo "INSERT INTO processes (id, type) VALUES ('$fqid', 'internal');" >> tmp-import.sql
+  echo "INSERT INTO processes_in_workflows (process_id, workflow_id) VALUES ('$fqid', '$WF');" >> tmp-import.sql
   echo "INSERT INTO invocation_procedure_names (execute_id, procedure_name) VALUES ('$fqid', '$procname');" >> tmp-import.sql
 done < internalproc.event
 




More information about the Swift-commit mailing list