public class Recording extends java.lang.Object
The workflow structure, or specification, is recorded using the regNNN() methods. specificationStart() and specificationStop() are called before and after workflow structure is recorded.
FIXME this is not all implemented An evolution is a group of changes to the workflow structure. evolutionStart() and evolutionStop() are called before and after each change or group of changes to the workflow. A change may be one of:
When a workflow executes, methods are called for actors firing, ports reading and writing, and if an error occurs. executionStart() and executionStop() are called before and after execution.
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
_containerFullName
The full name of the provenance recorder's container.
|
protected KeplerLSID |
_containerLSID
The LSID of the containing workflow.
|
protected java.lang.String |
_containerName
The name of the containing workflow.
|
protected boolean |
_debugPrint
If true, output debugging statements to stdout.
|
protected java.io.Writer |
_debugWriter
Used for debugging output.
|
protected java.lang.String |
_machineStr
The machine name
|
protected ProvenanceRecorder |
_recorder
The containing provenance recorder.
|
protected NamedObj |
_recorderContainer
The container of the provenance recorder.
|
protected StateSerializer |
_stateSerializer
A serializer for states.
|
Constructor and Description |
---|
Recording()
Create a new provenance recording.
|
Modifier and Type | Method and Description |
---|---|
protected void |
_debug(java.lang.Object object)
Debugging output.
|
protected void |
_debug(java.lang.String str)
Debugging output.
|
protected void |
_debugWrite(java.lang.String str)
Write to any debug writer.
|
protected void |
_debugWrite(java.lang.String str,
java.lang.Throwable t)
Write to any debug writer.
|
protected void |
_error(java.lang.String str)
Error output.
|
protected java.lang.String |
_getExceptionMessage(java.lang.Exception e) |
protected java.lang.String |
_getNameableFullName(Nameable nameable)
Get a Nameable's full name including the name of the containing
workflow.
|
protected void |
_needWorkflowContents(boolean val)
Set the value for needing workflow contents to be registered.
|
protected void |
_updateContainerName()
Update the container's name.
|
protected void |
_warn(java.lang.String str)
Warning output.
|
void |
actorFire(FiringEvent event)
Record an actor firing at the current time.
|
void |
actorFire(FiringEvent event,
java.util.Date timestamp)
Record an actor firing at a specific time.
|
void |
addFileForLastExecution(java.util.Map<java.lang.String,java.lang.String> metadataMap,
java.io.File file)
Associate the contents of a file with the most recent workflow execution.
|
void |
attributeChanged(Attribute attribute)
React to a change in an attribute.
|
boolean |
changeExecutionLSID(int execId,
KeplerLSID newExecLSID,
Queryable q)
Change execution LSID for an execution Id.
|
void |
customProvEvent(ProvenanceEvent event)
Record a custom provenance event.
|
void |
disconnect()
Stop recording.
|
void |
evolutionStart()
Start an evolution.
|
void |
evolutionStop()
Stop an evolution.
|
void |
executionError(Nameable source,
java.lang.Throwable throwable)
An actor threw an exception.
|
void |
executionError(Nameable source,
java.lang.Throwable throwable,
KeplerLSID executionLSID)
An actor threw an exception.
|
void |
executionImported()
An execution was imported.
|
void |
executionImported(KeplerLSID executionLSID)
An execution was imported.
|
void |
executionStart()
Record the starting of workflow execution.
|
void |
executionStart(java.util.Date timestamp)
Record the starting of workflow execution at a specific time.
|
void |
executionStart(KeplerLSID executionLSID)
Record the starting of workflow execution.
|
void |
executionStart(KeplerLSID executionLSID,
java.util.Date timestamp)
Record the starting of workflow execution at a specific time.
|
void |
executionStop()
Record the stopping of workflow execution.
|
void |
executionStop(java.util.Date timestamp)
Record the stopping of workflow execution at a specific time.
|
void |
executionStop(KeplerLSID executionLSID)
Record the stopping of workflow execution.
|
void |
executionStop(KeplerLSID executionLSID,
java.util.Date timestamp)
Record the stopping of workflow execution.
|
RecordingParameters |
generateParameters(NamedObj no)
Add Parameters to ProvenanceListener configuration GUI.
|
ProvenanceRecorder |
getContainer()
Get the container.
|
Queryable |
getQueryable(boolean allowReconnectWF)
Get a Queryable connected to the Recording output.
|
void |
portEvent(IOPortEvent event)
Record a port event at the current time.
|
void |
portEvent(IOPortEvent event,
java.util.Date timestamp)
Record a port event at a specific time.
|
void |
refillPortEvent(IOPortRefillEvent event)
Record a port event.
|
boolean |
regActor(Actor actor)
Register an actor.
|
boolean |
regContents()
Returns true if provenance recorder should register workflow
contents should be registered.
|
boolean |
regDirector(Director director)
Register a director.
|
boolean |
regLink(NamedObj endPoint1,
NamedObj endPoint2)
Register a link between two endpoints.
|
boolean |
regParameter(NamedObj parameter)
Register a parameter.
|
boolean |
regPort(TypedIOPort port)
Register a port or portparameter.
|
boolean |
regRelation(IORelation relation)
Register a relation.
|
void |
remove(java.lang.String name)
A NamedObj was removed.
|
void |
removeLink(java.lang.String endPoint1,
java.lang.String endPoint2)
Remove a link between two endpoints.
|
void |
removeStateSerializer()
Remove the state serializer.
|
void |
rename(java.lang.String oldName,
java.lang.String newName)
A NamedObj was renamed.
|
void |
renamedWorkflow(NamedObj namedObj,
KeplerLSID oldLSID,
KeplerLSID newLSID,
java.lang.String oldName,
java.lang.String newName)
A workflow was renamed.
|
void |
setContainer(ProvenanceRecorder container)
Set the container.
|
void |
setContainerLSID(KeplerLSID lsid)
Set the container LSID.
|
void |
setContainerName(java.lang.String name)
Set the container name.
|
void |
setDebugWriter(java.io.Writer writer)
Set a Writer for debugging output.
|
void |
setStateSerializer(StateSerializer serializer)
Set the state serializer.
|
void |
specificationStart()
Called before registering workflow contents.
|
void |
specificationStop()
Called when finished registering workflow contents.
|
void |
tagAdded(TagEvent event) |
void |
tagRemoved(TagEvent event) |
protected java.lang.String _containerFullName
protected boolean _debugPrint
protected java.io.Writer _debugWriter
protected java.lang.String _machineStr
protected NamedObj _recorderContainer
protected ProvenanceRecorder _recorder
protected KeplerLSID _containerLSID
protected java.lang.String _containerName
protected StateSerializer _stateSerializer
public Recording() throws RecordingException
RecordingException
public void disconnect() throws RecordingException
RecordingException
public void specificationStart() throws RecordingException
RecordingException
public void specificationStop() throws RecordingException
RecordingException
public boolean regContents() throws RecordingException
RecordingException
public boolean regActor(Actor actor) throws RecordingException
RecordingException
public boolean regDirector(Director director) throws RecordingException
RecordingException
public boolean regParameter(NamedObj parameter) throws RecordingException
regNNN()
method. This can be user-level
parameters (e.g., Parameter, StringParameter, etc.) or
internal to Kepler (e.g., _location, semanticType000, etc.).
(A "parameter" corresponds to a property in the MoML).RecordingException
public boolean regLink(NamedObj endPoint1, NamedObj endPoint2) throws RecordingException
endPoint1
- first endpoint.endPoint2
- second endpoint.RecordingException
public boolean regPort(TypedIOPort port) throws RecordingException
RecordingException
public boolean regRelation(IORelation relation) throws RecordingException
RecordingException
public void evolutionStart() throws RecordingException
RecordingException
public void evolutionStop() throws RecordingException
RecordingException
public void remove(java.lang.String name) throws RecordingException
RecordingException
public void removeLink(java.lang.String endPoint1, java.lang.String endPoint2) throws RecordingException
RecordingException
public void rename(java.lang.String oldName, java.lang.String newName) throws RecordingException
RecordingException
public void executionStart() throws RecordingException
RecordingException
public void executionStart(java.util.Date timestamp) throws RecordingException
RecordingException
public void executionStart(KeplerLSID executionLSID) throws RecordingException
executionLSID
- RecordingException
public void executionStart(KeplerLSID executionLSID, java.util.Date timestamp) throws RecordingException
executionLSID
- RecordingException
public void executionStop() throws RecordingException
RecordingException
public void executionStop(java.util.Date timestamp) throws RecordingException
RecordingException
public void executionStop(KeplerLSID executionLSID) throws RecordingException
executionLSID
- RecordingException
public void executionStop(KeplerLSID executionLSID, java.util.Date timestamp) throws RecordingException
executionLSID
- RecordingException
public void executionImported()
public void executionImported(KeplerLSID executionLSID)
public void executionError(Nameable source, java.lang.Throwable throwable) throws RecordingException
source
- the source of the error. This may be null.throwable
- the error.RecordingException
public void executionError(Nameable source, java.lang.Throwable throwable, KeplerLSID executionLSID) throws RecordingException
source
- throwable
- executionLSID
- RecordingException
public void addFileForLastExecution(java.util.Map<java.lang.String,java.lang.String> metadataMap, java.io.File file) throws RecordingException
RecordingException
public void actorFire(FiringEvent event) throws RecordingException
RecordingException
public void actorFire(FiringEvent event, java.util.Date timestamp) throws RecordingException
RecordingException
public void portEvent(IOPortEvent event) throws RecordingException
RecordingException
public void portEvent(IOPortEvent event, java.util.Date timestamp) throws RecordingException
RecordingException
public void refillPortEvent(IOPortRefillEvent event) throws RecordingException
RecordingException
public void customProvEvent(ProvenanceEvent event) throws RecordingException
RecordingException
public RecordingParameters generateParameters(NamedObj no) throws IllegalActionException, NameDuplicationException
public void attributeChanged(Attribute attribute) throws IllegalActionException
IllegalActionException
public Queryable getQueryable(boolean allowReconnectWF) throws QueryException, RecordingException
QueryException
- may be thrown if Queryable not implemented
for the Recording type.RecordingException
public ProvenanceRecorder getContainer()
public void setContainer(ProvenanceRecorder container)
public void setDebugWriter(java.io.Writer writer)
public void setContainerLSID(KeplerLSID lsid)
public void setContainerName(java.lang.String name)
public void renamedWorkflow(NamedObj namedObj, KeplerLSID oldLSID, KeplerLSID newLSID, java.lang.String oldName, java.lang.String newName) throws RecordingException
namedObj
- the workflowoldLSID
- the previous LSIDnewLSID
- the new LSIDoldName
- the previous namenewName
- the new nameRecordingException
WorkflowRenameListener
public void tagAdded(TagEvent event) throws RecordingException
RecordingException
public void tagRemoved(TagEvent event) throws RecordingException
RecordingException
public boolean changeExecutionLSID(int execId, KeplerLSID newExecLSID, Queryable q) throws RecordingException
execId
- newExecLSID
- RecordingException
public void setStateSerializer(StateSerializer serializer)
public void removeStateSerializer()
protected void _debug(java.lang.String str)
protected void _debug(java.lang.Object object)
protected void _warn(java.lang.String str)
protected void _error(java.lang.String str)
protected java.lang.String _getExceptionMessage(java.lang.Exception e)
protected void _debugWrite(java.lang.String str) throws RecordingException
RecordingException
protected void _debugWrite(java.lang.String str, java.lang.Throwable t) throws RecordingException
RecordingException
protected void _needWorkflowContents(boolean val)
protected void _updateContainerName()
protected java.lang.String _getNameableFullName(Nameable nameable)