Skip to content

Commit

Permalink
Debugging code
Browse files Browse the repository at this point in the history
  • Loading branch information
fvilla committed Nov 24, 2024
1 parent 6c92c02 commit 330d629
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,14 @@ public String getStackTrace() {
public void setStackTrace(String stackTrace) {
this.stackTrace = stackTrace;
}

@Override
public String toString() {
return "ActivityImpl{" +
"type=" + type +
", description='" + description + '\'' +
", taskId='" + taskId + '\'' +
", outcome=" + outcome +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ public Operation fail(ContextScope scope, Object... assets) {
@Override
public void close() throws IOException {

System.out.println("CLOSING " + activity);

for (var child : children) {
child.close();
}
Expand Down Expand Up @@ -230,7 +232,7 @@ public void close() throws IOException {
// Log an internal failure (no success or failure, should not happen)
transaction.rollback();
} else if (outcome == Scope.Status.FINISHED) {
if (observation != null) {
if (observation != null && this.actuator != null) {
// TODO add state and histogram
link(this.activity, observation, DigitalTwin.Relationship.CONTEXTUALIZED);
}
Expand Down

0 comments on commit 330d629

Please sign in to comment.