Skip to content

Commit

Permalink
fix compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
elguardian committed Aug 24, 2023
1 parent 5d1c06e commit 10178b2
Show file tree
Hide file tree
Showing 19 changed files with 191 additions and 106 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,7 @@ private Document encodeData(ProcessInstanceVariableEventBody data) {
doc.put("variableName", data.getVariableName());
doc.put("variableValue", data.getVariableValue());
doc.put("changeDate", data.getEventDate());
doc.put("changedByNodeId", data.getNodeDefinitionId());
// doc.put("changedByNodeName", data.getChangedByNodeName());
doc.put("changedByNodeType", data.getNodeType());
doc.put("identity", data.getIdentity());
doc.put("processInstanceId", data.getProcessInstanceId());
doc.put("processId", data.getProcessId());
return doc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void encodeDataEvent() {
String kogitoAddons = "testKogitoAddons";
String identity = "testKogitoIdentity";

Map<String, String> metaData = new HashMap<>();
Map<String, Object> metaData = new HashMap<>();
metaData.put(ProcessInstanceEventMetadata.PROCESS_INSTANCE_ID_META_DATA, kogitoProcessInstanceId);
metaData.put(ProcessInstanceEventMetadata.PROCESS_VERSION_META_DATA, kogitoProcessInstanceVersion);
metaData.put(ProcessInstanceEventMetadata.ROOT_PROCESS_INSTANCE_ID_META_DATA, kogitoRootProcessInstanceId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void setUp() {
String kogitoAddons = "testKogitoAddons";
String identity = "testIdentity";

Map<String, String> metaData = new HashMap<>();
Map<String, Object> metaData = new HashMap<>();
metaData.put(ProcessInstanceEventMetadata.PROCESS_INSTANCE_ID_META_DATA, "testKogitoProcessInstanceId");
metaData.put(ProcessInstanceEventMetadata.PROCESS_VERSION_META_DATA, "testKogitoProcessInstanceVersion");
metaData.put(ProcessInstanceEventMetadata.ROOT_PROCESS_INSTANCE_ID_META_DATA, "testKogitoRootProcessInstanceId");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void setUp() {
String source = "testSource";
String kogitoAddons = "testKogitoAddons";

Map<String, String> metaData = new HashMap<>();
Map<String, Object> metaData = new HashMap<>();
metaData.put(ProcessInstanceEventMetadata.PROCESS_INSTANCE_ID_META_DATA, "testKogitoProcessInstanceId");
metaData.put(ProcessInstanceEventMetadata.PROCESS_VERSION_META_DATA, "testKogitoProcessInstanceVersion");
metaData.put(ProcessInstanceEventMetadata.ROOT_PROCESS_INSTANCE_ID_META_DATA, "testKogitoRootProcessInstanceId");
Expand All @@ -66,10 +66,7 @@ void setUp() {

ProcessInstanceVariableEventBody body = ProcessInstanceVariableEventBody.create()
.eventDate(new Date())
.nodeIntanceId("testChangedByNodeId")
//.changedByNodeName("testChangedByNodeName")
.nodeType("testChangedByNodeType")
.identity("testChangedByUser")
.processId("testKogitoProcessId")
.processInstanceId("testKogitoProcessInstanceId")
.variableName("testVariableName")
Expand Down Expand Up @@ -133,13 +130,10 @@ void encode() {
assertThat(((Document) doc.get("data"))).containsEntry("variableName", event.getData().getVariableName())
.containsEntry("variableValue", event.getData().getVariableValue())
.containsEntry("eventDate", event.getData().getEventDate())
.containsEntry("changedByNodeId", event.getData().getNodeInstanceId())
// .containsEntry("changedByNodeName", event.getData().getChangedByNodeName())
.containsEntry("changedByNodeType", event.getData().getNodeType())
.containsEntry("identity", event.getData().getIdentity())
.containsEntry("processInstanceId", event.getData().getProcessInstanceId())
.containsEntry("processId", event.getData().getProcessId())
.containsEntry("identity", event.getData().getIdentity());
.containsEntry("identity", event.getData().getEventUser());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ public class ProcessInstanceVariableEventBody {

private String eventUser;

private Integer eventType; // added, changed

// data fields for process instance event

private String processId;
Expand All @@ -40,16 +38,11 @@ public class ProcessInstanceVariableEventBody {
// custom data fields for this event
private String nodeContainerDefinitionId;
private String nodeContainerInstanceId;
private String nodeDefinitionId;;
private String nodeInstanceId;
private String nodeType;

private String variableId;
private String variableName;
private Object variableValue;

private String identity;

public Date getEventDate() {
return eventDate;
}
Expand All @@ -58,10 +51,6 @@ public String getEventUser() {
return eventUser;
}

public Integer getEventType() {
return eventType;
}

public String getProcessId() {
return processId;
}
Expand All @@ -82,18 +71,6 @@ public String getNodeContainerInstanceId() {
return nodeContainerInstanceId;
}

public String getNodeDefinitionId() {
return nodeDefinitionId;
}

public String getNodeInstanceId() {
return nodeInstanceId;
}

public String getNodeType() {
return nodeType;
}

public String getVariableId() {
return variableId;
}
Expand All @@ -106,10 +83,6 @@ public Object getVariableValue() {
return variableValue;
}

public String getIdentity() {
return identity;
}

public Map<String, String> metaData() {
Map<String, String> metadata = new HashMap<>();
metadata.put(ProcessInstanceEventMetadata.PROCESS_INSTANCE_ID_META_DATA, processInstanceId);
Expand All @@ -119,10 +92,10 @@ public Map<String, String> metaData() {

@Override
public String toString() {
return "ProcessInstanceVariableEventBody [eventDate=" + eventDate + ", eventUser=" + eventUser + ", eventType=" + eventType + ", processId=" + processId + ", processVersion=" + processVersion
return "ProcessInstanceVariableEventBody [eventDate=" + eventDate + ", eventUser=" + eventUser + ", processId=" + processId + ", processVersion=" + processVersion
+ ", processInstanceId=" + processInstanceId + ", nodeContainerDefinitionId=" + nodeContainerDefinitionId + ", nodeContainerInstanceId="
+ nodeContainerInstanceId + ", nodeDefinitionId=" + nodeDefinitionId + ", nodeInstanceId=" + nodeInstanceId + ", nodeType=" + nodeType + ", variableId=" + variableId
+ ", variableName=" + variableName + ", variableValue=" + variableValue + ", identity=" + identity + "]";
+ nodeContainerInstanceId + ", variableId=" + variableId
+ ", variableName=" + variableName + ", variableValue=" + variableValue + "]";
}

@Override
Expand Down Expand Up @@ -164,11 +137,6 @@ public Builder eventUser(String userId) {
return this;
}

public Builder eventType(Integer eventType) {
this.instance.eventType = eventType;
return this;
}

public Builder processId(String processId) {
this.instance.processId = processId;
return this;
Expand All @@ -194,21 +162,6 @@ public Builder nodeContainerInstanceId(String nodeContainerInstanceId) {
return this;
}

public Builder nodeDefinitionId(String nodeDefinitionId) {
this.instance.nodeDefinitionId = nodeDefinitionId;
return this;
}

public Builder nodeIntanceId(String nodeInstanceId) {
this.instance.nodeInstanceId = nodeInstanceId;
return this;
}

public Builder nodeType(String nodeType) {
this.instance.nodeType = nodeType;
return this;
}

public Builder variableId(String variableId) {
this.instance.variableId = variableId;
return this;
Expand All @@ -224,11 +177,6 @@ public Builder variableValue(Object variableValue) {
return this;
}

public Builder identity(String identity) {
instance.identity = identity;
return this;
}

public ProcessInstanceVariableEventBody build() {
return instance;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ public boolean equals(Object obj) {
return Objects.equals(assignmentType, other.assignmentType) && Objects.equals(userTaskInstanceId, other.userTaskInstanceId) && Objects.equals(users, other.users);
}

public static Builder create() {
return new Builder(new UserTaskInstanceAssignmentEventBody());
}

public static class Builder {

private UserTaskInstanceAssignmentEventBody instance;
Expand Down Expand Up @@ -139,6 +143,10 @@ public Builder eventType(String eventType) {
this.instance.eventType = eventType;
return this;
}

public UserTaskInstanceAssignmentEventBody build() {
return this.instance;
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ public Builder eventType(String eventType) {
this.instance.eventType = eventType;
return this;
}

public UserTaskInstanceAttachmentEventBody build() {
return this.instance;
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -212,5 +212,9 @@ public Builder identity(String identity) {
instance.identity = identity;
return this;
}

public UserTaskInstanceStateEventBody build() {
return this.instance;
}
}
}
Loading

0 comments on commit 10178b2

Please sign in to comment.