--- a/bestpractices/BestPractices.html Fri Nov 25 08:54:18 2011 +0000
+++ b/bestpractices/BestPractices.html Fri Nov 25 09:14:09 2011 +0000
@@ -34,11 +34,18 @@
"<a href=\"http://www.w3.org/ns/prov-o/\"><cite>PROV Ontology Namespace</cite></a>. "+
"2011, Work in progress. "+
"URL: <a href=\"http://www.w3.org/ns/prov-o/\">http://www.w3.org/ns/prov-o/</a>",
+ "URL: <a href=\"http://www.w3.org/TR/prov-dm/\">http://www.w3.org/TR/prov-dm/</a>",
+ "PROV-O":
+ "S. Sahoo; D. McGuinness. "+
+ "<a href=\"http://dvcs.w3.org/hg/prov/raw-file/default/ontology/ProvenanceFormalModel.html\"><cite>PROV Ontology Model</cite></a>. "+
+ "2011, Work in progress. "+
+ "URL: <a href=\"http://dvcs.w3.org/hg/prov/raw-file/default/ontology/ProvenanceFormalModel.html/\">http://dvcs.w3.org/hg/prov/raw-file/default/ontology/ProvenanceFormalModel.html</a>",
+
};
var respecConfig = {
// specification status (e.g. WD, LCWD, NOTE, etc.). If in doubt use ED.
- specStatus: "ED",
+ specStatus: "FPWD",
// the specification's short name, as in http://www.w3.org/TR/short-name/
shortName: "prov-bestpractices",
@@ -67,8 +74,7 @@
// if you want to have extra CSS, append them to this list
// it is recommended that the respec.css stylesheet be kept
- extraCSS:
- ["http://dev.w3.org/2009/dap/ReSpec.js/css/respec.css", "./extra.css"],
+ extraCSS: ["http://dev.w3.org/2009/dap/ReSpec.js/css/respec.css", "./extra.css"],
// editors, add as many as you like
// only "name" is required
@@ -125,7 +131,11 @@
<body>
<section id="abstract">
-<p> </p>
+<p>This document is a suggestion of Best Practices for working with the
+[[PROV-DM]] model and in particular usage of the [[PROV-O]] ontology.
+This document is non-normative and informational only. For an
+introduction to PROV, see the [[PROV-Primer]].
+</p>
</section>
--- a/ontology/ProvenanceFormalModel.html Fri Nov 25 08:54:18 2011 +0000
+++ b/ontology/ProvenanceFormalModel.html Fri Nov 25 09:14:09 2011 +0000
@@ -34,6 +34,12 @@
"<a href=\"http://www.w3.org/ns/prov-o/\"><cite>PROV Ontology Namespace</cite></a>. "+
"2011, Work in progress. "+
"URL: <a href=\"http://www.w3.org/ns/prov-o/\">http://www.w3.org/ns/prov-o/</a>",
+
+ "PROV-BestPractices":
+ "Stian Soiland-Reyes "+
+ "<a href=\"http://dvcs.w3.org/hg/prov/raw-file/tip/bestpractices/provenance-bestpractices.html\"><cite>PROV Best Practices</cite></a>. "+
+ "2011, Work in progress. "+
+ "URL: <a href=\"http://dvcs.w3.org/hg/prov/raw-file/tip/bestpractices/provenance-bestpractices.html\">http://dvcs.w3.org/hg/prov/tip/paq/provenance-access.html</a>",
};
var respecConfig = {
@@ -1189,658 +1195,15 @@
<section class='informative' id="specializing-provenance-ontology-for-domain-specific-provenance-applications">
<h2>Specializing Provenance Ontology for Domain-specific Provenance Applications</h2>
- <p>The PROV Ontology is conceived as a reference ontology that can be extended by various domain-specific applications to model the required set of provenance terms. The PROv Ontology classes and properties can be specialized using the following two RDFS properties:</p>
+ <p>The PROV Ontology is conceived as a reference ontology that can be extended by various domain-specific applications to model the required set of provenance terms. The PROV Ontology classes and properties can be specialized using the following two RDFS properties:</p>
<ul>
<li>rdfs:subClassOf: The property rdfs:subClassOf is an instance of rdf:Property that is used to state that all the instances of one class are instances of another [[!RDF-SCHEMA]]</li>
<li>rdfs:subPropertyOf: "A rdfs:subPropertyOf axiom defines that the property is a subproperty of some other property" [[!RDF-SCHEMA]]</li>
</ul>
- <p>To illustrate the specialization mechanism, the PROV Ontology is extended to create an ontology schema for the <a href="http://www.w3.org/TR/2011/WD-prov-dm-20111018/#a-file-scenario">provenance scenario</a> describing the creation of the crime statistics file. </p>
-
-
-
- <section id="moeling-the-crime-file-scenario">
- <h3>Modeling the Crime File Scenario</h3>
- <p>The example scenario can be encoded as a <a href = "http://www.w3.org/TR/rdf-primer/"> Resource Description Framework (RDF)</a>. For example,</p>
- <ul>
- <li>specialization of <a href="#agent">Agent</a> to define a class called Journalist, which has individuals such as alice, bob, and edith </li>
- <li><a href="#activity">Activity</a>, e.g. FileCreation, FileAppending, and FileEditing </li>
- <li>specialization of <a href="#entity">Entity</a> to define a class called CrimeFile, which has individuals such as e1, e2, and e3 </li>
- </ul>
- <div class="anexample">
- <p>Example given below describes the provenance of <a href="#entity">Entity</a> e2 using RDF/XML syntax</p>
- <div class="exampleOuter">
- <pre class="example">
- <?xml version="1.0"?>
- <rdf:RDF
- xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
- xmlns:prov="http://www.w3.org/ns/prov-o/"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:cf="http://www.example.com/crime#">
-
- <rdf:Description rdf:about="http://www.example.com/crimeFile#e2">
- <rdf:type rdf:resource="http://www.w3.org/ns/prov-o/Entity"/>
- <rdf:type rdf:resource="http://www.example.com/crime#CrimeFile"/>
- <prov:wasGeneratedBy>
- <rdf:Description rdf:about="http://www.example.com/crimeFile#pe1">
- <rdf:type rdf:resource="http://www.w3.org/ns/prov-o/Activity"/>
- <rdf:type rdf:resource="http://www.example.com/crime#FileAppending"/>
- <prov:wasControlledBy>
- <rdf:Description rdf:about="http://www.example.com/crimeFile#Bob">
- <rdf:type rdf:resource="http://www.example.com/crime#Journalist"/>
- </rdf:Description>
- </prov:wasControlledBy>
- <prov:startedAt>
- <rdf:Description rdf:about="http://www.example.com/crimeFile#t1">
- <rdf:type rdf:resource="http://www.w3.org/2006/time#Instant"/>
- <time:inXSDDateTime>2011-10-20T16:26:45Z</time:inXSDDateTime>
- </rdf:Description>
- </prov:startedAt>
- <prov:endedAt>
- <rdf:Description rdf:about="http://www.example.com/crimeFile#t3">
- <rdf:type rdf:resource="http://www.w3.org/2006/time#Instant"/>
- <time:inXSDDateTime>2011-11-21T18:36:52Z</time:inXSDDateTime>
- </rdf:Description>
- </prov:endedAt>
- </rdf:Description>
- </prov:wasGeneratedBy>
- <prov:wasGeneratedAt>
- <rdf:Description rdf:about="http://www.example.com/crimeFile#t2">
- <rdf:type rdf:resource="http://www.w3.org/2006/time#Instant"/>
- <time:inXSDDateTime>2011-10-20T17:14:12Z</time:inXSDDateTime>
- </rdf:Description>
- </prov:wasGeneratedAt>
- <prov:wasDerivedFrom rdf:resource="http://www.example.com/crimeFile#e1"/>
- <cf:hasLocation>
- <rdf:Description rdf:about="http://www.example.com/crimeFile#sharedDirectoryLocation1">
- <rdf:type rdf:resource="http://www.w3.org/ns/prov-o/Location"/>
- <cf:hasFilePath rdf:datatype="http://www.w3.org/2001/XMLSchema#string">/share/crime.txt</cf:hasFilePath>
- </rdf:Description>
- </cf:hasLocation>
- <cf:hasFileContent rdf:datatype="http://www.w3.org/2001/XMLSchema#string">There
- was a lot of crime in London last month.</cf:hasFileContent>
- </rdf:Description>
- <rdf:Description rdf:about="http://www.example.com/crimeFile#pe2">
- <rdf:type rdf:resource="http://www.w3.org/ns/prov-o/Activity"/>
- <prov:used rdf:resource="http://www.example.com/crimeFile#e2"/>
- </rdf:Description>
- </rdf:RDF>
- </pre>
- </div>
- </div>
- <section id="specialization-of-prov-ontology-classes">
- <h4>Specialization of PROV Ontology Classes</h4>
- <p> The following new classes were created in the CrimeFile Ontology by extending the PROV ontology classes:</p>
- <section id="cf-journalist">
- <h5>cf:Journalist</h5>
- <p>The cf:Journalist is a specialization of the PROV ontology <a href="#agent">Agent</a> class and models all individuals that participate in creating, editing, and sharing the crime file.The following RDF/XML code illustrates how cf:Journalist is asserted to be a specialization of <a href="#agent">prov:Agent.</a></p>
- <div class="anexample">
- <div class="exampleOuter">
- <pre class="example">
- <rdf:Description rdf:about="http://www.example.com/crime#Journalist">
- <rdfs:subClassOf rdf:resource="http://www.w3.org/ns/prov-o/Agent"/>
- </rdf:Description>
- </pre>
- </div>
- </div>
- </section>
- <section id="cf-crimefile">
- <h5>cf:CrimeFile</h5>
- <p> The cf:CrimeFile is a specialization of the PROV ontology <a href="#entity">Entity</a> class and it models the the file describing the crime statistics in the <a href="http://www.w3.org/TR/2011/WD-prov-dm-20111018/#a-file-scenario">provenance scenario</a>, including the multiple versions of the file. The following RDF/XML code illustrates how cf:Journalist is asserted to be a specialization of <a href="#entity">prov:Entity</a>.
- </p>
- <div class="anexample">
- <div class="exampleOuter">
- <pre class="example">
- <rdf:Description rdf:about="http://www.example.com/crime#CrimeFile">
- <rdfs:subClassOf rdf:resource="http://www.w3.org/ns/prov-o/Entity"/>
- </rdf:Description>
- </pre>
- </div>
- </div>
- </section>
- <section id="cf-filecreation">
- <h5>cf:FileCreation, cf:FileEditing, cf:FileAppending, cf:Emailing, cf:SpellChecking</h5>
- <p>The classes cf:FileCreation, cf:FileEditing,
- cf:FileAppending, cf:Emailing, cf:SpellChecking are
- specialization of the PROV ontology <a
- href="#activity">Activity</a> and model the
- different activities in the <a
- href="http://www.w3.org/TR/2011/WD-prov-dm-20111018/#a-file-scenario">provenance
- scenario</a>. The following RDF/XML code illustrates the
- specialization of the <a href="#activity">prov:Activity</a> to define class cf:FileCreation (other classes can be similarly defined by using the subClassOf property).</p>
- <div class="anexample">
- <div class="exampleOuter">
- <pre class="example">
- <rdf:Description rdf:about="http://www.example.com/crime#FileCreation">
- <rdfs:subClassOf rdf:resource="http://www.w3.org/ns/prov-o/Activity"/>
- </rdf:Description>
- </pre>
- </div>
- </div>
- <p>The following diagram illustrates the above class specializations: </p>
-<!--
- <img src="http://www.w3.org/2011/prov/wiki/images/5/5d/AlternativeSchema.png" alt="New classes (cf:SpellChecking, cf:FileEditing, cf:FileCreation, cf:FileAppending, cf:Emailing, cf:Journalist) extend the classes in the PROV Ontology (Entity, Agent, Activity)."/>
- <a href="https://dvcs.w3.org/hg/prov/raw-file/631b9ae346a0/ontology/examples/ontology-extensions/crime-file/diagrams/2011-10-04-tlebo/crime.owl.classes.pdf"><img src="https://dvcs.w3.org/hg/prov/raw-file/631b9ae346a0/ontology/examples/ontology-extensions/crime-file/diagrams/2011-10-04-tlebo/crime.owl.classes.png" alt="New classes (cf:SpellChecking, cf:FileEditing, cf:FileCreation, cf:FileAppending, cf:Emailing, cf:Journalist) extend the classes in the PROV Ontology (Entity, Agent, Activity)."/></a>
- <img src="examples/ontology-extensions/crime-file/diagrams/2011-10-13-ssoiland/crime.owl.png "
- style="min-width: 45em; width: 55em; max-width: 95%"
- alt="New classes (:SpellChecking, :FileEditing, :FileCreation, :FileAppending, :Emailing, :Journalist) extend the classes in the PROV Ontology (prov:Entity, prov:Agent, prov:Activity). "/>
--->
- <img src="examples/ontology-extensions/crime-file/diagrams/2011-10-13-ssoiland/crime.owl.classes.png "
- style="min-width: 35em; width: 45em; max-width: 95%"
- alt="New classes (:SpellChecking, :FileEditing, :FileCreation, :FileAppending, :Emailing, :Journalist) extend the classes in the PROV Ontology (prov:Entity, prov:Agent, prov:Activity). "/>
- <br>
- <em>Example extension of PROV ontology in order to describe the crime file scenario</em>
- </section>
- </section>
- <section id="specialization-of-prov-ontology-properties">
- <h4>Specialization of PROV Ontology Properties</h4>
- <p> The following new object property was created in the CrimeFile Ontology by extending the PROV ontology object property:</p>
- <section id="cf-hadfilepath">
- <h5>cf:hadFilePath</h5>
- <p>The property cf:hadFilePath is a specialization of the PROV ontology hadLocation object property and links the class CrimeFile to the FileDirectory class. The following RDF/XML code illustrates the use of rdfs:subPropertyOf to create hadFilePath property.</p>
- <div class="anexample">
- <div class="exampleOuter">
- <pre class="example">
- <rdf:Description rdf:about="http://www.example.com/crime#hadFilePath">
- <rdfs:subPropertyOf rdf:resource="http://www.w3.org/ns/prov-o/hadLocation"/>
- </rdf:Description>
- </pre>
- </div>
- </div>
- </section>
- <p>The following diagram illustrates the above property specialization: </p>
-<!--
- <a href="https://dvcs.w3.org/hg/prov/raw-file/631b9ae346a0/ontology/examples/ontology-extensions/crime-file/diagrams/2011-10-04-tlebo/crime.owl.properties.pdf">
- <img src="https://dvcs.w3.org/hg/prov/raw-file/631b9ae346a0/ontology/examples/ontology-extensions/crime-file/diagrams/2011-10-04-tlebo/crime.owl.properties.png"
- alt="ext:FileCreation, ext:FileAppending, ext:FileEditing, ext:Emailing, extSpellChecking extend prov:Activity; ext:Journalist extends prov:Agent; ext:CrimeFile extends prov:Entity; ext:hadFilePath extends prov:hadLocation and has range prov:Location."/>
- </a>
--->
- <img src="examples/ontology-extensions/crime-file/diagrams/2011-10-13-ssoiland/crime.owl.properties.png "
- style="min-width: 30em; width: 40em; max-width: 95%"
- alt="ext:FileCreation, ext:FileAppending, ext:FileEditing, ext:Emailing, extSpellChecking extend prov:Activity; ext:Journalist extends prov:Agent; ext:CrimeFile extends prov:Entity; ext:hadFilePath extends prov:hadLocation and has range prov:Location."/>
- <br>
- <em>Example extension of PROV ontology in order to describe the crime file scenario</em>
- </section>
- </section>
- <section id="modeling-an-example-scientific-workflow-scenario">
- <h3>Modeling an Example Scientific Workflow Scenario</h3>
- <p>This section describes an example of extending the PROV
- ontology to create a provenance ontology for scientific
- workflows.</p>
+ <p>The [[PROV-BestPractices]] document illustrates this
+ specialisation mechanism by defining two PROV-O extensions
+ for domain-specific examples.</p>
- <p>Scientific workflow systems allow the specification of a
- pipeline of processes which are linked from outputs to inputs.
- Such workflow definitions are typically created in a graphical
- user interface or interactive web application, and can then be
- <em>enacted</em> using particular inputs or parameters.
- Scientists in fields like bioinformatics, chemistry and
- physics use such workflows to perform repeated analysis by
- connecting together disparate set of domain-specific tools and
- services.
- </p>
- <p>
- Capturing the provenance of executions in such a workflow
- system will typically include details of each of the process
- executions, such as its inputs and outputs, start and stop
- time, and should ultimately be able to describe the complete
- data lineage through the workflow for any returned output data.
- </p>
- <p>
- This example is not attempting to be a complete or general
- ontology for asserting workflow provenance, but highlights how
- a particular application like a workflow system can express its
- domain specific attributes based on the PROV ontology.
- </p>
- <p>
- <img
- src="examples/ontology-extensions/workflow/workflowOntology.png"
- style="width: 60%; min-width: 20em; max-width: 40em"
- alt="New classes wf:WorkFlowEngine, wf:Process,
- wf:ValueAtPort, wf:FileValue, and wf:Value extend prov:Agent,
- prov:Activity. New properties wf:wasLaunchedBy, wf:ranInWorkflowEngine, wf:wasSubActivityOf, wf:wasReadFrom, wf:sawValue extend prov:wasControlledBy, prov:wasDerivedFrom." />
- <br>
- <em>Example extension of PROV ontology in order to describe
- workflow provenance. This OWL ontology can be downloaded as
- <a
- href="examples/ontology-extensions/workflow/workflowOntology.rdf">RDF/XML</a>
- and
- <a
- href="examples/ontology-extensions/workflow/workflowOntology.ttl">Turtle</a>
- </em>
- </p>
- <section id="workflow-extensions-to-prov-classes">
- <h4>Workflow extensions to PROV classes</h4>
- <p>
- In order to describe workflow executions following the
- model above, the PROV ontology is extended with
- workflow-specific subclasses described below:
- </p>
- <dl>
- <dt>wf:Process</dt>
- <dd>
- A subclass of <i>prov:Activity</i> to
- signify an execution of a process which
- <i>wf:wasDefinedBy</i> a
- a <i>wf:ProcessDefinition</i>, e.g. a workflow or a
- process in a workflow. A workflow process can also
- act as an <i>prov:Agent</i> when controlling nested
- process executions.
- </dd>
- <dt>wf:WorkflowEngine</dt>
- <dd>
- A subclass of <i>prov:Agent</i> to indicate that a
- workflow process was controlled by a workflow
- engine.
- </dd>
- <dt>wf:Value</dt>
- <dd>
- A subclass of <i>prov:Entity</i>, representing a
- value appearing in the workflow execution, it will
- typically be <i>used</i> or <i>generated</i> by
- <i>wf:Process</i> executions. The actual value can
- be provided as a literal with a <i>wf:value</i> property.
- </dd>
- <dt>wf:FileValue</dt>
- <dd>
- A <i>wf:Value</i> which has been read from a file.
- As an <i>prov:Entity</i> this represents
- an entity with both attributes <i>wf:value</i> and
- <i>wf:file</i> fixed, that is the entity describes
- the point when the given file contained the
- content. As the file might be read a while before
- the <i>wf:Value</i> is used by a <i>wf:Process</i>,
- at which point the file content might have changed,
- those values are declared as being derived from
- this file value using the <i>wf:wasReadFrom</i>
- property.
- </dd>
- <dt>wf:ValueAtPort</dt>
- <dd>
- A subclass of <i>prov:QualifiedInvolvement</i>, representing a
- value (given by <i>wf:sawValue</i>) observed at a
- given port in the workflow (given by
- <i>wf:seenAtPort</i>. This description is the range
- of <i>wf:generatedValue</i> and <i>wf:usedValue</i>
- on a <i>wf:Process</i>.
- </dd>
- </dl>
- </section>
- <section id="workflow-extensions-to-prov-properties">
- <h4>Workflow extensions to PROV properties</h4>
- <p>
- While for most cases subclassing will provide the
- additional expressionality the application needs, this
- example ontology also expands on the PROV ontology
- with more specific subproperties.
- </p>
- <dl>
- <dt>wf:wasDefinedBy</dt>
- <dd>
- This sub-property of <i>prov:hadRecipe</i>
- links a
- <i>wf:Process</i> to the defining
- <i>wf:ProcessDefinition</i>. Thus, if there are
- multiple executions of the same workflow definition,
- each of the separate <i>wf:Process</i>es will link to
- the same definition.
- </dd>
- <dt>wf:ranInWorkflowEngine</dt>
- <dd>
- This subproperty of <i>prov:wasControlledBy</i> links a
- <i>wf:Process</i> to the <i>wf:WorkflowEngine</i> it
- was executed in. The engine instance might contain
- additional details such as which version of the
- workflow system was used.
- </dd>
- <dt>wf:wasLaunchedBy</dt>
- <dd>
- This second subproperty of <i>prov:wasControlledBy</i> links a
- <i>wf:Process</i> to a <i>prov:Agent</i>, indicating
- which person asked to execute the given
- wf:ProcessDefinition in the specified
- <i>wf:WorkflowEngine</i>.
- </dd>
- <dt>wf:wasSubActivityOf</dt>
- <dd>
- This subproperty of <i>prov:wasControlledBy</i> links a
- <i>wf:Process</i> to another <i>prov:Process</i>, indicating
- this is a child execution
- <div class='issue'>Should there be a general way to state subprocesses? -Stian</div>
- </dd>
- <dt>wf:wasReadFrom</dt>
- <dd>
- <p>
- This subproperty of <i>prov:wasDerivedFrom</i> links a
- <i>wf:Value</i> to the <i>wf:FileValue</i> it was read
- from, typically when used as a workflow input.
- As described for <i>wf:FileValue</i> this distinction
- is done because at the time the workflow input is used
- in the workflow, the file input might be different and
- thus should not be described as an attribute of that
- <i>wf:Value</i>.
- </p>
- <p>
- This property hints of an undescribed "Read file"
- process execution which is not described. This is
- therefore an example of how the provenance asserter
- is limiting the scope of its provenance. The engine
- knows that the file was read, but is not able or
- willing to provide any deeper assertions, because its
- primary scope is at the level of executing workflow
- definitions.
- </p>
- </dd>
- <dt>wf:sawValue</dt>
- <dd>
- A subproperty of <i>prov:hadQualifiedEntity</i> which
- indicates that an <i>wf:Value</i> was
- <i>wf:seenAtPort</i> within an
- <i>wf:ValueAtPort</i>.
- </dd>
-
- <dt>wf:seenAtPort</dt>
- <dd>
- A subproperty of <i>prov:hadRole</i>
- indicating which <i>wf:Port</i> (in the workflow
- definition) a <i>wf:ValueAtPort</i> was seen at. Thus one can see
- at which output port a value was generated, or at
- which input port(s) it was used.
- </dd>
- <dt>wf:generatedValue</dt>
- <dd>
- A subproperty of <i>prov:hadQualifiedGeneration</i>,
- specifying which port we <i>wf:sawValue</i> and
- where it <i>wf:wasSeenAtPort</i> as it was
- generated. The domain of this
- property is <i>wf:Process</i>, the range
- <i>wf:ValueAtPort</i> (and implied
- <i>prov:Generation</i>)
- </dd>
- <dt>wf:usedValue</dt>
- <dd>
- A subproperty of <i>prov:hadQualifiedUsage</i>,
- specifying which port we <i>wf:sawValue</i> and
- where it <i>wf:wasSeenAtPort</i> as it was
- used. The domain of this
- property is <i>wf:Process</i>, the range
- <i>wf:ValueAtPort</i> (and implied
- <i>prov:Usage</i>)
- </dd>
- <dt>wf:sameValueAs</dt>
- <dd>
- A subproperty of <i>prov:wasComplementOf</i> and
- <i>prov:wasDerivedFrom</i>,
- specifying that an <i>wf:Value</i> was the same as
- another <i>wf:Value</i>. This is used to indicate
- that a value at an workflow output port is the same
- as the value at a processor output port, although
- they have different history of generation, they both
- represent the same <i>wf:value</i> and are the same
- "thing".
- </dd>
-
- </dl>
- </section>
- <!--
- <section id="workflow-structure">
- <h4>Workflow structure</h4>
- <p>
- This ontology includes a simple definition language for
- describing the overall workflow structure. This is not
- meant as a general workflow definition language, but allows
- us to describe <i>process executions</i>, <i>use</i> and
- <i>generation</i> with relation to particular sections of
- the workflow definition.
- </p>
- <dl>
- <dt>wf:ProcessDefinition</dt>
- <dd>A definition of how to execute a process. It will
- typically refer to a command or service which will be
- called. Each process definition also
- <i>wf:definesInput</i>s and <i>wf:definesOutput</i>s.
- </dd>
- <dt>wf:Port</dt>
- <dd>
- A port can be considered as a parameter or return value
- for a process. These are typically given names which are
- unique within a process definition. A value is either
- provided to an input port before execution, or produced
- from an output port after execution.
- </dd>
- <dt>wf:linksTo</dt>
- <dd>
- Ports are connected using links. A link from an output
- port to an input port means that the value received on
- that output will be forwarded to the input of the next
- process. Note that in this simplified ontology links can
- also go from Input to Input and Output to Output, these
- are used to connect workflow ports to processor ports.
- </dd>
- <dt>wf:Input</dt>
- <dd>
- An input port for a process will receive a value which
- will be <i>used</i> by the execution. In a dataflow driven
- workflow model, a process will execute as soon as all its
- defined input ports have been provided with values.
- </dd>
- <dt>wf:Output</dt>
- <dd>
- A process execution might return multiple outputs, for
- instance a table and a diagram. Each of these are declared
- as an output port for that process definition.
- </dd>
- <dt>wf:definesSubProcess</dt>
- <dd>
- <p>
- Scientific workflows can be composed of nested workflows
- which can be shared and reused as components. Some
- workflow systems also allow various execution settings
- on the nested workflow, like looping or parallelisation.
- </p>
- <p>
- In this case a process definition will use
- <i>wf:definesSubProcess</i> to indicate its consistent
- parts, and there will be additional <i>wf:linksTo</i> from
- the input ports of this process definition to the input
- ports of some of its nested sub processes, and vice versa
- for the outputs. The top-level workflow is always such a
- process definition.
- </p>
- </dd>
- </dl>
- </section>
- -->
- <section id="example-workflow">
- <h4>Example workflow</h4>
- <img src="examples/ontology-extensions/workflow/Concatsha1.png"
- alt="An example workflow with input, three processes, and two outputs." />
- <p>This is an example workflow which defines a workflow
- input <i>input</i>, three processes <i>String_constant</i>,
- <i>Concatenate_two_strings</i> and <i>sha1</i>, and finally
- two workflow outputs <i>combined</i> and <i>sha1</i>. When
- executed, it will execute from top to bottom, first
- concatenating the provided input with the string constant,
- which is returned on the <i>combined</i> output, but also
- provided to the <i>sha1</i> process, which output is given
- to the other workflow port.
- </p>
- <p>
- An example of abstract definition of this workflow can be
- seen as
- <a
- href="examples/ontology-extensions/workflow/workflowDefinition.rdf">RDF/XML</a>
- and
- <a
- href="examples/ontology-extensions/workflow/workflowDefinition.ttl">Turtle</a>
- </p>
- </section>
- <section id="example-workflow-run">
- <h4>Example workflow run</h4>
- <p>
- This example shows how using the workflow extensions
- together with PROV can provide the provenance of executing
- the workflow defined above.
- </p>
- <div class="anexample">
- <div class="exampleOuter"><pre class="example">
-<rdf:RDF xmlns="http://www.example.com/scientific-workflow#"
- xmlns:foaf="http://xmlns.com/foaf/0.1/"
- xmlns:prov="http://www.w3.org/ns/prov-o/"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:time="http://www.w3.org/2006/time#"
- xmlns:wf="http://www.example.com/scientific-workflow#">
-
- <Process rdf:about="#workflowRun">
- <ranInWorkflowEngine>
- <WorkflowEngine rdf:about="#workflowEngine" />
- </ranInWorkflowEngine>
- <wasDefinedBy rdf:resource="http://www.example.com/workflow1#workflow"/>
- <wasLaunchedBy>
- <prov:Agent rdf:about="#aUser">
- <rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Person"/>
- <foaf:name>Stian Soiland-Reyes</foaf:name>
- </prov:Agent>
- </wasLaunchedBy>
- <prov:startedAt rdf:parseType="Resource">
- <time:inDateTimeXSD>2011-10-21T09:20:15Z</time:inDateTimeXSD>
- </prov:startedAt>
- <prov:endedAt rdf:parseType="Resource">
- <time:inDateTimeXSD>2011-10-21T09:23:32Z</time:inDateTimeXSD>
- </prov:endedAt>
- <wf:usedValue>
- <prov:Usage>
- <sawValue>
- <Value rdf:about="#input">
- <value>Steve</value>
- <wasReadFrom>
- <FileValue rdf:about="#inputFile">
- <file>/tmp/myinput.txt</file>
- <value>Steve</value>
- </FileValue>
- </wasReadFrom>
- </Value>
- </sawValue>
- <seenAtPort rdf:resource="http://www.example.com/workflow1#inName"/>
- <prov:hadTemporalValue rdf:parseType="Resource">
- <time:inDateTimeXSD>2011-10-21T09:21:31Z</time:inDateTimeXSD>
- </prov:hadTemporalValue>
- </prov:Usage>
- </wf:usedValue>
- <wf:generatedValue>
- <prov:Generation>
- <sawValue>
- <Value rdf:about="#sha1FromWorkflow">
- <value>a33d1fb1658d4fbf017de59ab67437a3eb5ff50d</value>
- <wf:sameValueAs rdf:resource="#sha1"/>
- </Value>
- </sawValue>
- <wasSeenAt rdf:resource="http://www.example.com/workflow1#sha1"/>
- </prov:Generation>
- </wf:generatedValue>
- </Process>
-
- <Process rdf:about="#constant">
- <wasDefinedBy rdf:resource="http://www.example.com/workflow1#String_Constant"/>
- <wasSubActivityOf rdf:resource="#workflowRun"/>
- <prov:startedAt>
- <time:Instant rdf:about="#t0">
- <time:inDateTimeXSD>2011-10-21T09:20:15Z</time:inDateTimeXSD>
- </time:Instant>
- </prov:startedAt>
-
- <prov:endedAt rdf:resource="#t0"/>
- <wf:generatedValue>
- <prov:Generation>
- <sawValue rdf:resource="http://www.example.com/workflow1#String_Constant_value"/>
- <prov:hadQualifiedEntity>
- <Value rdf:about="#hello">
- <value>Hello, </value>
- </Value>
- </prov:hadQualifiedEntity>
- <prov:hadTemporalValue rdf:resource="#t0"/>
- </prov:Generation>
- </wf:generatedValue>
- </Process>
-
- <Process rdf:about="#combine">
- <wasDefinedBy rdf:resource="http://www.example.com/workflow1#cat"/>
- <wasSubActivityOf rdf:resource="#workflowRun"/>
- <prov:startedAt rdf:parseType="Resource">
- <time:inDateTimeXSD>2011-10-21T09:20:20Z</time:inDateTimeXSD>
- </prov:startedAt>
- <prov:endedAt rdf:parseType="Resource">
- <time:inDateTimeXSD>2011-10-21T09:20:25Z</time:inDateTimeXSD>
- </prov:endedAt>
- <wf:usedValue>
- <prov:Usage>
- <seenAtPort rdf:resource="http://www.example.com/workflow1#catIn1"/>
- <prov:hadQualifiedEntity rdf:resource="#hello"/>
- <prov:hadTemporalValue rdf:parseType="Resource">
- <time:inDateTimeXSD>2011-10-21T09:20:21Z</time:inDateTimeXSD>
- </prov:hadTemporalValue>
- </prov:Usage>
- </wf:usedValue>
- <wf:usedValue>
- <prov:Usage>
- <sawValue rdf:resource="#input"/>
- <seenAtPort rdf:resource="http://www.example.com/workflow1#catIn2"/>
- <prov:hadTemporalValue rdf:parseType="Resource">
- <time:inDateTimeXSD>2011-10-21T09:20:23Z</time:inDateTimeXSD>
- </prov:hadTemporalValue>
- </prov:Usage>
- </wf:usedValue>
- <wf:generatedValue>
- <prov:Generation>
- <sawValue>
- <Value rdf:about="#combined">
- <value>Hello, Steve</value>
- </Value>
- </sawValue>
- <seenAtPort rdf:resource="http://www.example.com/workflow1#catOut"/>
- </prov:Generation>
- </wf:generatedValue>
- </Process>
- <Process rdf:about="#shasum">
- <wasDefinedBy rdf:resource="http://www.example.com/workflow1#shasum"/>
- <wasSubActivityOf rdf:resource="#workflowRun"/>
- <prov:startedAt rdf:parseType="Resource">
- <time:inDateTimeXSD>2011-10-21T09:20:30Z</time:inDateTimeXSD>
- </prov:startedAt>
- <prov:endedAt rdf:parseType="Resource">
- <time:inDateTimeXSD>2011-10-21T09:21:00Z</time:inDateTimeXSD>
- </prov:endedAt>
- <wf:generatedValue>
- <prov:Generation>
- <sawValue>
- <Value rdf:about="#sha1">
- <value>a33d1fb1658d4fbf017de59ab67437a3eb5ff50d</value>
- </Value>
- </sawValue>
- <wasSeenAt rdf:resource="http://www.example.com/workflow1#shaOut"/>
- </prov:Generation>
- </wf:generatedValue>
- </Process>
-</rdf:RDF>
- </pre>
- <em>Example available as
- <a
- href="examples/ontology-extensions/workflow/workflow.rdf">RDF/XML</a>
- and
- <a href="examples/ontology-extensions/workflow/workflow.ttl">Turtle</a>
- </em>
- </div>
- <p> Note that for brevity, the example above does not show the inferred classes
- and properties from the PROV ontology. For interoperability, applications
- should also expressed such inferred statements in its
- serialisations, so that the provenance can be read without using
- OWL2 inferencing and the customized ontologies.</p>
- <div class="anexample">
- <p>See the <a
- href="examples/ontology-extensions/workflow/workflow-inferred.rdf">workflow-inferred.rdf</a>
- for the complete example showing both domain-specific and PROV ontology terms
- used side by side.
- </p>
- </section>
- </section>
</section>
<section id="formal-semantics-of-the-prov-ontology">
<h2>Formal Semantics of the PROV Ontology</h2>