Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into apps-license
Browse files Browse the repository at this point in the history
  • Loading branch information
jomarko committed Nov 22, 2024
2 parents 25da501 + f1483d7 commit 8ea07fe
Show file tree
Hide file tree
Showing 31 changed files with 454 additions and 181 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,39 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.basedir}/src/main/resources/shared</outputDirectory>
<resources>
<resource>
<directory>${common.test.resources.dir}</directory>
<includes>
<include>**/*.bpmn</include>
<include>**/*.sw.json</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>${project.basedir}/src/main/resources/shared</directory>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>${common.test.resources.dir}</directory>
<includes>
<include>**/*.bpmn</include>
<include>**/*.sw.json</include>
</includes>
</resource>
</resources>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,39 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.basedir}/src/main/resources/shared</outputDirectory>
<resources>
<resource>
<directory>${common.test.resources.dir}</directory>
<includes>
<include>**/*.bpmn</include>
<include>**/*.sw.json</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>${project.basedir}/src/main/resources/shared</directory>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>${common.test.resources.dir}</directory>
<includes>
<include>**/*.bpmn</include>
<include>**/*.sw.json</include>
</includes>
</resource>
</resources>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
<plugin>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<version>${version.io.quarkus}</version>
<configuration>
<skipOriginalJarRename>true</skipOriginalJarRename>
</configuration>
Expand All @@ -91,18 +90,39 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.basedir}/src/main/resources/shared</outputDirectory>
<resources>
<resource>
<directory>${common.test.resources.dir}</directory>
<includes>
<include>**/*.bpmn</include>
<include>**/*.sw.json</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>${project.basedir}/src/main/resources/shared</directory>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>${common.test.resources.dir}</directory>
<includes>
<include>**/*.bpmn</include>
<include>**/*.sw.json</include>
</includes>
</resource>
</resources>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -94,24 +94,10 @@
</dependencies>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>${common.test.resources.dir}</directory>
<includes>
<include>**/*.bpmn</include>
<include>**/*.sw.json</include>
</includes>
</resource>
</resources>

<plugins>
<plugin>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<version>${version.io.quarkus}</version>
<configuration>
<skipOriginalJarRename>true</skipOriginalJarRename>
</configuration>
Expand All @@ -123,6 +109,39 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.basedir}/src/main/resources/shared</outputDirectory>
<resources>
<resource>
<directory>${common.test.resources.dir}</directory>
<includes>
<include>**/*.bpmn</include>
<include>**/*.sw.json</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>${project.basedir}/src/main/resources/shared</directory>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<properties>
<container.image.kogito-service>org.kie.kogito/integration-tests-trusty-service-springboot:${project.version}</container.image.kogito-service>
<sonar.exclusions>**/KogitoApplication.java</sonar.exclusions>
<version.jib-maven-plugin>3.3.1</version.jib-maven-plugin>
<version.jib-maven-plugin>3.4.4</version.jib-maven-plugin>
<jib-maven-plugin.container.image>eclipse-temurin:17-jre</jib-maven-plugin.container.image>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ type ProcessInstance {
identity: String
createdBy: String
updatedBy: String
slaDueDate: DateTime
}

type ProcessInstanceError {
Expand Down Expand Up @@ -135,6 +136,7 @@ type NodeInstance {
exit: DateTime
definitionId: String!
nodeId: String!
slaDueDate: DateTime
}

enum MilestoneStatus {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ public class NodeInstance {
@JsonProperty("leaveTime")
private ZonedDateTime exit;

private ZonedDateTime slaDueDate;

@JsonProperty("nodeDefinitionId")
private String definitionId;

Expand Down Expand Up @@ -97,6 +99,14 @@ public void setName(String name) {
this.name = name;
}

public ZonedDateTime getSlaDueDate() {
return slaDueDate;
}

public void setSlaDueDate(ZonedDateTime slaDueDate) {
this.slaDueDate = slaDueDate;
}

@Override
public boolean equals(Object o) {
if (this == o) {
Expand Down Expand Up @@ -125,6 +135,7 @@ public String toString() {
", type='" + type + '\'' +
", enter=" + enter +
", exit=" + exit +
", slaDueDate=" + slaDueDate +
", definitionId='" + definitionId + '\'' +
'}';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public class ProcessInstanceMeta {
@JsonProperty("updatedBy")
private String updatedBy;
private ZonedDateTime lastUpdate;
private ZonedDateTime slaDueDate;

public String getId() {
return id;
Expand Down Expand Up @@ -186,6 +187,14 @@ public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}

public ZonedDateTime getSlaDueDate() {
return slaDueDate;
}

public void setSlaDueDate(ZonedDateTime slaDueDate) {
this.slaDueDate = slaDueDate;
}

@Override
public String toString() {
return "ProcessInstanceMeta{" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public ProcessInstance merge(ProcessInstance pi, ProcessInstanceDataEvent<?> dat
nodeInstance.setNodeId(body.getNodeDefinitionId());
nodeInstance.setName(body.getNodeName());
nodeInstance.setType(body.getNodeType());
nodeInstance.setSlaDueDate(toZonedDateTime(body.getSlaDueDate()));
ZonedDateTime eventDate = toZonedDateTime(body.getEventDate());
switch (body.getEventType()) {
case EVENT_TYPE_ENTER:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public ProcessInstance merge(ProcessInstance pi, ProcessInstanceDataEvent<?> dat
pi.setLastUpdate(toZonedDateTime(event.getTime()));
pi.setDefinition(definitions(event));
pi.setUpdatedBy(event.getData().getEventUser());
pi.setSlaDueDate(toZonedDateTime(event.getData().getSlaDueDate()));
LOGGER.debug("Value after merging: {}", pi);
return pi;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public NodeInstance readFrom(ProtoStreamReader reader) throws IOException {
node.setExit(dateToZonedDateTime(reader.readDate("exit")));
node.setDefinitionId(reader.readString("definitionId"));
node.setNodeId(reader.readString("nodeId"));
node.setSlaDueDate(dateToZonedDateTime(reader.readDate("slaDueDate")));
return node;
}

Expand All @@ -54,6 +55,7 @@ public void writeTo(ProtoStreamWriter writer, NodeInstance node) throws IOExcept
writer.writeDate("exit", zonedDateTimeToDate(node.getExit()));
writer.writeString("definitionId", node.getDefinitionId());
writer.writeString("nodeId", node.getNodeId());
writer.writeDate("slaDueDate", zonedDateTimeToDate(node.getSlaDueDate()));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public class ProcessInstanceMarshaller extends AbstractMarshaller implements Mes
protected static final String MILESTONES = "milestones";
protected static final String CREATED_BY = "createdBy";
protected static final String UPDATED_BY = "updatedBy";
protected static final String SLA_DUE_DATE = "slaDueDate";

public ProcessInstanceMarshaller(ObjectMapper mapper) {
super(mapper);
Expand Down Expand Up @@ -84,6 +85,7 @@ public ProcessInstance readFrom(ProtoStreamReader reader) throws IOException {
pi.setVersion(reader.readString(VERSION));
pi.setCreatedBy(reader.readString(CREATED_BY));
pi.setUpdatedBy(reader.readString(UPDATED_BY));
pi.setSlaDueDate(dateToZonedDateTime(reader.readDate(SLA_DUE_DATE)));
return pi;
}

Expand All @@ -110,6 +112,7 @@ public void writeTo(ProtoStreamWriter writer, ProcessInstance pi) throws IOExcep
writer.writeString(VERSION, pi.getVersion());
writer.writeString(CREATED_BY, pi.getCreatedBy());
writer.writeString(UPDATED_BY, pi.getCreatedBy());
writer.writeDate(SLA_DUE_DATE, zonedDateTimeToDate(pi.getSlaDueDate()));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public class NodeInstanceEntity extends AbstractEntity {
private String type;
private ZonedDateTime enter;
private ZonedDateTime exit;
private ZonedDateTime slaDueDate;
private String definitionId;
@ManyToOne(cascade = CascadeType.ALL, optional = false)
@OnDelete(action = OnDeleteAction.CASCADE)
Expand Down Expand Up @@ -106,6 +107,14 @@ public void setExit(ZonedDateTime exit) {
this.exit = exit;
}

public ZonedDateTime getSlaDueDate() {
return slaDueDate;
}

public void setSlaDueDate(ZonedDateTime slaDueDate) {
this.slaDueDate = slaDueDate;
}

public ProcessInstanceEntity getProcessInstance() {
return processInstance;
}
Expand Down
Loading

0 comments on commit 8ea07fe

Please sign in to comment.