Provenance Query Demo
Introduction
This interface allows you to perform provenance queries over a
provenance store already containing process documentation.
The form is presented below, followed by example queries you can try.
The example scenario that the process documentation describes in
detailed at the bottom of the page.
See
the functional specification of the provenance query interface for
a description of the query being submitted and the results being returned.
Query Entry Form
Enter XPaths for the query data handle (entity to find the provenance
of, expressed as a search of the p-structure) and relationship target
filter (scope of query, expressed as a search over a relationship
target). For a scope-less query, use / as the relationship target
filter.
XPaths can be broken into several lines for ease of editing.
The easiest way to write a query is to copy and paste XPath
fragments from the selection below the form. For example, to
ask for the provenance of the data stored at file1, you can express
the query data handle by pasting together the following parts:
- /ps:pstruct/ps:interactionRecord[ps:interactionKey/ps:messageSink/wsa:EndpointReference/wsa:Address="http://www.example.com/store"]/ps:service
- (at the instance of a message received by the file store...)
- /ps:interactionPAssertion
- (...search within message contents...)
- [ex:envelope/ex:store/ex:location="/home/sm/data/file1"]
- (...check for the file location file1...)
- /ex:envelope/ex:store/ex:data
- (...and find the provenance of the data stored)
Example Query Segments
Instants
Instant of message being received
- /ps:pstruct/ps:interactionRecord/ps:service
Instant of message being received by the GUI actor
- /ps:pstruct/ps:interactionRecord[ps:interactionKey/ps:messageSink/wsa:EndpointReference/wsa:Address="http://www.example.com/gui"]/ps:service
Instant of message being received by the Store actor
- /ps:pstruct/ps:interactionRecord[ps:interactionKey/ps:messageSink/wsa:EndpointReference/wsa:Address="http://www.example.com/store"]/ps:service
Searches in an Interaction Record
Search for message contents (interaction p-assertions)
- /ps:interactionPAssertion
Search for actor states (actor state p-assertions)
Checks on Interaction P-Assertions
Is request to store data in file1?
- [ex:envelope/ex:store/ex:location="/home/sm/data/file1"]
Is request to divide?
Contains tracer 1 (introduced by GUI actor in first workflow run)?
- [ex:envelope/ph:pheader/ph:interactionMetaData/ph:tracer="process://1"]
Contains tracer 2 (introduced by GUI actor in second workflow run)?
- [ex:envelope/ph:pheader/ph:interactionMetaData/ph:tracer="process://2"]
Does not contain sub-tracer 1 (introduced by Averager actor in first workflow run)?
- [not(ex:envelope/ph:pheader/ph:interactionMetaData[ph:tracer="process://sub/1"])]
Does not contain sub-tracer 2 (introduced by Averager actor in second workflow run)?
- [not(ex:envelope/ph:pheader/ph:interactionMetaData[ph:tracer="process://sub/2"])]
Searches in Interaction P-Assertions
Data Referred to in storage request
- /ex:envelope/ex:store/ex:data
Result data returned in response message from Averager / Divider
- /ex:envelope/ex:answer[@value="6"]
Credentials in message (passed in several messages)
- /ex:envelope/ex:credentials
Checks on relationship targets
Is not "after" temporal relation
- /pq:relationshipTarget[ps:relation!="http://twiki.pasoa.ecs.soton.ac.uk/pub/PASOA/Ontologies/temporal.owl#after"]
Is an OWL sub-class of the "wasCausedBy" relation
- /pq:relationshipTarget[pq:isSubclassOf(ps:relation,"http://twiki.pasoa.ecs.soton.ac.uk/pub/PASOA/Ontologies/causal.owl#wasCausedBy")]
Description of Example Scenario
We define a simple workflow which is run and process documentation
generated. It is contrived to be as simple as possible to illustrate
the range of forms that provenance queries can take.
In the workflow, a GUI actor calls an Averager service
with two values (7 and 5). Averager sums the values and calls Divider with
12 as the divisor and 2 as the dividend. Divider sends the 6 answer back to
Averager, which returns the answer back to the GUI. The GUI then sends the
value to its file store, Store, along with the file location, file1, at
which to store it. With the request message to the Averager, the GUI also sends
the user's credentials (C), which are then copied in all messages
between the services.
Each actor in the workflow makes interaction p-assertions about the
interactions it sends and receives. The interactions are numbered
in the figure above, so that they can easily be referred to below.
The actors also record the following relationship p-assertions.
- Averager records that the 12 in message 2 is the sum of 7, 5 in message 1
- Divider records that the 6 in message 3 is the quotient of dividing 12 and 2 in message 2
- Averager records that the 6 in message 4 is a copy of 6 in message 3
- Averager records that the 6 in message 4 is the average of 7, 5 in message 1
- GUI records that the 6 in message 5 is a copy of 6 in message 4
- Averager records that the credentials (C) in message 4 are a copy of C in message 3
- Divider records that the C in message 3 is copy of C in message 2
- Averager records that the C in message 2 is copy of C in message 1
The workflow has been run twice, as shown below. In each workflow run, the GUI adds a tracer to
the request it makes to Averager, and Averager adds a tracer to the request it
makes to Divider. The GUI saves the results in different files for the different
workflows (file1 and file2). Finally, the Averager records one more relationship
p-assertion: that the second response it sends to the GUI happens after the first
response being sent.