Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

- updating bam to use domainId instead of sessionId

  • Loading branch information...
commit 0d4bd2d63198bc248d7ea88fd8b5442df78ec069 1 parent 33457fc
@Salaboy Salaboy authored mswiderski committed
View
18 jbpm-bam/src/main/java/org/jbpm/process/audit/NodeInstanceLog.java
@@ -56,7 +56,7 @@
private String nodeType;
private Long workItemId;
private String connection;
- private Integer sessionId;
+ private String domainId;
NodeInstanceLog() {
}
@@ -161,7 +161,7 @@ public int hashCode() {
result = prime * result
+ ((connection == null) ? 0 : connection.hashCode());
result = prime * result
- + ((sessionId == null) ? 0 : sessionId.hashCode());
+ + ((domainId == null) ? 0 : domainId.hashCode());
return result;
}
@@ -219,10 +219,10 @@ public boolean equals(Object obj) {
} else if (!connection.equals(other.connection))
return false;
- if (sessionId == null) {
- if (other.sessionId != null)
+ if (domainId == null) {
+ if (other.domainId != null)
return false;
- } else if (!sessionId.equals(other.sessionId))
+ } else if (!domainId.equals(other.domainId))
return false;
return true;
}
@@ -243,12 +243,12 @@ public void setConnection(String connection) {
this.connection = connection;
}
- public int getSessionId() {
- return sessionId;
+ public String getDomainId() {
+ return domainId;
}
- public void setSessionId(int sessionId) {
- this.sessionId = sessionId;
+ public void setDomainId(String domainId) {
+ this.domainId = domainId;
}
public String getNodeType() {
View
20 jbpm-bam/src/main/java/org/jbpm/process/audit/ProcessInstanceLog.java
@@ -57,11 +57,11 @@
private String outcome;
private Long duration;
private String identity;
- private Integer sessionId;
+ private String domainId;
private String processVersion;
private String processName;
- ProcessInstanceLog() {
+ public ProcessInstanceLog() {
}
public ProcessInstanceLog(long processInstanceId, String processId) {
@@ -129,7 +129,7 @@ public int hashCode() {
result = prime * result + ((outcome == null) ? 0 : outcome.hashCode());
result = prime * result + ((duration == null) ? 0 : duration.hashCode());
result = prime * result + ((identity == null) ? 0 : identity.hashCode());
- result = prime * result + ((sessionId == null) ? 0 : sessionId.hashCode());
+ result = prime * result + ((domainId == null) ? 0 : domainId.hashCode());
result = prime * result + ((processVersion == null) ? 0 : processVersion.hashCode());
result = prime * result + ((processName == null) ? 0 : processName.hashCode());
return result;
@@ -194,10 +194,10 @@ public boolean equals(Object obj) {
} else if (!identity.equals(other.identity))
return false;
- if (sessionId == null) {
- if (other.sessionId != null)
+ if (domainId == null) {
+ if (other.domainId != null)
return false;
- } else if (!sessionId.equals(other.sessionId))
+ } else if (!domainId.equals(other.domainId))
return false;
if (processVersion == null) {
@@ -254,12 +254,12 @@ public void setIdentity(String identity) {
this.identity = identity;
}
- public Integer getSessionId() {
- return sessionId;
+ public String getDomainId() {
+ return domainId;
}
- public void setSessionId(Integer sessionId) {
- this.sessionId = sessionId;
+ public void setDomainId(String domainId) {
+ this.domainId = domainId;
}
public String getProcessVersion() {
View
18 jbpm-bam/src/main/java/org/jbpm/process/audit/VariableInstanceLog.java
@@ -49,7 +49,7 @@
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "log_date")
private Date date;
- private Integer sessionId;
+ private String domainId;
VariableInstanceLog() {
}
@@ -135,12 +135,12 @@ void setDate(Date date) {
this.date = date;
}
- public Integer getSessionId() {
- return sessionId;
+ public String getDomainId() {
+ return domainId;
}
- public void setSessionId(Integer sessionId) {
- this.sessionId = sessionId;
+ public void setDomainId(String domainId) {
+ this.domainId = domainId;
}
public String toString() {
@@ -160,7 +160,7 @@ public int hashCode() {
result = prime * result + ((oldValue == null) ? 0 : oldValue.hashCode());
result = prime * result + ((variableId == null) ? 0 : variableId.hashCode());
result = prime * result + ((variableInstanceId == null) ? 0 : variableInstanceId.hashCode());
- result = prime * result + ((sessionId == null) ? 0 : sessionId.hashCode());
+ result = prime * result + ((domainId == null) ? 0 : domainId.hashCode());
return result;
}
@@ -207,10 +207,10 @@ public boolean equals(Object obj) {
return false;
} else if (!variableInstanceId.equals(other.variableInstanceId))
return false;
- if (sessionId == null) {
- if (other.sessionId != null)
+ if (domainId == null) {
+ if (other.domainId != null)
return false;
- } else if (!sessionId.equals(other.sessionId))
+ } else if (!domainId.equals(other.domainId))
return false;
return true;
}
View
8 jbpm-bam/src/main/java/org/jbpm/process/audit/event/DefaultAuditEventBuilderImpl.java
@@ -23,7 +23,7 @@
public AuditEvent buildEvent(ProcessStartedEvent pse) {
ProcessInstanceImpl pi = (ProcessInstanceImpl) pse.getProcessInstance();
ProcessInstanceLog log = new ProcessInstanceLog(pi.getId(), pi.getProcessId());
- log.setSessionId(((KieSession) pse.getKieRuntime()).getId());
+ log.setDomainId(""+((KieSession) pse.getKieRuntime()).getId());
log.setProcessName(pi.getProcess().getName());
log.setProcessVersion(pi.getProcess().getVersion());
log.setStatus(ProcessInstance.STATE_ACTIVE);
@@ -75,7 +75,7 @@ public AuditEvent buildEvent(ProcessNodeTriggeredEvent pnte) {
}
String connection = (String)nodeInstance.getMetaData().get("IncomingConnection");
log.setConnection(connection);
- log.setSessionId(((KieSession) pnte.getKieRuntime()).getId());
+ log.setDomainId(""+((KieSession) pnte.getKieRuntime()).getId());
log.setNodeType(nodeType);
return log;
}
@@ -107,7 +107,7 @@ public AuditEvent buildEvent(ProcessNodeLeftEvent pnle, Object log) {
}
String connection = (String)nodeInstance.getMetaData().get("OutgoingConnection");
logEvent.setConnection(connection);
- logEvent.setSessionId(((KieSession) pnle.getKieRuntime()).getId());
+ logEvent.setDomainId(""+((KieSession) pnle.getKieRuntime()).getId());
logEvent.setNodeType(nodeType);
return logEvent;
}
@@ -122,7 +122,7 @@ public AuditEvent buildEvent(ProcessVariableChangedEvent pvce) {
String newValue = (pvce.getNewValue() != null)?pvce.getNewValue().toString():"";
VariableInstanceLog log = new VariableInstanceLog(
processInstanceId, processId, variableInstanceId, variableId, newValue, oldValue);
- log.setSessionId(((KieSession) pvce.getKieRuntime()).getId());
+ log.setDomainId(""+((KieSession) pvce.getKieRuntime()).getId());
return log;
}
Please sign in to comment.
Something went wrong with that request. Please try again.