diff --git a/README.md b/README.md
index 204d74ea..e4492ea5 100644
--- a/README.md
+++ b/README.md
@@ -85,7 +85,6 @@ a) Add the following repositories to your build.gradle `repositories` section:
```text
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
-maven{ url "https://jitpack.io" }
```
b) Add the following dependencies to your build.gradle `dependencies` section:
@@ -116,8 +115,7 @@ functions:
states:
- name: Greet
type: operation
- start:
- kind: default
+ start: true
actionMode: sequential
actions:
- functionRef:
@@ -128,8 +126,7 @@ states:
dataResultsPath: "$.payload.greeting"
stateDataFilter:
dataOutputPath: "$.greeting"
- end:
- kind: default
+ end: true
```
To parse it and create a Workflow intance you can do:
diff --git a/api/pom.xml b/api/pom.xml
index 020334db..fcb204ec 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -41,8 +41,8 @@
json
- com.github.everit-org.json-schema
- org.everit.json.schema
+ com.github.erosb
+ everit-json-schema
@@ -110,4 +110,4 @@
-
\ No newline at end of file
+
diff --git a/api/src/main/java/io/serverlessworkflow/api/deserializers/EndDefinitionDeserializer.java b/api/src/main/java/io/serverlessworkflow/api/deserializers/EndDefinitionDeserializer.java
new file mode 100644
index 00000000..1078519d
--- /dev/null
+++ b/api/src/main/java/io/serverlessworkflow/api/deserializers/EndDefinitionDeserializer.java
@@ -0,0 +1,95 @@
+/*
+ * Copyright 2020-Present The Serverless Workflow Specification Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package io.serverlessworkflow.api.deserializers;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
+import io.serverlessworkflow.api.end.End;
+import io.serverlessworkflow.api.interfaces.WorkflowPropertySource;
+import io.serverlessworkflow.api.produce.ProduceEvent;
+import io.serverlessworkflow.api.start.Start;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+public class EndDefinitionDeserializer extends StdDeserializer {
+
+ private static final long serialVersionUID = 510l;
+ private static Logger logger = LoggerFactory.getLogger(EndDefinitionDeserializer.class);
+
+ private WorkflowPropertySource context;
+
+ public EndDefinitionDeserializer() {
+ this(End.class);
+ }
+
+ public EndDefinitionDeserializer(Class> vc) {
+ super(vc);
+ }
+
+ public EndDefinitionDeserializer(WorkflowPropertySource context) {
+ this(Start.class);
+ this.context = context;
+ }
+
+ @Override
+ public End deserialize(JsonParser jp,
+ DeserializationContext ctxt) throws IOException {
+
+ ObjectMapper mapper = (ObjectMapper) jp.getCodec();
+ JsonNode node = jp.getCodec().readTree(jp);
+
+ End end = new End();
+
+ if (node.isBoolean()) {
+ end.setProduceEvents(null);
+ end.setCompensate(false);
+ end.setTerminate(false);
+ return node.asBoolean() ? end : null;
+ } else {
+ if(node.get("produceEvents") != null) {
+ List produceEvents= new ArrayList<>();
+ for (final JsonNode nodeEle : node.get("produceEvents")) {
+ produceEvents.add(mapper.treeToValue(nodeEle, ProduceEvent.class));
+ }
+ end.setProduceEvents(produceEvents);
+ }
+
+ if(node.get("terminate") != null) {
+ end.setTerminate(node.get("terminate").asBoolean());
+ } else {
+ end.setTerminate(false);
+ }
+
+ if(node.get("compensate") != null) {
+ end.setCompensate(node.get("compensate").asBoolean());
+ } else {
+ end.setCompensate(false);
+ }
+
+ return end;
+
+ }
+
+ }
+}
diff --git a/api/src/main/java/io/serverlessworkflow/api/deserializers/StartDefinitionDeserializer.java b/api/src/main/java/io/serverlessworkflow/api/deserializers/StartDefinitionDeserializer.java
new file mode 100644
index 00000000..1ec0aaf0
--- /dev/null
+++ b/api/src/main/java/io/serverlessworkflow/api/deserializers/StartDefinitionDeserializer.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2020-Present The Serverless Workflow Specification Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package io.serverlessworkflow.api.deserializers;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
+import io.serverlessworkflow.api.interfaces.WorkflowPropertySource;
+import io.serverlessworkflow.api.schedule.Schedule;
+import io.serverlessworkflow.api.start.Start;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+
+public class StartDefinitionDeserializer extends StdDeserializer {
+
+ private static final long serialVersionUID = 510l;
+ private static Logger logger = LoggerFactory.getLogger(StartDefinitionDeserializer.class);
+
+ private WorkflowPropertySource context;
+
+ public StartDefinitionDeserializer() {
+ this(Start.class);
+ }
+
+ public StartDefinitionDeserializer(Class> vc) {
+ super(vc);
+ }
+
+ public StartDefinitionDeserializer(WorkflowPropertySource context) {
+ this(Start.class);
+ this.context = context;
+ }
+
+ @Override
+ public Start deserialize(JsonParser jp,
+ DeserializationContext ctxt) throws IOException {
+
+ ObjectMapper mapper = (ObjectMapper) jp.getCodec();
+ JsonNode node = jp.getCodec().readTree(jp);
+
+ Start start = new Start();
+
+ if (node.isBoolean()) {
+ start.setSchedule(null);
+ return node.asBoolean() ? start : null;
+ } else {
+ if(node.get("schedule") != null) {
+ start.setSchedule(mapper.treeToValue(node.get("schedule"), Schedule.class));
+ }
+
+ return start;
+
+ }
+
+ }
+}
+
diff --git a/api/src/main/java/io/serverlessworkflow/api/mapper/WorkflowModule.java b/api/src/main/java/io/serverlessworkflow/api/mapper/WorkflowModule.java
index af29ea0c..41dda19d 100644
--- a/api/src/main/java/io/serverlessworkflow/api/mapper/WorkflowModule.java
+++ b/api/src/main/java/io/serverlessworkflow/api/mapper/WorkflowModule.java
@@ -18,6 +18,7 @@
import com.fasterxml.jackson.databind.module.SimpleModule;
import io.serverlessworkflow.api.deserializers.*;
+import io.serverlessworkflow.api.end.End;
import io.serverlessworkflow.api.events.EventDefinition;
import io.serverlessworkflow.api.events.OnEvents;
import io.serverlessworkflow.api.interfaces.Extension;
@@ -25,6 +26,7 @@
import io.serverlessworkflow.api.interfaces.WorkflowPropertySource;
import io.serverlessworkflow.api.schedule.Schedule;
import io.serverlessworkflow.api.serializers.*;
+import io.serverlessworkflow.api.start.Start;
import io.serverlessworkflow.api.states.DefaultState;
import io.serverlessworkflow.api.states.OperationState;
import io.serverlessworkflow.api.states.ParallelState;
@@ -64,6 +66,8 @@ private void addDefaultSerializers() {
addSerializer(new InjectStateSerializer());
addSerializer(new ForEachStateSerializer());
addSerializer(new CallbackStateSerializer());
+ addSerializer(new StartDefinitionSerializer());
+ addSerializer(new EndDefinitionSerializer());
addSerializer(extensionSerializer);
}
@@ -84,6 +88,8 @@ private void addDefaultDeserializers() {
addDeserializer(Retries.class, new RetriesDeserializer(workflowPropertySource));
addDeserializer(Functions.class, new FunctionsDeserializer(workflowPropertySource));
addDeserializer(Events.class, new EventsDeserializer(workflowPropertySource));
+ addDeserializer(Start.class, new StartDefinitionDeserializer(workflowPropertySource));
+ addDeserializer(End.class, new EndDefinitionDeserializer(workflowPropertySource));
addDeserializer(Extension.class, extensionDeserializer);
}
diff --git a/api/src/main/java/io/serverlessworkflow/api/serializers/EndDefinitionSerializer.java b/api/src/main/java/io/serverlessworkflow/api/serializers/EndDefinitionSerializer.java
new file mode 100644
index 00000000..341f0372
--- /dev/null
+++ b/api/src/main/java/io/serverlessworkflow/api/serializers/EndDefinitionSerializer.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2020-Present The Serverless Workflow Specification Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package io.serverlessworkflow.api.serializers;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import io.serverlessworkflow.api.end.End;
+import io.serverlessworkflow.api.produce.ProduceEvent;
+
+import java.io.IOException;
+
+public class EndDefinitionSerializer extends StdSerializer {
+
+ public EndDefinitionSerializer() {
+ this(End.class);
+ }
+
+ protected EndDefinitionSerializer(Class t) {
+ super(t);
+ }
+
+ @Override
+ public void serialize(End end,
+ JsonGenerator gen,
+ SerializerProvider provider) throws IOException {
+
+ if(end != null) {
+ if((end.getProduceEvents() == null || end.getProduceEvents().size() < 1)
+ && !end.isCompensate() && !end.isTerminate()) {
+ gen.writeBoolean(true);
+ } else {
+ gen.writeStartObject();
+
+ if(end.isTerminate()) {
+ gen.writeBooleanField("terminate", true);
+ }
+
+ if (end.getProduceEvents() != null && !end.getProduceEvents().isEmpty()) {
+ gen.writeArrayFieldStart("produceEvents");
+ for (ProduceEvent produceEvent : end.getProduceEvents()) {
+ gen.writeObject(produceEvent);
+ }
+ gen.writeEndArray();
+ }
+
+ if(end.isCompensate()) {
+ gen.writeBooleanField("compensate", true);
+ }
+
+ gen.writeEndObject();
+ }
+ }
+ }
+}
diff --git a/api/src/main/java/io/serverlessworkflow/api/serializers/StartDefinitionSerializer.java b/api/src/main/java/io/serverlessworkflow/api/serializers/StartDefinitionSerializer.java
new file mode 100644
index 00000000..4b00c974
--- /dev/null
+++ b/api/src/main/java/io/serverlessworkflow/api/serializers/StartDefinitionSerializer.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2020-Present The Serverless Workflow Specification Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package io.serverlessworkflow.api.serializers;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import io.serverlessworkflow.api.start.Start;
+
+import java.io.IOException;
+
+public class StartDefinitionSerializer extends StdSerializer {
+
+ public StartDefinitionSerializer() {
+ this(Start.class);
+ }
+
+ protected StartDefinitionSerializer(Class t) {
+ super(t);
+ }
+
+ @Override
+ public void serialize(Start start,
+ JsonGenerator gen,
+ SerializerProvider provider) throws IOException {
+
+ if(start != null) {
+ if(start.getSchedule() == null) {
+ gen.writeBoolean(true);
+ } else {
+ gen.writeStartObject();
+ gen.writeObjectField("schedule",
+ start.getSchedule());
+ gen.writeEndObject();
+ }
+ }
+ }
+}
diff --git a/api/src/main/resources/schema/cron/crondef.json b/api/src/main/resources/schema/cron/crondef.json
new file mode 100644
index 00000000..67bb43c5
--- /dev/null
+++ b/api/src/main/resources/schema/cron/crondef.json
@@ -0,0 +1,18 @@
+{
+ "type": "object",
+ "javaType": "io.serverlessworkflow.api.cron.Cron",
+ "description": "Schedule cron definition",
+ "properties": {
+ "expression": {
+ "type": "string",
+ "description": "Repeating interval (cron expression) describing when the workflow instance should be created"
+ },
+ "validUntil": {
+ "type": "string",
+ "description": "Specific date and time (ISO 8601 format) when the cron expression invocation is no longer valid"
+ }
+ },
+ "required": [
+ "expression"
+ ]
+}
\ No newline at end of file
diff --git a/api/src/main/resources/schema/end/end.json b/api/src/main/resources/schema/end/end.json
index ebf3ceed..7b959a2a 100644
--- a/api/src/main/resources/schema/end/end.json
+++ b/api/src/main/resources/schema/end/end.json
@@ -3,19 +3,14 @@
"javaType": "io.serverlessworkflow.api.end.End",
"description": "State end definition",
"properties": {
- "kind": {
- "type": "string",
- "enum": [
- "default",
- "terminate",
- "event"
- ],
- "default": "default",
- "description": "Kind of End definition"
+ "terminate": {
+ "type": "boolean",
+ "default": false,
+ "description": "If true, completes all execution flows in the given workflow instance"
},
"produceEvents": {
"type": "array",
- "description": "Used if kind is event. Array of events to be produced",
+ "description": "Array of events to be produced",
"items": {
"type": "object",
"$ref": "../produce/produceevent.json"
diff --git a/api/src/main/resources/schema/schedule/schedule.json b/api/src/main/resources/schema/schedule/schedule.json
index cbff7bde..d80d9908 100644
--- a/api/src/main/resources/schema/schedule/schedule.json
+++ b/api/src/main/resources/schema/schedule/schedule.json
@@ -8,8 +8,8 @@
"description": "Time interval (ISO 8601 format) describing when the workflow starting state is active"
},
"cron": {
- "type": "string",
- "description": "Repeating interval (cron expression) describing when the workflow starting state should be triggered"
+ "description": "Schedule cron definition",
+ "$ref": "../cron/crondef.json"
},
"directInvoke": {
"description": "Define if workflow instances can be created outside of the defined interval/cron",
diff --git a/api/src/main/resources/schema/start/start.json b/api/src/main/resources/schema/start/start.json
index 63417f76..e3ecc283 100644
--- a/api/src/main/resources/schema/start/start.json
+++ b/api/src/main/resources/schema/start/start.json
@@ -3,21 +3,11 @@
"javaType": "io.serverlessworkflow.api.start.Start",
"description": "State start definition",
"properties": {
- "kind": {
- "type": "string",
- "enum": [
- "default",
- "scheduled"
- ],
- "default": "default",
- "description": "Kind of Start definition"
- },
"schedule": {
- "description": "If kind is 'scheduled', define when the time/repeating intervals at which workflow instances can/should be started",
+ "description": "Define when the time/repeating intervals at which workflow instances can/should be started",
"$ref": "../schedule/schedule.json"
}
},
"required": [
- "kind"
]
}
\ No newline at end of file
diff --git a/api/src/test/java/io/serverlessworkflow/api/test/WorkflowToMarkupTest.java b/api/src/test/java/io/serverlessworkflow/api/test/WorkflowToMarkupTest.java
index 005b5f6e..8518fb1d 100644
--- a/api/src/test/java/io/serverlessworkflow/api/test/WorkflowToMarkupTest.java
+++ b/api/src/test/java/io/serverlessworkflow/api/test/WorkflowToMarkupTest.java
@@ -21,6 +21,8 @@
import io.serverlessworkflow.api.events.EventDefinition;
import io.serverlessworkflow.api.functions.FunctionDefinition;
import io.serverlessworkflow.api.interfaces.State;
+import io.serverlessworkflow.api.produce.ProduceEvent;
+import io.serverlessworkflow.api.schedule.Schedule;
import io.serverlessworkflow.api.start.Start;
import io.serverlessworkflow.api.states.DelayState;
import io.serverlessworkflow.api.workflow.Events;
@@ -40,10 +42,15 @@ public void testSingleState() {
.withStates(Arrays.asList(
new DelayState().withName("delayState").withType(DELAY)
.withStart(
- new Start().withKind(Start.Kind.DEFAULT)
+ new Start().withSchedule(
+ new Schedule().withInterval("PT1S")
+ )
)
.withEnd(
- new End().withKind(End.Kind.DEFAULT)
+ new End().withTerminate(true).withCompensate(true)
+ .withProduceEvents(Arrays.asList(
+ new ProduceEvent().withEventRef("someEvent")
+ ))
)
.withTimeDelay("PT1M")
)
@@ -53,6 +60,8 @@ public void testSingleState() {
assertEquals(1, workflow.getStates().size());
State state = workflow.getStates().get(0);
assertTrue(state instanceof DelayState);
+ assertNotNull(state.getStart());
+ assertNotNull(state.getEnd());
assertNotNull(Workflow.toJson(workflow));
assertNotNull(Workflow.toYaml(workflow));
@@ -69,10 +78,10 @@ public void testSingleFunction() {
.withStates(Arrays.asList(
new DelayState().withName("delayState").withType(DELAY)
.withStart(
- new Start().withKind(Start.Kind.DEFAULT)
+ new Start()
)
.withEnd(
- new End().withKind(End.Kind.DEFAULT)
+ new End()
)
.withTimeDelay("PT1M")
)
@@ -105,10 +114,10 @@ public void testSingleEvent() {
.withStates(Arrays.asList(
new DelayState().withName("delayState").withType(DELAY)
.withStart(
- new Start().withKind(Start.Kind.DEFAULT)
+ new Start()
)
.withEnd(
- new End().withKind(End.Kind.DEFAULT)
+ new End()
)
.withTimeDelay("PT1M")
)
diff --git a/api/src/test/resources/examples/applicantrequest.json b/api/src/test/resources/examples/applicantrequest.json
index 63ba80e1..a0f783b1 100644
--- a/api/src/test/resources/examples/applicantrequest.json
+++ b/api/src/test/resources/examples/applicantrequest.json
@@ -13,9 +13,7 @@
{
"name":"CheckApplication",
"type":"switch",
- "start": {
- "kind": "default"
- },
+ "start": true,
"dataConditions": [
{
"condition": "{{ $.applicants[?(@.age >= 18)] }}",
@@ -40,9 +38,7 @@
"name": "StartApplication",
"type": "subflow",
"workflowId": "startApplicationWorkflowId",
- "end": {
- "kind": "default"
- }
+ "end": true
},
{
"name":"RejectApplication",
@@ -58,9 +54,7 @@
}
}
],
- "end": {
- "kind": "default"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/api/src/test/resources/examples/applicantrequest.yml b/api/src/test/resources/examples/applicantrequest.yml
index 25526873..2fc4d15b 100644
--- a/api/src/test/resources/examples/applicantrequest.yml
+++ b/api/src/test/resources/examples/applicantrequest.yml
@@ -9,8 +9,7 @@ functions:
states:
- name: CheckApplication
type: switch
- start:
- kind: default
+ start: true
dataConditions:
- condition: "{{ $.applicants[?(@.age >= 18)] }}"
transition:
@@ -24,8 +23,7 @@ states:
- name: StartApplication
type: subflow
workflowId: startApplicationWorkflowId
- end:
- kind: default
+ end: true
- name: RejectApplication
type: operation
actionMode: sequential
@@ -34,5 +32,4 @@ states:
refName: sendRejectionEmailFunction
parameters:
applicant: "{{ $.applicant }}"
- end:
- kind: default
+ end: true
diff --git a/api/src/test/resources/examples/carauctionbids.json b/api/src/test/resources/examples/carauctionbids.json
index 10cd5680..f4d3d0e6 100644
--- a/api/src/test/resources/examples/carauctionbids.json
+++ b/api/src/test/resources/examples/carauctionbids.json
@@ -21,7 +21,6 @@
"name": "StoreCarAuctionBid",
"type": "event",
"start": {
- "kind": "scheduled",
"schedule": {
"interval": "2020-03-20T09:00:00Z/2020-03-20T15:00:00Z"
}
@@ -40,9 +39,7 @@
}]
}
],
- "end": {
- "kind": "terminate"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/api/src/test/resources/examples/carauctionbids.yml b/api/src/test/resources/examples/carauctionbids.yml
index 161d3c14..b6854aa7 100644
--- a/api/src/test/resources/examples/carauctionbids.yml
+++ b/api/src/test/resources/examples/carauctionbids.yml
@@ -13,7 +13,6 @@ states:
- name: StoreCarAuctionBid
type: event
start:
- kind: scheduled
schedule:
interval: 2020-03-20T09:00:00Z/2020-03-20T15:00:00Z
exclusive: true
@@ -26,4 +25,4 @@ states:
parameters:
bid: "{{ $.bid }}"
end:
- kind: terminate
\ No newline at end of file
+ terminate: true
\ No newline at end of file
diff --git a/api/src/test/resources/examples/creditcheck.json b/api/src/test/resources/examples/creditcheck.json
index 92c30506..046b64ac 100644
--- a/api/src/test/resources/examples/creditcheck.json
+++ b/api/src/test/resources/examples/creditcheck.json
@@ -29,9 +29,7 @@
{
"name": "CheckCredit",
"type": "callback",
- "start": {
- "kind": "default"
- },
+ "start": true,
"action": {
"functionRef": {
"refName": "callCreditCheckMicroservice",
@@ -75,9 +73,7 @@
"name": "StartApplication",
"type": "subflow",
"workflowId": "startApplicationWorkflowId",
- "end": {
- "kind": "default"
- }
+ "end": true
},
{
"name": "RejectApplication",
@@ -93,9 +89,7 @@
}
}
],
- "end": {
- "kind": "default"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/api/src/test/resources/examples/creditcheck.yml b/api/src/test/resources/examples/creditcheck.yml
index b275f719..65ad7c35 100644
--- a/api/src/test/resources/examples/creditcheck.yml
+++ b/api/src/test/resources/examples/creditcheck.yml
@@ -17,8 +17,7 @@ events:
states:
- name: CheckCredit
type: callback
- start:
- kind: default
+ start: true
action:
functionRef:
refName: callCreditCheckMicroservice
@@ -45,8 +44,7 @@ states:
- name: StartApplication
type: subflow
workflowId: startApplicationWorkflowId
- end:
- kind: default
+ end: true
- name: RejectApplication
type: operation
actionMode: sequential
@@ -55,5 +53,4 @@ states:
refName: sendRejectionEmailFunction
parameters:
applicant: "{{ $.customer }}"
- end:
- kind: default
+ end: true
diff --git a/api/src/test/resources/examples/eventbasedgreeting.json b/api/src/test/resources/examples/eventbasedgreeting.json
index 3bdaffe0..d131099a 100644
--- a/api/src/test/resources/examples/eventbasedgreeting.json
+++ b/api/src/test/resources/examples/eventbasedgreeting.json
@@ -20,9 +20,7 @@
{
"name":"Greet",
"type":"event",
- "start": {
- "kind": "default"
- },
+ "start": true,
"onEvents": [{
"eventRefs": ["GreetingEvent"],
"eventDataFilter": {
@@ -42,9 +40,7 @@
"stateDataFilter": {
"dataOutputPath": "{{ $.payload.greeting }}"
},
- "end": {
- "kind": "default"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/api/src/test/resources/examples/eventbasedgreeting.yml b/api/src/test/resources/examples/eventbasedgreeting.yml
index e624babc..592dc13b 100644
--- a/api/src/test/resources/examples/eventbasedgreeting.yml
+++ b/api/src/test/resources/examples/eventbasedgreeting.yml
@@ -12,8 +12,7 @@ functions:
states:
- name: Greet
type: event
- start:
- kind: default
+ start: true
onEvents:
- eventRefs:
- GreetingEvent
@@ -26,5 +25,4 @@ states:
name: "{{ $.greet.name }}"
stateDataFilter:
dataOutputPath: "{{ $.payload.greeting }}"
- end:
- kind: default
\ No newline at end of file
+ end: true
\ No newline at end of file
diff --git a/api/src/test/resources/examples/eventbasedtransition.json b/api/src/test/resources/examples/eventbasedtransition.json
index 8300135c..f5b4ffce 100644
--- a/api/src/test/resources/examples/eventbasedtransition.json
+++ b/api/src/test/resources/examples/eventbasedtransition.json
@@ -19,9 +19,7 @@
{
"name":"CheckVisaStatus",
"type":"switch",
- "start": {
- "kind": "default"
- },
+ "start": true,
"eventConditions": [
{
"eventRef": "visaApprovedEvent",
@@ -47,25 +45,19 @@
"name": "HandleApprovedVisa",
"type": "subflow",
"workflowId": "handleApprovedVisaWorkflowID",
- "end": {
- "kind": "default"
- }
+ "end": true
},
{
"name": "HandleRejectedVisa",
"type": "subflow",
"workflowId": "handleRejectedVisaWorkflowID",
- "end": {
- "kind": "default"
- }
+ "end": true
},
{
"name": "HandleNoVisaDecision",
"type": "subflow",
"workflowId": "handleNoVisaDecisionWorkfowId",
- "end": {
- "kind": "default"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/api/src/test/resources/examples/eventbasedtransition.yml b/api/src/test/resources/examples/eventbasedtransition.yml
index ef31466c..5f9dc8ed 100644
--- a/api/src/test/resources/examples/eventbasedtransition.yml
+++ b/api/src/test/resources/examples/eventbasedtransition.yml
@@ -13,8 +13,7 @@ events:
states:
- name: CheckVisaStatus
type: switch
- start:
- kind: default
+ start: true
eventConditions:
- eventRef: visaApprovedEvent
transition:
@@ -29,15 +28,12 @@ states:
- name: HandleApprovedVisa
type: subflow
workflowId: handleApprovedVisaWorkflowID
- end:
- kind: default
+ end: true
- name: HandleRejectedVisa
type: subflow
workflowId: handleRejectedVisaWorkflowID
- end:
- kind: default
+ end: true
- name: HandleNoVisaDecision
type: subflow
workflowId: handleNoVisaDecisionWorkfowId
- end:
- kind: default
+ end: true
diff --git a/api/src/test/resources/examples/finalizecollegeapplication.json b/api/src/test/resources/examples/finalizecollegeapplication.json
index 236ee6f3..b8af578c 100644
--- a/api/src/test/resources/examples/finalizecollegeapplication.json
+++ b/api/src/test/resources/examples/finalizecollegeapplication.json
@@ -44,9 +44,7 @@
{
"name": "FinalizeApplication",
"type": "event",
- "start": {
- "kind": "default"
- },
+ "start": true,
"exclusive": false,
"onEvents": [
{
@@ -67,9 +65,7 @@
]
}
],
- "end": {
- "kind": "terminate"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/api/src/test/resources/examples/finalizecollegeapplication.yml b/api/src/test/resources/examples/finalizecollegeapplication.yml
index c05634f8..1f228ae8 100644
--- a/api/src/test/resources/examples/finalizecollegeapplication.yml
+++ b/api/src/test/resources/examples/finalizecollegeapplication.yml
@@ -23,8 +23,7 @@ functions:
states:
- name: FinalizeApplication
type: event
- start:
- kind: default
+ start: true
exclusive: false
onEvents:
- eventRefs:
@@ -37,4 +36,4 @@ states:
parameters:
student: "{{ $.applicantId }}"
end:
- kind: terminate
\ No newline at end of file
+ terminate: true
\ No newline at end of file
diff --git a/api/src/test/resources/examples/foreachstatewithactions.json b/api/src/test/resources/examples/foreachstatewithactions.json
index fc631578..bc52250a 100644
--- a/api/src/test/resources/examples/foreachstatewithactions.json
+++ b/api/src/test/resources/examples/foreachstatewithactions.json
@@ -25,9 +25,7 @@
}
}
}],
- "end": {
- "kind": "default"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/api/src/test/resources/examples/foreachstatewithactions.yml b/api/src/test/resources/examples/foreachstatewithactions.yml
index cdb48871..55ae4513 100644
--- a/api/src/test/resources/examples/foreachstatewithactions.yml
+++ b/api/src/test/resources/examples/foreachstatewithactions.yml
@@ -17,5 +17,4 @@ states:
parameters:
orderNumber: "{{ $.completedorder.orderNumber }}"
email: "{{ $.completedorder.email }}"
- end:
- kind: default
+ end: true
diff --git a/api/src/test/resources/examples/greeting.json b/api/src/test/resources/examples/greeting.json
index 25f89f3a..7c8b58da 100644
--- a/api/src/test/resources/examples/greeting.json
+++ b/api/src/test/resources/examples/greeting.json
@@ -13,9 +13,7 @@
{
"name":"Greet",
"type":"operation",
- "start": {
- "kind": "default"
- },
+ "start": true,
"actions":[
{
"functionRef": {
@@ -29,9 +27,7 @@
}
}
],
- "end": {
- "kind": "default"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/api/src/test/resources/examples/greeting.yml b/api/src/test/resources/examples/greeting.yml
index fc791b9c..020617db 100644
--- a/api/src/test/resources/examples/greeting.yml
+++ b/api/src/test/resources/examples/greeting.yml
@@ -8,8 +8,7 @@ functions:
states:
- name: Greet
type: operation
- start:
- kind: default
+ start: true
actions:
- functionRef:
refName: greetingFunction
@@ -17,5 +16,4 @@ states:
name: "{{ $.person.name }}"
actionDataFilter:
dataResultsPath: "{{ $.greeting }}"
- end:
- kind: default
\ No newline at end of file
+ end: true
\ No newline at end of file
diff --git a/api/src/test/resources/examples/helloworld.json b/api/src/test/resources/examples/helloworld.json
index 5ffd0996..4643ec98 100644
--- a/api/src/test/resources/examples/helloworld.json
+++ b/api/src/test/resources/examples/helloworld.json
@@ -7,15 +7,11 @@
{
"name":"Hello State",
"type":"inject",
- "start": {
- "kind": "default"
- },
+ "start": true,
"data": {
"result": "Hello World!"
},
- "end": {
- "kind": "default"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/api/src/test/resources/examples/helloworld.yml b/api/src/test/resources/examples/helloworld.yml
index 1b49b3b3..7bc87270 100644
--- a/api/src/test/resources/examples/helloworld.yml
+++ b/api/src/test/resources/examples/helloworld.yml
@@ -5,9 +5,7 @@ description: Inject Hello World
states:
- name: Hello State
type: inject
- start:
- kind: default
+ start: true
data:
result: Hello World!
- end:
- kind: default
\ No newline at end of file
+ end: true
\ No newline at end of file
diff --git a/api/src/test/resources/examples/jobmonitoring.json b/api/src/test/resources/examples/jobmonitoring.json
index 3857cde8..3229e0c7 100644
--- a/api/src/test/resources/examples/jobmonitoring.json
+++ b/api/src/test/resources/examples/jobmonitoring.json
@@ -25,9 +25,7 @@
{
"name":"SubmitJob",
"type":"operation",
- "start": {
- "kind": "default"
- },
+ "start": true,
"actionMode":"sequential",
"actions":[
{
@@ -61,9 +59,7 @@
"name": "SubmitError",
"type": "subflow",
"workflowId": "handleJobSubmissionErrorWorkflow",
- "end": {
- "kind": "default"
- }
+ "end": true
},
{
"name": "WaitForCompletion",
@@ -134,9 +130,7 @@
}
}
],
- "end": {
- "kind": "default"
- }
+ "end": true
},
{
"name":"JobFailed",
@@ -152,9 +146,7 @@
}
}
],
- "end": {
- "kind": "default"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/api/src/test/resources/examples/jobmonitoring.yml b/api/src/test/resources/examples/jobmonitoring.yml
index 883eb974..d375a752 100644
--- a/api/src/test/resources/examples/jobmonitoring.yml
+++ b/api/src/test/resources/examples/jobmonitoring.yml
@@ -15,8 +15,7 @@ functions:
states:
- name: SubmitJob
type: operation
- start:
- kind: default
+ start: true
actionMode: sequential
actions:
- functionRef:
@@ -36,8 +35,7 @@ states:
- name: SubmitError
type: subflow
workflowId: handleJobSubmissionErrorWorkflow
- end:
- kind: default
+ end: true
- name: WaitForCompletion
type: delay
timeDelay: PT5S
@@ -77,8 +75,7 @@ states:
refName: reportJobSuceeded
parameters:
name: "{{ $.jobuid }}"
- end:
- kind: default
+ end: true
- name: JobFailed
type: operation
actionMode: sequential
@@ -87,5 +84,4 @@ states:
refName: reportJobFailed
parameters:
name: "{{ $.jobuid }}"
- end:
- kind: default
+ end: true
diff --git a/api/src/test/resources/examples/monitorpatient.json b/api/src/test/resources/examples/monitorpatient.json
index baf16d05..a799fa86 100644
--- a/api/src/test/resources/examples/monitorpatient.json
+++ b/api/src/test/resources/examples/monitorpatient.json
@@ -52,9 +52,7 @@
{
"name": "MonitorVitals",
"type": "event",
- "start": {
- "kind": "default"
- },
+ "start": true,
"exclusive": true,
"onEvents": [{
"eventRefs": ["HighBodyTemperature"],
@@ -91,7 +89,7 @@
}
],
"end": {
- "kind": "terminate"
+ "terminate": true
}
}]
}
\ No newline at end of file
diff --git a/api/src/test/resources/examples/monitorpatient.yml b/api/src/test/resources/examples/monitorpatient.yml
index 343d87d3..3a85f0aa 100644
--- a/api/src/test/resources/examples/monitorpatient.yml
+++ b/api/src/test/resources/examples/monitorpatient.yml
@@ -27,8 +27,7 @@ functions:
states:
- name: MonitorVitals
type: event
- start:
- kind: default
+ start: true
exclusive: true
onEvents:
- eventRefs:
@@ -53,4 +52,4 @@ states:
parameters:
patientid: "{{ $.patientId }}"
end:
- kind: terminate
\ No newline at end of file
+ terminate: true
\ No newline at end of file
diff --git a/api/src/test/resources/examples/parallel.json b/api/src/test/resources/examples/parallel.json
index 089c0801..c479e749 100644
--- a/api/src/test/resources/examples/parallel.json
+++ b/api/src/test/resources/examples/parallel.json
@@ -7,9 +7,7 @@
{
"name": "ParallelExec",
"type": "parallel",
- "start": {
- "kind": "default"
- },
+ "start": true,
"completionType": "and",
"branches": [
{
@@ -21,9 +19,7 @@
"workflowId": "longdelayworkflowid"
}
],
- "end": {
- "kind": "default"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/api/src/test/resources/examples/parallel.yml b/api/src/test/resources/examples/parallel.yml
index d799cd78..6f086880 100644
--- a/api/src/test/resources/examples/parallel.yml
+++ b/api/src/test/resources/examples/parallel.yml
@@ -5,13 +5,11 @@ description: Executes two branches in parallel
states:
- name: ParallelExec
type: parallel
- start:
- kind: default
+ start: true
completionType: and
branches:
- name: ShortDelayBranch
workflowId: shortdelayworkflowid
- name: LongDelayBranch
workflowId: longdelayworkflowid
- end:
- kind: default
\ No newline at end of file
+ end: true
\ No newline at end of file
diff --git a/api/src/test/resources/examples/periodicinboxcheck.json b/api/src/test/resources/examples/periodicinboxcheck.json
index 24752487..1c5cdfc6 100644
--- a/api/src/test/resources/examples/periodicinboxcheck.json
+++ b/api/src/test/resources/examples/periodicinboxcheck.json
@@ -18,9 +18,10 @@
"name": "CheckInbox",
"type": "operation",
"start": {
- "kind": "scheduled",
"schedule": {
- "cron": "0 0/15 * * * ?"
+ "cron": {
+ "expression": "0 0/15 * * * ?"
+ }
}
},
"actionMode": "sequential",
@@ -50,9 +51,7 @@
}
}
],
- "end": {
- "kind": "default"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/api/src/test/resources/examples/periodicinboxcheck.yml b/api/src/test/resources/examples/periodicinboxcheck.yml
index 9b4cdc55..162a29ff 100644
--- a/api/src/test/resources/examples/periodicinboxcheck.yml
+++ b/api/src/test/resources/examples/periodicinboxcheck.yml
@@ -11,9 +11,9 @@ states:
- name: CheckInbox
type: operation
start:
- kind: scheduled
schedule:
- cron: 0 0/15 * * * ?
+ cron:
+ expression: 0 0/15 * * * ?
actionMode: sequential
actions:
- functionRef:
@@ -29,5 +29,4 @@ states:
refName: sendTextFunction
parameters:
message: "{{ $.singlemessage }}"
- end:
- kind: default
\ No newline at end of file
+ end: true
\ No newline at end of file
diff --git a/api/src/test/resources/examples/provisionorder.json b/api/src/test/resources/examples/provisionorder.json
index f56c50ba..c7ab194f 100644
--- a/api/src/test/resources/examples/provisionorder.json
+++ b/api/src/test/resources/examples/provisionorder.json
@@ -13,9 +13,7 @@
{
"name":"ProvisionOrder",
"type":"operation",
- "start": {
- "kind": "default"
- },
+ "start": true,
"actionMode":"sequential",
"actions":[
{
@@ -58,33 +56,25 @@
"name": "MissingId",
"type": "subflow",
"workflowId": "handleMissingIdExceptionWorkflow",
- "end": {
- "kind": "default"
- }
+ "end": true
},
{
"name": "MissingItem",
"type": "subflow",
"workflowId": "handleMissingItemExceptionWorkflow",
- "end": {
- "kind": "default"
- }
+ "end": true
},
{
"name": "MissingQuantity",
"type": "subflow",
"workflowId": "handleMissingQuantityExceptionWorkflow",
- "end": {
- "kind": "default"
- }
+ "end": true
},
{
"name": "ApplyOrder",
"type": "subflow",
"workflowId": "applyOrderWorkflowId",
- "end": {
- "kind": "default"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/api/src/test/resources/examples/provisionorder.yml b/api/src/test/resources/examples/provisionorder.yml
index 2031dd14..44777fe6 100644
--- a/api/src/test/resources/examples/provisionorder.yml
+++ b/api/src/test/resources/examples/provisionorder.yml
@@ -8,8 +8,7 @@ functions:
states:
- name: ProvisionOrder
type: operation
- start:
- kind: default
+ start: true
actionMode: sequential
actions:
- functionRef:
@@ -33,20 +32,16 @@ states:
- name: MissingId
type: subflow
workflowId: handleMissingIdExceptionWorkflow
- end:
- kind: default
+ end: true
- name: MissingItem
type: subflow
workflowId: handleMissingItemExceptionWorkflow
- end:
- kind: default
+ end: true
- name: MissingQuantity
type: subflow
workflowId: handleMissingQuantityExceptionWorkflow
- end:
- kind: default
+ end: true
- name: ApplyOrder
type: subflow
workflowId: applyOrderWorkflowId
- end:
- kind: default
\ No newline at end of file
+ end: true
\ No newline at end of file
diff --git a/api/src/test/resources/examples/sendcloudevent.json b/api/src/test/resources/examples/sendcloudevent.json
index 40232d5b..861d90b6 100644
--- a/api/src/test/resources/examples/sendcloudevent.json
+++ b/api/src/test/resources/examples/sendcloudevent.json
@@ -19,9 +19,7 @@
{
"name": "ProvisionOrdersState",
"type": "foreach",
- "start": {
- "kind": "default"
- },
+ "start": true,
"inputCollection": "{{ $.orders }}",
"iterationParam": "singleorder",
"outputCollection": "{{ $.provisionedOrders }}",
@@ -36,7 +34,6 @@
}
],
"end": {
- "kind": "event",
"produceEvents": [
{
"eventRef": "provisioningCompleteEvent",
diff --git a/api/src/test/resources/examples/sendcloudevent.yml b/api/src/test/resources/examples/sendcloudevent.yml
index 275f6820..1a3c39d7 100644
--- a/api/src/test/resources/examples/sendcloudevent.yml
+++ b/api/src/test/resources/examples/sendcloudevent.yml
@@ -12,8 +12,7 @@ functions:
states:
- name: ProvisionOrdersState
type: foreach
- start:
- kind: default
+ start: true
inputCollection: "{{ $.orders }}"
iterationParam: singleorder
outputCollection: "{{ $.provisionedOrders }}"
@@ -23,7 +22,6 @@ states:
parameters:
order: "{{ $.singleorder }}"
end:
- kind: event
produceEvents:
- eventRef: provisioningCompleteEvent
data: "{{ $.provisionedOrders }}"
diff --git a/api/src/test/resources/examples/solvemathproblems.json b/api/src/test/resources/examples/solvemathproblems.json
index a629d6d3..ac51ef5f 100644
--- a/api/src/test/resources/examples/solvemathproblems.json
+++ b/api/src/test/resources/examples/solvemathproblems.json
@@ -12,9 +12,7 @@
"states":[
{
"name":"Solve",
- "start": {
- "kind": "default"
- },
+ "start": true,
"type":"foreach",
"inputCollection": "{{ $.expressions }}",
"iterationParam": "singleexpression",
@@ -32,9 +30,7 @@
"stateDataFilter": {
"dataOutputPath": "{{ $.results }}"
},
- "end": {
- "kind": "default"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/api/src/test/resources/examples/solvemathproblems.yml b/api/src/test/resources/examples/solvemathproblems.yml
index 6dcf2481..53ec8aa4 100644
--- a/api/src/test/resources/examples/solvemathproblems.yml
+++ b/api/src/test/resources/examples/solvemathproblems.yml
@@ -7,8 +7,7 @@ functions:
operation: http://myapis.org/mapthapis.json#solveExpression
states:
- name: Solve
- start:
- kind: default
+ start: true
type: foreach
inputCollection: "{{ $.expressions }}"
iterationParam: singleexpression
@@ -20,5 +19,4 @@ states:
expression: "{{ $.singleexpression }}"
stateDataFilter:
dataOutputPath: "{{ $.results }}"
- end:
- kind: default
\ No newline at end of file
+ end: true
\ No newline at end of file
diff --git a/api/src/test/resources/examples/vetappointmentservice.json b/api/src/test/resources/examples/vetappointmentservice.json
index 3b567a6d..5432677e 100644
--- a/api/src/test/resources/examples/vetappointmentservice.json
+++ b/api/src/test/resources/examples/vetappointmentservice.json
@@ -19,9 +19,7 @@
{
"name": "MakeVetAppointmentState",
"type": "operation",
- "start": {
- "kind": "default"
- },
+ "start": true,
"actions": [
{
"name": "MakeAppointmentAction",
@@ -36,9 +34,7 @@
"timeout": "PT15M"
}
],
- "end": {
- "kind": "default"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/api/src/test/resources/examples/vetappointmentservice.yml b/api/src/test/resources/examples/vetappointmentservice.yml
index 13f02648..08f7cfce 100644
--- a/api/src/test/resources/examples/vetappointmentservice.yml
+++ b/api/src/test/resources/examples/vetappointmentservice.yml
@@ -12,8 +12,7 @@ events:
states:
- name: MakeVetAppointmentState
type: operation
- start:
- kind: default
+ start: true
actions:
- name: MakeAppointmentAction
eventRef:
@@ -23,5 +22,4 @@ states:
actionDataFilter:
dataResultsPath: "{{ $.appointmentInfo }}"
timeout: PT15M
- end:
- kind: default
\ No newline at end of file
+ end: true
\ No newline at end of file
diff --git a/api/src/test/resources/features/applicantrequest.json b/api/src/test/resources/features/applicantrequest.json
index bf649ef6..09be71f1 100644
--- a/api/src/test/resources/features/applicantrequest.json
+++ b/api/src/test/resources/features/applicantrequest.json
@@ -9,9 +9,7 @@
{
"name":"CheckApplication",
"type":"switch",
- "start": {
- "kind": "default"
- },
+ "start": true,
"dataConditions": [
{
"condition": "{{ $.applicants[?(@.age >= 18)] }}",
@@ -36,9 +34,7 @@
"name": "StartApplication",
"type": "subflow",
"workflowId": "startApplicationWorkflowId",
- "end": {
- "kind": "default"
- }
+ "end": true
},
{
"name":"RejectApplication",
@@ -59,14 +55,10 @@
"error": "TimeoutError",
"code": "500",
"retryRef": "TimeoutRetryStrategy",
- "end": {
- "kind": "default"
- }
+ "end": true
}
],
- "end": {
- "kind": "default"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/api/src/test/resources/features/applicantrequest.yml b/api/src/test/resources/features/applicantrequest.yml
index 0ed37e99..2b688a70 100644
--- a/api/src/test/resources/features/applicantrequest.yml
+++ b/api/src/test/resources/features/applicantrequest.yml
@@ -7,8 +7,7 @@ retries: features/applicantrequestretries.yml
states:
- name: CheckApplication
type: switch
- start:
- kind: default
+ start: true
dataConditions:
- condition: "{{ $.applicants[?(@.age >= 18)] }}"
transition:
@@ -22,8 +21,7 @@ states:
- name: StartApplication
type: subflow
workflowId: startApplicationWorkflowId
- end:
- kind: default
+ end: true
- name: RejectApplication
type: operation
actionMode: sequential
@@ -36,7 +34,5 @@ states:
- error: TimeoutError
code: '500'
retryRef: TimeoutRetryStrategy
- end:
- kind: default
- end:
- kind: default
+ end: true
+ end: true
diff --git a/api/src/test/resources/features/vetappointment.json b/api/src/test/resources/features/vetappointment.json
index 954d76df..86d7bd36 100644
--- a/api/src/test/resources/features/vetappointment.json
+++ b/api/src/test/resources/features/vetappointment.json
@@ -9,9 +9,7 @@
{
"name": "MakeVetAppointmentState",
"type": "operation",
- "start": {
- "kind": "default"
- },
+ "start": true,
"actions": [
{
"name": "MakeAppointmentAction",
@@ -31,14 +29,10 @@
"error": "TimeoutError",
"code": "500",
"retryRef": "TimeoutRetryStrategy",
- "end": {
- "kind": "default"
- }
+ "end": true
}
],
- "end": {
- "kind": "default"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/api/src/test/resources/features/vetappointment.yml b/api/src/test/resources/features/vetappointment.yml
index 143e85ad..36ef7d95 100644
--- a/api/src/test/resources/features/vetappointment.yml
+++ b/api/src/test/resources/features/vetappointment.yml
@@ -7,8 +7,7 @@ retries: features/vetappointmentretries.yml
states:
- name: MakeVetAppointmentState
type: operation
- start:
- kind: default
+ start: true
actions:
- name: MakeAppointmentAction
eventRef:
@@ -22,7 +21,5 @@ states:
- error: TimeoutError
code: '500'
retryRef: TimeoutRetryStrategy
- end:
- kind: default
- end:
- kind: default
+ end: true
+ end: true
diff --git a/diagram/src/test/resources/examples/applicantrequest.json b/diagram/src/test/resources/examples/applicantrequest.json
index 63ba80e1..a0f783b1 100644
--- a/diagram/src/test/resources/examples/applicantrequest.json
+++ b/diagram/src/test/resources/examples/applicantrequest.json
@@ -13,9 +13,7 @@
{
"name":"CheckApplication",
"type":"switch",
- "start": {
- "kind": "default"
- },
+ "start": true,
"dataConditions": [
{
"condition": "{{ $.applicants[?(@.age >= 18)] }}",
@@ -40,9 +38,7 @@
"name": "StartApplication",
"type": "subflow",
"workflowId": "startApplicationWorkflowId",
- "end": {
- "kind": "default"
- }
+ "end": true
},
{
"name":"RejectApplication",
@@ -58,9 +54,7 @@
}
}
],
- "end": {
- "kind": "default"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/diagram/src/test/resources/examples/applicantrequest.yml b/diagram/src/test/resources/examples/applicantrequest.yml
index 25526873..2fc4d15b 100644
--- a/diagram/src/test/resources/examples/applicantrequest.yml
+++ b/diagram/src/test/resources/examples/applicantrequest.yml
@@ -9,8 +9,7 @@ functions:
states:
- name: CheckApplication
type: switch
- start:
- kind: default
+ start: true
dataConditions:
- condition: "{{ $.applicants[?(@.age >= 18)] }}"
transition:
@@ -24,8 +23,7 @@ states:
- name: StartApplication
type: subflow
workflowId: startApplicationWorkflowId
- end:
- kind: default
+ end: true
- name: RejectApplication
type: operation
actionMode: sequential
@@ -34,5 +32,4 @@ states:
refName: sendRejectionEmailFunction
parameters:
applicant: "{{ $.applicant }}"
- end:
- kind: default
+ end: true
diff --git a/diagram/src/test/resources/examples/carauctionbids.json b/diagram/src/test/resources/examples/carauctionbids.json
index 10cd5680..f4d3d0e6 100644
--- a/diagram/src/test/resources/examples/carauctionbids.json
+++ b/diagram/src/test/resources/examples/carauctionbids.json
@@ -21,7 +21,6 @@
"name": "StoreCarAuctionBid",
"type": "event",
"start": {
- "kind": "scheduled",
"schedule": {
"interval": "2020-03-20T09:00:00Z/2020-03-20T15:00:00Z"
}
@@ -40,9 +39,7 @@
}]
}
],
- "end": {
- "kind": "terminate"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/diagram/src/test/resources/examples/carauctionbids.yml b/diagram/src/test/resources/examples/carauctionbids.yml
index 161d3c14..b6854aa7 100644
--- a/diagram/src/test/resources/examples/carauctionbids.yml
+++ b/diagram/src/test/resources/examples/carauctionbids.yml
@@ -13,7 +13,6 @@ states:
- name: StoreCarAuctionBid
type: event
start:
- kind: scheduled
schedule:
interval: 2020-03-20T09:00:00Z/2020-03-20T15:00:00Z
exclusive: true
@@ -26,4 +25,4 @@ states:
parameters:
bid: "{{ $.bid }}"
end:
- kind: terminate
\ No newline at end of file
+ terminate: true
\ No newline at end of file
diff --git a/diagram/src/test/resources/examples/creditcheck.json b/diagram/src/test/resources/examples/creditcheck.json
index 92c30506..046b64ac 100644
--- a/diagram/src/test/resources/examples/creditcheck.json
+++ b/diagram/src/test/resources/examples/creditcheck.json
@@ -29,9 +29,7 @@
{
"name": "CheckCredit",
"type": "callback",
- "start": {
- "kind": "default"
- },
+ "start": true,
"action": {
"functionRef": {
"refName": "callCreditCheckMicroservice",
@@ -75,9 +73,7 @@
"name": "StartApplication",
"type": "subflow",
"workflowId": "startApplicationWorkflowId",
- "end": {
- "kind": "default"
- }
+ "end": true
},
{
"name": "RejectApplication",
@@ -93,9 +89,7 @@
}
}
],
- "end": {
- "kind": "default"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/diagram/src/test/resources/examples/creditcheck.yml b/diagram/src/test/resources/examples/creditcheck.yml
index b275f719..65ad7c35 100644
--- a/diagram/src/test/resources/examples/creditcheck.yml
+++ b/diagram/src/test/resources/examples/creditcheck.yml
@@ -17,8 +17,7 @@ events:
states:
- name: CheckCredit
type: callback
- start:
- kind: default
+ start: true
action:
functionRef:
refName: callCreditCheckMicroservice
@@ -45,8 +44,7 @@ states:
- name: StartApplication
type: subflow
workflowId: startApplicationWorkflowId
- end:
- kind: default
+ end: true
- name: RejectApplication
type: operation
actionMode: sequential
@@ -55,5 +53,4 @@ states:
refName: sendRejectionEmailFunction
parameters:
applicant: "{{ $.customer }}"
- end:
- kind: default
+ end: true
diff --git a/diagram/src/test/resources/examples/eventbasedgreeting.json b/diagram/src/test/resources/examples/eventbasedgreeting.json
index 3bdaffe0..d131099a 100644
--- a/diagram/src/test/resources/examples/eventbasedgreeting.json
+++ b/diagram/src/test/resources/examples/eventbasedgreeting.json
@@ -20,9 +20,7 @@
{
"name":"Greet",
"type":"event",
- "start": {
- "kind": "default"
- },
+ "start": true,
"onEvents": [{
"eventRefs": ["GreetingEvent"],
"eventDataFilter": {
@@ -42,9 +40,7 @@
"stateDataFilter": {
"dataOutputPath": "{{ $.payload.greeting }}"
},
- "end": {
- "kind": "default"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/diagram/src/test/resources/examples/eventbasedgreeting.yml b/diagram/src/test/resources/examples/eventbasedgreeting.yml
index e624babc..592dc13b 100644
--- a/diagram/src/test/resources/examples/eventbasedgreeting.yml
+++ b/diagram/src/test/resources/examples/eventbasedgreeting.yml
@@ -12,8 +12,7 @@ functions:
states:
- name: Greet
type: event
- start:
- kind: default
+ start: true
onEvents:
- eventRefs:
- GreetingEvent
@@ -26,5 +25,4 @@ states:
name: "{{ $.greet.name }}"
stateDataFilter:
dataOutputPath: "{{ $.payload.greeting }}"
- end:
- kind: default
\ No newline at end of file
+ end: true
\ No newline at end of file
diff --git a/diagram/src/test/resources/examples/eventbasedtransition.json b/diagram/src/test/resources/examples/eventbasedtransition.json
index 8300135c..f5b4ffce 100644
--- a/diagram/src/test/resources/examples/eventbasedtransition.json
+++ b/diagram/src/test/resources/examples/eventbasedtransition.json
@@ -19,9 +19,7 @@
{
"name":"CheckVisaStatus",
"type":"switch",
- "start": {
- "kind": "default"
- },
+ "start": true,
"eventConditions": [
{
"eventRef": "visaApprovedEvent",
@@ -47,25 +45,19 @@
"name": "HandleApprovedVisa",
"type": "subflow",
"workflowId": "handleApprovedVisaWorkflowID",
- "end": {
- "kind": "default"
- }
+ "end": true
},
{
"name": "HandleRejectedVisa",
"type": "subflow",
"workflowId": "handleRejectedVisaWorkflowID",
- "end": {
- "kind": "default"
- }
+ "end": true
},
{
"name": "HandleNoVisaDecision",
"type": "subflow",
"workflowId": "handleNoVisaDecisionWorkfowId",
- "end": {
- "kind": "default"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/diagram/src/test/resources/examples/eventbasedtransition.yml b/diagram/src/test/resources/examples/eventbasedtransition.yml
index ef31466c..5f9dc8ed 100644
--- a/diagram/src/test/resources/examples/eventbasedtransition.yml
+++ b/diagram/src/test/resources/examples/eventbasedtransition.yml
@@ -13,8 +13,7 @@ events:
states:
- name: CheckVisaStatus
type: switch
- start:
- kind: default
+ start: true
eventConditions:
- eventRef: visaApprovedEvent
transition:
@@ -29,15 +28,12 @@ states:
- name: HandleApprovedVisa
type: subflow
workflowId: handleApprovedVisaWorkflowID
- end:
- kind: default
+ end: true
- name: HandleRejectedVisa
type: subflow
workflowId: handleRejectedVisaWorkflowID
- end:
- kind: default
+ end: true
- name: HandleNoVisaDecision
type: subflow
workflowId: handleNoVisaDecisionWorkfowId
- end:
- kind: default
+ end: true
diff --git a/diagram/src/test/resources/examples/finalizecollegeapplication.json b/diagram/src/test/resources/examples/finalizecollegeapplication.json
index 236ee6f3..b8af578c 100644
--- a/diagram/src/test/resources/examples/finalizecollegeapplication.json
+++ b/diagram/src/test/resources/examples/finalizecollegeapplication.json
@@ -44,9 +44,7 @@
{
"name": "FinalizeApplication",
"type": "event",
- "start": {
- "kind": "default"
- },
+ "start": true,
"exclusive": false,
"onEvents": [
{
@@ -67,9 +65,7 @@
]
}
],
- "end": {
- "kind": "terminate"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/diagram/src/test/resources/examples/finalizecollegeapplication.yml b/diagram/src/test/resources/examples/finalizecollegeapplication.yml
index c05634f8..1f228ae8 100644
--- a/diagram/src/test/resources/examples/finalizecollegeapplication.yml
+++ b/diagram/src/test/resources/examples/finalizecollegeapplication.yml
@@ -23,8 +23,7 @@ functions:
states:
- name: FinalizeApplication
type: event
- start:
- kind: default
+ start: true
exclusive: false
onEvents:
- eventRefs:
@@ -37,4 +36,4 @@ states:
parameters:
student: "{{ $.applicantId }}"
end:
- kind: terminate
\ No newline at end of file
+ terminate: true
\ No newline at end of file
diff --git a/diagram/src/test/resources/examples/foreachstatewithactions.json b/diagram/src/test/resources/examples/foreachstatewithactions.json
index 58f61c99..3862632d 100644
--- a/diagram/src/test/resources/examples/foreachstatewithactions.json
+++ b/diagram/src/test/resources/examples/foreachstatewithactions.json
@@ -13,7 +13,7 @@
{
"name":"SendConfirmationForEachCompletedhOrder",
"type":"foreach",
- "start": {"kind": "default"},
+ "start": true,
"inputCollection": "{{ $.orders[?(@.completed == true)] }}",
"iterationParam": "{{ $.completedorder }}",
"actions":[
@@ -26,9 +26,7 @@
}
}
}],
- "end": {
- "kind": "default"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/diagram/src/test/resources/examples/foreachstatewithactions.yml b/diagram/src/test/resources/examples/foreachstatewithactions.yml
index e16fb155..c3c9f6c2 100644
--- a/diagram/src/test/resources/examples/foreachstatewithactions.yml
+++ b/diagram/src/test/resources/examples/foreachstatewithactions.yml
@@ -9,8 +9,7 @@ functions:
states:
- name: SendConfirmationForEachCompletedhOrder
type: foreach
- start:
- kind: default
+ start: true
inputCollection: "{{ $.orders[?(@.completed == true)] }}"
iterationParam: "{{ $.completedorder }}"
actions:
@@ -19,5 +18,4 @@ states:
parameters:
orderNumber: "{{ $.completedorder.orderNumber }}"
email: "{{ $.completedorder.email }}"
- end:
- kind: default
+ end: true
diff --git a/diagram/src/test/resources/examples/greeting.json b/diagram/src/test/resources/examples/greeting.json
index 25f89f3a..7c8b58da 100644
--- a/diagram/src/test/resources/examples/greeting.json
+++ b/diagram/src/test/resources/examples/greeting.json
@@ -13,9 +13,7 @@
{
"name":"Greet",
"type":"operation",
- "start": {
- "kind": "default"
- },
+ "start": true,
"actions":[
{
"functionRef": {
@@ -29,9 +27,7 @@
}
}
],
- "end": {
- "kind": "default"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/diagram/src/test/resources/examples/greeting.yml b/diagram/src/test/resources/examples/greeting.yml
index fc791b9c..020617db 100644
--- a/diagram/src/test/resources/examples/greeting.yml
+++ b/diagram/src/test/resources/examples/greeting.yml
@@ -8,8 +8,7 @@ functions:
states:
- name: Greet
type: operation
- start:
- kind: default
+ start: true
actions:
- functionRef:
refName: greetingFunction
@@ -17,5 +16,4 @@ states:
name: "{{ $.person.name }}"
actionDataFilter:
dataResultsPath: "{{ $.greeting }}"
- end:
- kind: default
\ No newline at end of file
+ end: true
\ No newline at end of file
diff --git a/diagram/src/test/resources/examples/helloworld.json b/diagram/src/test/resources/examples/helloworld.json
index 5ffd0996..4643ec98 100644
--- a/diagram/src/test/resources/examples/helloworld.json
+++ b/diagram/src/test/resources/examples/helloworld.json
@@ -7,15 +7,11 @@
{
"name":"Hello State",
"type":"inject",
- "start": {
- "kind": "default"
- },
+ "start": true,
"data": {
"result": "Hello World!"
},
- "end": {
- "kind": "default"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/diagram/src/test/resources/examples/helloworld.yml b/diagram/src/test/resources/examples/helloworld.yml
index 1b49b3b3..7bc87270 100644
--- a/diagram/src/test/resources/examples/helloworld.yml
+++ b/diagram/src/test/resources/examples/helloworld.yml
@@ -5,9 +5,7 @@ description: Inject Hello World
states:
- name: Hello State
type: inject
- start:
- kind: default
+ start: true
data:
result: Hello World!
- end:
- kind: default
\ No newline at end of file
+ end: true
\ No newline at end of file
diff --git a/diagram/src/test/resources/examples/jobmonitoring.json b/diagram/src/test/resources/examples/jobmonitoring.json
index 3857cde8..3229e0c7 100644
--- a/diagram/src/test/resources/examples/jobmonitoring.json
+++ b/diagram/src/test/resources/examples/jobmonitoring.json
@@ -25,9 +25,7 @@
{
"name":"SubmitJob",
"type":"operation",
- "start": {
- "kind": "default"
- },
+ "start": true,
"actionMode":"sequential",
"actions":[
{
@@ -61,9 +59,7 @@
"name": "SubmitError",
"type": "subflow",
"workflowId": "handleJobSubmissionErrorWorkflow",
- "end": {
- "kind": "default"
- }
+ "end": true
},
{
"name": "WaitForCompletion",
@@ -134,9 +130,7 @@
}
}
],
- "end": {
- "kind": "default"
- }
+ "end": true
},
{
"name":"JobFailed",
@@ -152,9 +146,7 @@
}
}
],
- "end": {
- "kind": "default"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/diagram/src/test/resources/examples/jobmonitoring.yml b/diagram/src/test/resources/examples/jobmonitoring.yml
index 883eb974..d375a752 100644
--- a/diagram/src/test/resources/examples/jobmonitoring.yml
+++ b/diagram/src/test/resources/examples/jobmonitoring.yml
@@ -15,8 +15,7 @@ functions:
states:
- name: SubmitJob
type: operation
- start:
- kind: default
+ start: true
actionMode: sequential
actions:
- functionRef:
@@ -36,8 +35,7 @@ states:
- name: SubmitError
type: subflow
workflowId: handleJobSubmissionErrorWorkflow
- end:
- kind: default
+ end: true
- name: WaitForCompletion
type: delay
timeDelay: PT5S
@@ -77,8 +75,7 @@ states:
refName: reportJobSuceeded
parameters:
name: "{{ $.jobuid }}"
- end:
- kind: default
+ end: true
- name: JobFailed
type: operation
actionMode: sequential
@@ -87,5 +84,4 @@ states:
refName: reportJobFailed
parameters:
name: "{{ $.jobuid }}"
- end:
- kind: default
+ end: true
diff --git a/diagram/src/test/resources/examples/monitorpatient.json b/diagram/src/test/resources/examples/monitorpatient.json
index baf16d05..1fdd774e 100644
--- a/diagram/src/test/resources/examples/monitorpatient.json
+++ b/diagram/src/test/resources/examples/monitorpatient.json
@@ -52,9 +52,7 @@
{
"name": "MonitorVitals",
"type": "event",
- "start": {
- "kind": "default"
- },
+ "start": true,
"exclusive": true,
"onEvents": [{
"eventRefs": ["HighBodyTemperature"],
@@ -90,8 +88,6 @@
}]
}
],
- "end": {
- "kind": "terminate"
- }
+ "end": true
}]
}
\ No newline at end of file
diff --git a/diagram/src/test/resources/examples/monitorpatient.yml b/diagram/src/test/resources/examples/monitorpatient.yml
index 343d87d3..3a85f0aa 100644
--- a/diagram/src/test/resources/examples/monitorpatient.yml
+++ b/diagram/src/test/resources/examples/monitorpatient.yml
@@ -27,8 +27,7 @@ functions:
states:
- name: MonitorVitals
type: event
- start:
- kind: default
+ start: true
exclusive: true
onEvents:
- eventRefs:
@@ -53,4 +52,4 @@ states:
parameters:
patientid: "{{ $.patientId }}"
end:
- kind: terminate
\ No newline at end of file
+ terminate: true
\ No newline at end of file
diff --git a/diagram/src/test/resources/examples/parallel.json b/diagram/src/test/resources/examples/parallel.json
index 089c0801..c479e749 100644
--- a/diagram/src/test/resources/examples/parallel.json
+++ b/diagram/src/test/resources/examples/parallel.json
@@ -7,9 +7,7 @@
{
"name": "ParallelExec",
"type": "parallel",
- "start": {
- "kind": "default"
- },
+ "start": true,
"completionType": "and",
"branches": [
{
@@ -21,9 +19,7 @@
"workflowId": "longdelayworkflowid"
}
],
- "end": {
- "kind": "default"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/diagram/src/test/resources/examples/parallel.yml b/diagram/src/test/resources/examples/parallel.yml
index d799cd78..6f086880 100644
--- a/diagram/src/test/resources/examples/parallel.yml
+++ b/diagram/src/test/resources/examples/parallel.yml
@@ -5,13 +5,11 @@ description: Executes two branches in parallel
states:
- name: ParallelExec
type: parallel
- start:
- kind: default
+ start: true
completionType: and
branches:
- name: ShortDelayBranch
workflowId: shortdelayworkflowid
- name: LongDelayBranch
workflowId: longdelayworkflowid
- end:
- kind: default
\ No newline at end of file
+ end: true
\ No newline at end of file
diff --git a/diagram/src/test/resources/examples/periodicinboxcheck.json b/diagram/src/test/resources/examples/periodicinboxcheck.json
index 24752487..1c5cdfc6 100644
--- a/diagram/src/test/resources/examples/periodicinboxcheck.json
+++ b/diagram/src/test/resources/examples/periodicinboxcheck.json
@@ -18,9 +18,10 @@
"name": "CheckInbox",
"type": "operation",
"start": {
- "kind": "scheduled",
"schedule": {
- "cron": "0 0/15 * * * ?"
+ "cron": {
+ "expression": "0 0/15 * * * ?"
+ }
}
},
"actionMode": "sequential",
@@ -50,9 +51,7 @@
}
}
],
- "end": {
- "kind": "default"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/diagram/src/test/resources/examples/periodicinboxcheck.yml b/diagram/src/test/resources/examples/periodicinboxcheck.yml
index 9b4cdc55..162a29ff 100644
--- a/diagram/src/test/resources/examples/periodicinboxcheck.yml
+++ b/diagram/src/test/resources/examples/periodicinboxcheck.yml
@@ -11,9 +11,9 @@ states:
- name: CheckInbox
type: operation
start:
- kind: scheduled
schedule:
- cron: 0 0/15 * * * ?
+ cron:
+ expression: 0 0/15 * * * ?
actionMode: sequential
actions:
- functionRef:
@@ -29,5 +29,4 @@ states:
refName: sendTextFunction
parameters:
message: "{{ $.singlemessage }}"
- end:
- kind: default
\ No newline at end of file
+ end: true
\ No newline at end of file
diff --git a/diagram/src/test/resources/examples/provisionorder.json b/diagram/src/test/resources/examples/provisionorder.json
index f56c50ba..c7ab194f 100644
--- a/diagram/src/test/resources/examples/provisionorder.json
+++ b/diagram/src/test/resources/examples/provisionorder.json
@@ -13,9 +13,7 @@
{
"name":"ProvisionOrder",
"type":"operation",
- "start": {
- "kind": "default"
- },
+ "start": true,
"actionMode":"sequential",
"actions":[
{
@@ -58,33 +56,25 @@
"name": "MissingId",
"type": "subflow",
"workflowId": "handleMissingIdExceptionWorkflow",
- "end": {
- "kind": "default"
- }
+ "end": true
},
{
"name": "MissingItem",
"type": "subflow",
"workflowId": "handleMissingItemExceptionWorkflow",
- "end": {
- "kind": "default"
- }
+ "end": true
},
{
"name": "MissingQuantity",
"type": "subflow",
"workflowId": "handleMissingQuantityExceptionWorkflow",
- "end": {
- "kind": "default"
- }
+ "end": true
},
{
"name": "ApplyOrder",
"type": "subflow",
"workflowId": "applyOrderWorkflowId",
- "end": {
- "kind": "default"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/diagram/src/test/resources/examples/provisionorder.yml b/diagram/src/test/resources/examples/provisionorder.yml
index 2031dd14..44777fe6 100644
--- a/diagram/src/test/resources/examples/provisionorder.yml
+++ b/diagram/src/test/resources/examples/provisionorder.yml
@@ -8,8 +8,7 @@ functions:
states:
- name: ProvisionOrder
type: operation
- start:
- kind: default
+ start: true
actionMode: sequential
actions:
- functionRef:
@@ -33,20 +32,16 @@ states:
- name: MissingId
type: subflow
workflowId: handleMissingIdExceptionWorkflow
- end:
- kind: default
+ end: true
- name: MissingItem
type: subflow
workflowId: handleMissingItemExceptionWorkflow
- end:
- kind: default
+ end: true
- name: MissingQuantity
type: subflow
workflowId: handleMissingQuantityExceptionWorkflow
- end:
- kind: default
+ end: true
- name: ApplyOrder
type: subflow
workflowId: applyOrderWorkflowId
- end:
- kind: default
\ No newline at end of file
+ end: true
\ No newline at end of file
diff --git a/diagram/src/test/resources/examples/sendcloudevent.json b/diagram/src/test/resources/examples/sendcloudevent.json
index 40232d5b..861d90b6 100644
--- a/diagram/src/test/resources/examples/sendcloudevent.json
+++ b/diagram/src/test/resources/examples/sendcloudevent.json
@@ -19,9 +19,7 @@
{
"name": "ProvisionOrdersState",
"type": "foreach",
- "start": {
- "kind": "default"
- },
+ "start": true,
"inputCollection": "{{ $.orders }}",
"iterationParam": "singleorder",
"outputCollection": "{{ $.provisionedOrders }}",
@@ -36,7 +34,6 @@
}
],
"end": {
- "kind": "event",
"produceEvents": [
{
"eventRef": "provisioningCompleteEvent",
diff --git a/diagram/src/test/resources/examples/sendcloudevent.yml b/diagram/src/test/resources/examples/sendcloudevent.yml
index 275f6820..1a3c39d7 100644
--- a/diagram/src/test/resources/examples/sendcloudevent.yml
+++ b/diagram/src/test/resources/examples/sendcloudevent.yml
@@ -12,8 +12,7 @@ functions:
states:
- name: ProvisionOrdersState
type: foreach
- start:
- kind: default
+ start: true
inputCollection: "{{ $.orders }}"
iterationParam: singleorder
outputCollection: "{{ $.provisionedOrders }}"
@@ -23,7 +22,6 @@ states:
parameters:
order: "{{ $.singleorder }}"
end:
- kind: event
produceEvents:
- eventRef: provisioningCompleteEvent
data: "{{ $.provisionedOrders }}"
diff --git a/diagram/src/test/resources/examples/singleeventstate.json b/diagram/src/test/resources/examples/singleeventstate.json
index b26781fe..f343aae3 100644
--- a/diagram/src/test/resources/examples/singleeventstate.json
+++ b/diagram/src/test/resources/examples/singleeventstate.json
@@ -29,8 +29,8 @@
{
"name": "EventState",
"type": "event",
- "start": {"kind":"default"},
- "end": {"kind":"default"},
+ "start": true,
+ "end": true,
"onEvents": [
{
"eventRefs": ["event1", "event2"],
diff --git a/diagram/src/test/resources/examples/singleeventstate.yml b/diagram/src/test/resources/examples/singleeventstate.yml
index 9e47e408..f9e34aee 100644
--- a/diagram/src/test/resources/examples/singleeventstate.yml
+++ b/diagram/src/test/resources/examples/singleeventstate.yml
@@ -19,10 +19,8 @@ events:
states:
- name: EventState
type: event
- start:
- kind: default
- end:
- kind: default
+ start: true
+ end: true
onEvents:
- eventRefs:
- event1
diff --git a/diagram/src/test/resources/examples/singleswitchstate.json b/diagram/src/test/resources/examples/singleswitchstate.json
index e8b4dc4d..82d38193 100644
--- a/diagram/src/test/resources/examples/singleswitchstate.json
+++ b/diagram/src/test/resources/examples/singleswitchstate.json
@@ -7,7 +7,7 @@
{
"name": "SwitchIt",
"type": "switch",
- "start": {"kind":"default"},
+ "start": true,
"dataConditions": [
{
"name": "first",
@@ -26,16 +26,12 @@
{
"name": "third",
"condition": "",
- "end": {
- "kind":"default"
- }
+ "end": true
},
{
"name": "fourth",
"condition": "",
- "end": {
- "kind":"default"
- }
+ "end": true
}
]
},
@@ -43,13 +39,13 @@
"name": "FromFirstCondition",
"type": "delay",
"timeDelay": "PT2M",
- "end": {"kind":"default"}
+ "end": true
},
{
"name": "FromSecondCondition",
"type": "inject",
"data": {},
- "end": {"kind":"default"}
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/diagram/src/test/resources/examples/singleswitchstate.yml b/diagram/src/test/resources/examples/singleswitchstate.yml
index d8a7d273..cb6de3e0 100644
--- a/diagram/src/test/resources/examples/singleswitchstate.yml
+++ b/diagram/src/test/resources/examples/singleswitchstate.yml
@@ -6,8 +6,7 @@ version: '1.0'
states:
- name: SwitchIt
type: switch
- start:
- kind: default
+ start: true
dataConditions:
- name: first
condition: ''
@@ -19,19 +18,15 @@ states:
nextState: FromSecondCondition
- name: third
condition: ''
- end:
- kind: default
+ end: true
- name: fourth
condition: ''
- end:
- kind: default
+ end: true
- name: FromFirstCondition
type: delay
timeDelay: PT2M
- end:
- kind: default
+ end: true
- name: FromSecondCondition
type: inject
data: {}
- end:
- kind: default
+ end: true
diff --git a/diagram/src/test/resources/examples/singleswitchstateeventconditions.json b/diagram/src/test/resources/examples/singleswitchstateeventconditions.json
index bbf95669..47be5732 100644
--- a/diagram/src/test/resources/examples/singleswitchstateeventconditions.json
+++ b/diagram/src/test/resources/examples/singleswitchstateeventconditions.json
@@ -7,7 +7,7 @@
{
"name": "SwitchIt",
"type": "switch",
- "start": {"kind":"default"},
+ "start": true,
"eventConditions": [
{
"name": "first",
@@ -26,16 +26,12 @@
{
"name": "third",
"eventRef": "thirdEvent",
- "end": {
- "kind":"default"
- }
+ "end": true
},
{
"name": "fourth",
"eventRef": "fourthEvent",
- "end": {
- "kind":"default"
- }
+ "end": true
}
]
},
@@ -43,13 +39,13 @@
"name": "FromFirstCondition",
"type": "delay",
"timeDelay": "PT2M",
- "end": {"kind":"default"}
+ "end": true
},
{
"name": "FromSecondCondition",
"type": "inject",
"data": {},
- "end": {"kind":"default"}
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/diagram/src/test/resources/examples/singleswitchstateeventconditions.yml b/diagram/src/test/resources/examples/singleswitchstateeventconditions.yml
index e44fb218..0a3fe653 100644
--- a/diagram/src/test/resources/examples/singleswitchstateeventconditions.yml
+++ b/diagram/src/test/resources/examples/singleswitchstateeventconditions.yml
@@ -6,8 +6,7 @@ version: '1.0'
states:
- name: SwitchIt
type: switch
- start:
- kind: default
+ start: true
eventConditions:
- name: first
eventRef: firstEvent
@@ -19,19 +18,15 @@ states:
nextState: FromSecondCondition
- name: third
eventRef: thirdEvent
- end:
- kind: default
+ end: true
- name: fourth
eventRef: fourthEvent
- end:
- kind: default
+ end: true
- name: FromFirstCondition
type: delay
timeDelay: PT2M
- end:
- kind: default
+ end: true
- name: FromSecondCondition
type: inject
data: {}
- end:
- kind: default
+ end: true
diff --git a/diagram/src/test/resources/examples/solvemathproblems.json b/diagram/src/test/resources/examples/solvemathproblems.json
index a629d6d3..ac51ef5f 100644
--- a/diagram/src/test/resources/examples/solvemathproblems.json
+++ b/diagram/src/test/resources/examples/solvemathproblems.json
@@ -12,9 +12,7 @@
"states":[
{
"name":"Solve",
- "start": {
- "kind": "default"
- },
+ "start": true,
"type":"foreach",
"inputCollection": "{{ $.expressions }}",
"iterationParam": "singleexpression",
@@ -32,9 +30,7 @@
"stateDataFilter": {
"dataOutputPath": "{{ $.results }}"
},
- "end": {
- "kind": "default"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/diagram/src/test/resources/examples/solvemathproblems.yml b/diagram/src/test/resources/examples/solvemathproblems.yml
index 6dcf2481..53ec8aa4 100644
--- a/diagram/src/test/resources/examples/solvemathproblems.yml
+++ b/diagram/src/test/resources/examples/solvemathproblems.yml
@@ -7,8 +7,7 @@ functions:
operation: http://myapis.org/mapthapis.json#solveExpression
states:
- name: Solve
- start:
- kind: default
+ start: true
type: foreach
inputCollection: "{{ $.expressions }}"
iterationParam: singleexpression
@@ -20,5 +19,4 @@ states:
expression: "{{ $.singleexpression }}"
stateDataFilter:
dataOutputPath: "{{ $.results }}"
- end:
- kind: default
\ No newline at end of file
+ end: true
\ No newline at end of file
diff --git a/diagram/src/test/resources/examples/vetappointmentservice.json b/diagram/src/test/resources/examples/vetappointmentservice.json
index 3b567a6d..5432677e 100644
--- a/diagram/src/test/resources/examples/vetappointmentservice.json
+++ b/diagram/src/test/resources/examples/vetappointmentservice.json
@@ -19,9 +19,7 @@
{
"name": "MakeVetAppointmentState",
"type": "operation",
- "start": {
- "kind": "default"
- },
+ "start": true,
"actions": [
{
"name": "MakeAppointmentAction",
@@ -36,9 +34,7 @@
"timeout": "PT15M"
}
],
- "end": {
- "kind": "default"
- }
+ "end": true
}
]
}
\ No newline at end of file
diff --git a/diagram/src/test/resources/examples/vetappointmentservice.yml b/diagram/src/test/resources/examples/vetappointmentservice.yml
index 13f02648..08f7cfce 100644
--- a/diagram/src/test/resources/examples/vetappointmentservice.yml
+++ b/diagram/src/test/resources/examples/vetappointmentservice.yml
@@ -12,8 +12,7 @@ events:
states:
- name: MakeVetAppointmentState
type: operation
- start:
- kind: default
+ start: true
actions:
- name: MakeAppointmentAction
eventRef:
@@ -23,5 +22,4 @@ states:
actionDataFilter:
dataResultsPath: "{{ $.appointmentInfo }}"
timeout: PT15M
- end:
- kind: default
\ No newline at end of file
+ end: true
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 132a2047..b8957da7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -111,8 +111,8 @@
${commons.lang.version}
- com.github.everit-org.json-schema
- org.everit.json.schema
+ com.github.erosb
+ everit-json-schema
${json.schema.validation.version}
@@ -329,11 +329,4 @@
-
-
-
- jitpack.io
- https://jitpack.io
-
-
diff --git a/validation/pom.xml b/validation/pom.xml
index b706f298..59fac3b0 100644
--- a/validation/pom.xml
+++ b/validation/pom.xml
@@ -33,8 +33,8 @@
- com.github.everit-org.json-schema
- org.everit.json.schema
+ com.github.erosb
+ everit-json-schema
@@ -79,4 +79,4 @@
test
-
\ No newline at end of file
+
diff --git a/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java b/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
index 9a947ee3..efa08039 100644
--- a/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
+++ b/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
@@ -58,10 +58,10 @@ public void testFromIncompleteWorkflow() {
.withStates(Arrays.asList(
new DelayState().withName("delayState").withType(DELAY)
.withStart(
- new Start().withKind(Start.Kind.DEFAULT)
+ new Start()
)
.withEnd(
- new End().withKind(End.Kind.DEFAULT)
+ new End()
)
.withTimeDelay("PT1M")
)