diff --git a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/WorkflowManager.java b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/WorkflowManager.java index 49b33ff347..48a03fee83 100644 --- a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/WorkflowManager.java +++ b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/WorkflowManager.java @@ -29,6 +29,7 @@ import java.util.List; import java.util.Map; import java.util.UUID; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.NotImplementedException; import org.polypheny.db.PolyphenyDb; import org.polypheny.db.adapter.java.AdapterTemplate; @@ -58,6 +59,7 @@ import org.polypheny.db.workflow.session.SessionManager; import org.polypheny.db.workflow.session.WorkflowWebSocket; +@Slf4j public class WorkflowManager { private final SessionManager sessionManager; @@ -171,6 +173,9 @@ private void addSampleWorkflows() { fileName = fileName.substring( 0, fileName.length() - ".json".length() ); try { WorkflowModel workflow = mapper.readValue( file, WorkflowModel.class ); + if ( repo.doesNameExist( fileName ) ) { + continue; + } UUID wId = repo.createWorkflow( fileName ); repo.writeVersion( wId, "Created Sample Workflow", workflow ); } catch ( IOException e ) { @@ -181,7 +186,7 @@ private void addSampleWorkflows() { private void registerAdapter() { - if ( PolyphenyDb.mode == RunMode.TEST || Catalog.getInstance().getAdapters().values().stream().anyMatch( a -> a.adapterName.equals( DEFAULT_CHECKPOINT_ADAPTER ) ) ) { + if ( PolyphenyDb.mode == RunMode.TEST || Catalog.getInstance().getAdapters().values().stream().anyMatch( a -> a.uniqueName.equals( DEFAULT_CHECKPOINT_ADAPTER ) ) ) { return; } diff --git a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/Workflow.java b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/Workflow.java index d23d01214f..7848861eea 100644 --- a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/Workflow.java +++ b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/Workflow.java @@ -178,13 +178,13 @@ public interface Workflow { ActivityWrapper updateActivity( UUID activityId, @Nullable Map settings, @Nullable ActivityConfigModel config, @Nullable RenderModel rendering, StorageManager sm ); /** - * Returns the number of milliseconds until the execution of the subtree containing the given activities times out. + * Returns the number of seconds until the execution of the subtree containing the given activities times out. * If there is more than one activitiy in the set, the sum of all timeout durations is returned. * * @param activities the activities of the subtree to be executed - * @return the timout duration in millis, or 0 if no timeout is desired. + * @return the timout duration in seconds, or 0 if no timeout is desired. */ - int getTimeoutMillis( Set activities ); + int getTimeoutSeconds( Set activities ); AttributedDirectedGraph toDag(); diff --git a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/WorkflowImpl.java b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/WorkflowImpl.java index 7702a1e6a5..c4f651028d 100644 --- a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/WorkflowImpl.java +++ b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/WorkflowImpl.java @@ -433,11 +433,11 @@ public ActivityWrapper updateActivity( UUID activityId, @Nullable Map activities ) { - int baseTimeout = Math.max( 0, config.getTimeoutMillis() ); + public int getTimeoutSeconds( Set activities ) { + int baseTimeout = Math.max( 0, config.getTimeoutSeconds() ); int timeout = 0; for ( UUID activityId : activities ) { - int activityTimeout = Math.max( 0, getActivity( activityId ).getConfig().getTimeoutMillis() ); + int activityTimeout = Math.max( 0, getActivity( activityId ).getConfig().getTimeoutSeconds() ); if ( activityTimeout > 0 ) { // override base timeout timeout += activityTimeout; } else { diff --git a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/activities/ActivityDef.java b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/activities/ActivityDef.java index 3eed071781..fcfe0de9e4 100644 --- a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/activities/ActivityDef.java +++ b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/activities/ActivityDef.java @@ -17,6 +17,7 @@ package org.polypheny.db.workflow.dag.activities; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import java.lang.annotation.Annotation; import java.util.Arrays; import java.util.HashSet; @@ -24,6 +25,8 @@ import java.util.List; import java.util.Map; import java.util.Set; +import lombok.AccessLevel; +import lombok.Getter; import lombok.Value; import org.polypheny.db.workflow.dag.activities.Activity.ActivityCategory; import org.polypheny.db.workflow.dag.activities.Activity.PortType; @@ -42,7 +45,8 @@ public class ActivityDef { Class activityClass; String type; String displayName; - String description; + String shortDescription; + String longDescription; ActivityCategory[] categories; InPortDef[] inPorts; OutPortDef[] outPorts; @@ -62,7 +66,8 @@ public static ActivityDef fromAnnotations( Class activityCla activityClass, def.type(), def.displayName(), - def.description(), + def.shortDescription(), + def.longDescription().isEmpty() ? def.shortDescription() : def.longDescription(), def.categories(), InPortDef.fromAnnotations( def.inPorts() ), OutPortDef.fromAnnotations( def.outPorts() ), @@ -115,6 +120,8 @@ public static class InPortDef { PortType type; String description; + + @Getter(AccessLevel.NONE) boolean isOptional; @@ -125,6 +132,12 @@ private InPortDef( InPort inPort ) { } + @JsonProperty("isOptional") + public boolean isOptional() { + return isOptional; + } + + public static InPortDef[] fromAnnotations( InPort[] inPorts ) { return Arrays.stream( inPorts ).map( InPortDef::new ).toArray( InPortDef[]::new ); } diff --git a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/activities/impl/IdentityActivity.java b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/activities/impl/IdentityActivity.java index ce8a5b755a..03e281dd87 100644 --- a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/activities/impl/IdentityActivity.java +++ b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/activities/impl/IdentityActivity.java @@ -47,18 +47,39 @@ import org.polypheny.db.workflow.engine.storage.reader.RelReader; @ActivityDefinition(type = "identity", displayName = "Identity", categories = { ActivityCategory.TRANSFORM, ActivityCategory.RELATIONAL }, - inPorts = { @InPort(type = PortType.REL) }, - outPorts = { @OutPort(type = PortType.REL) } -) - -@IntSetting(key = "I1", displayName = "FIRST", defaultValue = 2) -@StringSetting(key = "S1", displayName = "SECOND") + inPorts = { @InPort(type = PortType.REL, description = "Input table") }, + outPorts = { @OutPort(type = PortType.REL, description = "Output table, equal to the input table.") }, + shortDescription = "The identity activity outputs the input table unchanged.", + longDescription = """ + This is the long description of the identity activity. It is possible to use *markdown*! + # Title + ## Subtitle + ### Subsubtitle + + Now a list: + - first + - second + - third + + code: `inline code` + or block: + + ```python + def my_function(): + print('test') + ``` + + > This is a blockquote + """) + +@IntSetting(key = "I1", displayName = "FIRST", defaultValue = 2, shortDescription = "This setting doesn't do anything.") +@StringSetting(key = "S1", displayName = "SECOND", shortDescription = "This setting doesn't do anything.") @Group(key = "groupA", displayName = "Group A", subgroups = { @Subgroup(key = "a", displayName = "Sub1") } ) -@IntSetting(key = "I2", displayName = "THIRD", defaultValue = 0, isList = true, group = "groupA") -@StringSetting(key = "S2", displayName = "FOURTH", defaultValue = "test", isList = true, group = "groupA", subGroup = "a") +@IntSetting(key = "I2", displayName = "THIRD", defaultValue = 0, isList = true, group = "groupA", shortDescription = "This setting doesn't do anything.") +@StringSetting(key = "S2", displayName = "FOURTH", defaultValue = "test", isList = true, group = "groupA", subGroup = "a", shortDescription = "This setting doesn't do anything.") @SuppressWarnings("unused") public class IdentityActivity implements Activity, Fusable, Pipeable { diff --git a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/annotations/ActivityDefinition.java b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/annotations/ActivityDefinition.java index 76c4aeb9cf..68a4b64e97 100644 --- a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/annotations/ActivityDefinition.java +++ b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/annotations/ActivityDefinition.java @@ -31,7 +31,17 @@ String displayName(); // Display name used by the UI - String description() default ""; + /** + * A short description of this activity shown as raw text. + */ + String shortDescription() default ""; + + /** + * A long description of this activity using markdown. + * Image paths are resolved by the UI to "assets/img/plugin/workflows" (subject to change). + * If no longDescription is given, the shortDescription is used instead. + */ + String longDescription() default ""; // given as markdown ActivityCategory[] categories(); @@ -45,6 +55,9 @@ PortType type(); + /** + * A description given in raw text. + */ String description() default ""; boolean isOptional() default false; // TODO: isOptional currently has no effect @@ -56,6 +69,9 @@ PortType type(); + /** + * A description given in raw text. + */ String description() default ""; } diff --git a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/annotations/BoolSetting.java b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/annotations/BoolSetting.java index 9417f1ba0d..af95aa553a 100644 --- a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/annotations/BoolSetting.java +++ b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/annotations/BoolSetting.java @@ -37,7 +37,15 @@ String displayName(); - String description() default ""; + /** + * A short description given in raw text. + */ + String shortDescription() default ""; + + /** + * A description given in markdown. + */ + String longDescription() default ""; String group() default ""; diff --git a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/annotations/DoubleSetting.java b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/annotations/DoubleSetting.java index 69d59691bf..90bc9a8bc4 100644 --- a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/annotations/DoubleSetting.java +++ b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/annotations/DoubleSetting.java @@ -32,7 +32,15 @@ String displayName(); - String description() default ""; + /** + * A short description given in raw text. + */ + String shortDescription() default ""; + + /** + * A description given in markdown. + */ + String longDescription() default ""; String group() default ""; diff --git a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/annotations/EntitySetting.java b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/annotations/EntitySetting.java index 7e86a90bc2..af57ca04e2 100644 --- a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/annotations/EntitySetting.java +++ b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/annotations/EntitySetting.java @@ -38,7 +38,15 @@ String displayName(); - String description() default ""; + /** + * A short description given in raw text. + */ + String shortDescription() default ""; + + /** + * A description given in markdown. + */ + String longDescription() default ""; String group() default ""; diff --git a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/annotations/IntSetting.java b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/annotations/IntSetting.java index 8ea3a079ec..23097caaac 100644 --- a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/annotations/IntSetting.java +++ b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/annotations/IntSetting.java @@ -32,7 +32,15 @@ String displayName(); - String description() default ""; + /** + * A short description given in raw text. + */ + String shortDescription() default ""; + + /** + * A description given in markdown. + */ + String longDescription() default ""; String group() default ""; diff --git a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/annotations/StringSetting.java b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/annotations/StringSetting.java index 6120e65d1d..9bbd4b5a53 100644 --- a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/annotations/StringSetting.java +++ b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/annotations/StringSetting.java @@ -37,7 +37,15 @@ String displayName(); - String description() default ""; + /** + * A short description given in raw text. + */ + String shortDescription() default ""; + + /** + * A description given in markdown. + */ + String longDescription() default ""; String group() default ""; // the group this setting belongs to. Default is {@code GroupDef.DEFAULT_GROUP}, advanced is {@code GroupDef.ADVANCED_GROUP}. Others must be created manually diff --git a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/settings/BoolSettingDef.java b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/settings/BoolSettingDef.java index 2147dae72a..938dd1fb75 100644 --- a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/settings/BoolSettingDef.java +++ b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/settings/BoolSettingDef.java @@ -28,7 +28,7 @@ public class BoolSettingDef extends SettingDef { public BoolSettingDef( BoolSetting a ) { - super( SettingType.BOOLEAN, a.key(), a.displayName(), a.description(), getDefaultValue( a.defaultValue() ), a.group(), a.subGroup(), a.position(), a.subOf() ); + super( SettingType.BOOLEAN, a.key(), a.displayName(), a.shortDescription(), a.longDescription(), getDefaultValue( a.defaultValue() ), a.group(), a.subGroup(), a.position(), a.subOf() ); } diff --git a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/settings/DoubleSettingDef.java b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/settings/DoubleSettingDef.java index e08ab3c6ff..4ace073f3e 100644 --- a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/settings/DoubleSettingDef.java +++ b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/settings/DoubleSettingDef.java @@ -31,7 +31,7 @@ public class DoubleSettingDef extends SettingDef { public DoubleSettingDef( DoubleSetting a ) { - super( SettingType.DOUBLE, a.key(), a.displayName(), a.description(), getDefaultValue( a.defaultValue() ), a.group(), a.subGroup(), a.position(), a.subOf() ); + super( SettingType.DOUBLE, a.key(), a.displayName(), a.shortDescription(), a.longDescription(), getDefaultValue( a.defaultValue() ), a.group(), a.subGroup(), a.position(), a.subOf() ); minValue = a.min(); maxValue = a.max(); diff --git a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/settings/EntitySettingDef.java b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/settings/EntitySettingDef.java index d0469c0cc5..880e993e11 100644 --- a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/settings/EntitySettingDef.java +++ b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/settings/EntitySettingDef.java @@ -34,7 +34,7 @@ public class EntitySettingDef extends SettingDef { public EntitySettingDef( EntitySetting a ) { - super( SettingType.ENTITY, a.key(), a.displayName(), a.description(), getDefaultValue( a.defaultNamespace(), a.defaultName() ), a.group(), a.subGroup(), a.position(), a.subOf() ); + super( SettingType.ENTITY, a.key(), a.displayName(), a.shortDescription(), a.longDescription(), getDefaultValue( a.defaultNamespace(), a.defaultName() ), a.group(), a.subGroup(), a.position(), a.subOf() ); this.dataModel = a.dataModel(); this.mustExist = a.mustExist(); } diff --git a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/settings/IntSettingDef.java b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/settings/IntSettingDef.java index 7b03f9f147..aedfd4b34b 100644 --- a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/settings/IntSettingDef.java +++ b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/settings/IntSettingDef.java @@ -32,7 +32,7 @@ public class IntSettingDef extends SettingDef { public IntSettingDef( IntSetting a ) { - super( SettingType.INT, a.key(), a.displayName(), a.description(), getDefaultValue( a.defaultValue(), a.isList() ), a.group(), a.subGroup(), a.position(), a.subOf() ); + super( SettingType.INT, a.key(), a.displayName(), a.shortDescription(), a.longDescription(), getDefaultValue( a.defaultValue(), a.isList() ), a.group(), a.subGroup(), a.position(), a.subOf() ); this.isList = a.isList(); this.minValue = a.min(); this.maxValue = a.max(); diff --git a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/settings/SettingDef.java b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/settings/SettingDef.java index 294f496cee..5ef792b825 100644 --- a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/settings/SettingDef.java +++ b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/settings/SettingDef.java @@ -48,7 +48,8 @@ public abstract class SettingDef { private final SettingType type; private final String key; private final String displayName; - private final String description; + private final String shortDescription; + private final String longDescription; @JsonIgnore // the UI does not handle defaultValues. This is instead done by the backend, at the moment the activity is created. private final SettingValue defaultValue; @@ -59,12 +60,13 @@ public abstract class SettingDef { private final String subOf; - public SettingDef( SettingType type, String key, String displayName, String description, SettingValue defaultValue, String group, String subgroup, int position, String subOf ) { + public SettingDef( SettingType type, String key, String displayName, String shortDescription, String longDescription, SettingValue defaultValue, String group, String subgroup, int position, String subOf ) { assert !key.contains( SettingDef.SUB_SEP ) : "Setting key must not contain separator symbol '" + SUB_SEP + "': " + key; this.type = type; this.key = key; this.displayName = displayName; - this.description = description; + this.shortDescription = shortDescription; + this.longDescription = longDescription.isEmpty() ? shortDescription : longDescription; this.defaultValue = defaultValue; this.group = group; this.subgroup = subgroup; diff --git a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/settings/StringSettingDef.java b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/settings/StringSettingDef.java index 81e1c87e25..b4fd06bead 100644 --- a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/settings/StringSettingDef.java +++ b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/dag/settings/StringSettingDef.java @@ -32,7 +32,7 @@ public class StringSettingDef extends SettingDef { public StringSettingDef( StringSetting a ) { - super( SettingType.STRING, a.key(), a.displayName(), a.description(), getDefaultValue( a.defaultValue(), a.isList() ), a.group(), a.subGroup(), a.position(), a.subOf() ); + super( SettingType.STRING, a.key(), a.displayName(), a.shortDescription(), a.longDescription(), getDefaultValue( a.defaultValue(), a.isList() ), a.group(), a.subGroup(), a.position(), a.subOf() ); this.isList = a.isList(); this.minLength = a.minLength(); this.maxLength = a.maxLength(); diff --git a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/engine/scheduler/ExecutionSubmission.java b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/engine/scheduler/ExecutionSubmission.java index ccd5d800fd..8b614ff233 100644 --- a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/engine/scheduler/ExecutionSubmission.java +++ b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/engine/scheduler/ExecutionSubmission.java @@ -31,7 +31,7 @@ public class ExecutionSubmission { UUID rootId; CommonType commonType; UUID sessionId; - int timeoutMillis; // 0 for no timeout + int timeoutSeconds; // 0 for no timeout ExecutionInfo info; diff --git a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/engine/scheduler/GlobalScheduler.java b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/engine/scheduler/GlobalScheduler.java index 6fd9c46ccf..1c68ae1efe 100644 --- a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/engine/scheduler/GlobalScheduler.java +++ b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/engine/scheduler/GlobalScheduler.java @@ -173,13 +173,13 @@ private void submit( List submissions ) { activeSubmissions.computeIfAbsent( sessionId, k -> ConcurrentHashMap.newKeySet() ).add( submission ); - int timeoutMillis = submission.getTimeoutMillis(); - if ( timeoutMillis > 0 ) { + int timeoutSeconds = submission.getTimeoutSeconds(); + if ( timeoutSeconds > 0 ) { timeoutService.schedule( () -> { if ( submission.getInfo().getState() == ExecutionState.EXECUTING ) { submission.getExecutor().interrupt(); } - }, Math.max( 50, timeoutMillis ), TimeUnit.MILLISECONDS ); // minimum timeout to ensure executor was actually called + }, timeoutSeconds, TimeUnit.SECONDS ); } ExecutionResult result; diff --git a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/engine/scheduler/optimizer/WorkflowOptimizer.java b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/engine/scheduler/optimizer/WorkflowOptimizer.java index 314ee2cad6..4442fa07a2 100644 --- a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/engine/scheduler/optimizer/WorkflowOptimizer.java +++ b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/engine/scheduler/optimizer/WorkflowOptimizer.java @@ -170,7 +170,7 @@ public ExecutionSubmission create( StorageManager sm, Workflow wf ) { case VARIABLE_WRITER -> new VariableWriterExecutor( sm, wf, getRootActivity(), info ); }; - return new ExecutionSubmission( executor, activities, root, commonType, sm.getSessionId(), wf.getTimeoutMillis( activities ), info ); + return new ExecutionSubmission( executor, activities, root, commonType, sm.getSessionId(), wf.getTimeoutSeconds( activities ), info ); } diff --git a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/models/ActivityConfigModel.java b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/models/ActivityConfigModel.java index 0db3d76b3e..6fc0cdb629 100644 --- a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/models/ActivityConfigModel.java +++ b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/models/ActivityConfigModel.java @@ -27,7 +27,7 @@ public class ActivityConfigModel { boolean enforceCheckpoint; - int timeoutMillis; // 0 for no timeout + int timeoutSeconds; // 0 for no timeout String[] preferredStores; // one entry per output @JsonProperty(required = true) diff --git a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/models/WorkflowConfigModel.java b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/models/WorkflowConfigModel.java index 54e8187809..621d09a872 100644 --- a/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/models/WorkflowConfigModel.java +++ b/plugins/workflow-engine/src/main/java/org/polypheny/db/workflow/models/WorkflowConfigModel.java @@ -29,7 +29,7 @@ public class WorkflowConfigModel { Map preferredStores; boolean fusionEnabled; boolean pipelineEnabled; - int timeoutMillis; // 0 for no timeout + int timeoutSeconds; // 0 for no timeout boolean dropUnusedCheckpoints; int maxWorkers; int pipelineQueueCapacity;