aboutsummaryrefslogtreecommitdiff
path: root/id
diff options
context:
space:
mode:
Diffstat (limited to 'id')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/dao/ProcessInstanceStore.java13
1 files changed, 6 insertions, 7 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/dao/ProcessInstanceStore.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/dao/ProcessInstanceStore.java
index 625199cd2..c6bf86823 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/dao/ProcessInstanceStore.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/dao/ProcessInstanceStore.java
@@ -1,19 +1,18 @@
package at.gv.egovernment.moa.id.process.dao;
import java.io.Serializable;
-import java.util.HashMap;
import java.util.Map;
import javax.persistence.Column;
-import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
-import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;
+import org.hibernate.internal.util.SerializationHelper;
+
import at.gv.egovernment.moa.id.process.ProcessInstanceState;
@Entity
@@ -39,8 +38,7 @@ public class ProcessInstanceStore {
@Column(name = "executionContextData", nullable = false)
@Lob
- @ElementCollection(fetch=FetchType.EAGER)
- private Map<String, Serializable> executionContextData = new HashMap<>();
+ private byte[] executionContextData;
public String getProcessInstanceId() {
return processInstanceId;
@@ -58,8 +56,9 @@ public class ProcessInstanceStore {
return processState;
}
+ @SuppressWarnings("unchecked")
public Map<String, Serializable> getExecutionContextData() {
- return executionContextData;
+ return (Map<String, Serializable>) SerializationHelper.deserialize(executionContextData);
}
public void setProcessInstanceId(String processInstanceId) {
@@ -79,7 +78,7 @@ public class ProcessInstanceStore {
}
public void setExecutionContextData(Map<String, Serializable> executionContextData) {
- this.executionContextData = executionContextData;
+ this.executionContextData = SerializationHelper.serialize((Serializable) executionContextData);
}
}