diff --git a/core/src/main/java/io/kestra/core/models/property/Property.java b/core/src/main/java/io/kestra/core/models/property/Property.java
index e7947ab308c..488c91e3a24 100644
--- a/core/src/main/java/io/kestra/core/models/property/Property.java
+++ b/core/src/main/java/io/kestra/core/models/property/Property.java
@@ -8,7 +8,6 @@
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
-import com.google.common.annotations.VisibleForTesting;
import io.kestra.core.exceptions.IllegalVariableEvaluationException;
import io.kestra.core.runners.RunContext;
import io.kestra.core.serializers.JacksonMapper;
@@ -45,6 +44,14 @@ public Property(String expression) {
this.expression = expression;
}
+ public Property(Map, ?> map) {
+ try {
+ expression = MAPPER.writeValueAsString(map);
+ } catch (JsonProcessingException e) {
+ throw new IllegalArgumentException(e);
+ }
+ }
+
/**
* Build a new Property object with a value already set.
*
diff --git a/core/src/main/java/io/kestra/plugin/core/state/AbstractState.java b/core/src/main/java/io/kestra/plugin/core/state/AbstractState.java
index ad5fb1c2b27..288595e334a 100644
--- a/core/src/main/java/io/kestra/plugin/core/state/AbstractState.java
+++ b/core/src/main/java/io/kestra/plugin/core/state/AbstractState.java
@@ -3,13 +3,12 @@
import com.fasterxml.jackson.core.type.TypeReference;
import io.kestra.core.exceptions.IllegalVariableEvaluationException;
import io.kestra.core.exceptions.ResourceExpiredException;
-import io.kestra.core.models.annotations.PluginProperty;
+import io.kestra.core.models.property.Property;
import io.kestra.core.models.tasks.Task;
import io.kestra.core.runners.RunContext;
import io.kestra.core.serializers.JacksonMapper;
import io.kestra.core.storages.StorageContext;
import io.kestra.core.utils.MapUtils;
-import io.micronaut.core.annotation.Nullable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.SuperBuilder;
@@ -28,37 +27,35 @@
public abstract class AbstractState extends Task {
private static final TypeReference