Skip to content

Commit

Permalink
Use the new workflow api in food ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
slinkydeveloper committed Feb 12, 2024
1 parent 48d3139 commit 69c801b
Show file tree
Hide file tree
Showing 25 changed files with 346 additions and 438 deletions.
11 changes: 7 additions & 4 deletions java/food-ordering/app/restate-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ plugins {

repositories {
mavenCentral()
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
}

val restateVersion = "0.7.0"
val restateVersion = "0.8.0-SNAPSHOT"

dependencies {
// Restate SDK
annotationProcessor("dev.restate:sdk-api-gen:$restateVersion")
implementation("dev.restate:sdk-api:$restateVersion")
implementation("dev.restate:sdk-workflow-api:$restateVersion")
implementation("dev.restate:sdk-http-vertx:$restateVersion")
// To use Jackson to read/write state entries (optional)
implementation("dev.restate:sdk-serde-jackson:$restateVersion")
Expand All @@ -29,7 +32,7 @@ dependencies {
compileOnly("org.apache.tomcat:annotations-api:6.0.53")

//Kafka
implementation("org.apache.kafka:kafka-clients:3.0.0")
implementation("org.apache.kafka:kafka-clients:3.6.1")

// Logging (optional)
implementation("org.apache.logging.log4j:log4j-core:2.20.0")
Expand Down Expand Up @@ -63,11 +66,11 @@ protobuf {

// Set main class
application {
mainClass.set("dev.restate.sdk.examples.AppMain")
mainClass.set("examples.order.AppMain")
}


jib {
to.image = "restate-app:0.0.1"
container.mainClass = "dev.restate.sdk.examples.AppMain"
container.mainClass = "examples.order.AppMain"
}

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,16 @@
* https://github.com/restatedev/examples/
*/

package dev.restate.sdk.examples;
package examples.order;

import dev.restate.sdk.examples.external.DriverMobileAppSimulator;
import examples.order.external.DriverMobileAppSimulator;
import dev.restate.sdk.http.vertx.RestateHttpEndpointBuilder;

public class AppMain {
public static void main(String[] args) {
RestateHttpEndpointBuilder.builder()
.withService(new OrderWorkflow())
.with(new OrderWorkflow())
.withService(new OrderStatusService())
.withService(new DeliveryManager())
.withService(new DriverDeliveryMatcher())
.withService(new DriverDigitalTwin())
.withService(new DriverMobileAppSimulator()) // external mobile app on driver's phone
Expand Down
Loading

0 comments on commit 69c801b

Please sign in to comment.