Skip to content
Snippets Groups Projects
Commit 66ce16e1 authored by Damien MARCHAT's avatar Damien MARCHAT
Browse files

Day 1 part 1.3

parent 04f81c67
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,8 @@ import io.temporal.client.WorkflowOptions;
import io.temporal.serviceclient.WorkflowServiceStubs;
import io.takima.temporalpractice.bakery.cookie.CookieWorkflow;
import io.takima.temporalpractice.bakery.cookie.BestCookieWorkflow;
import io.temporal.worker.Worker;
import io.temporal.worker.WorkerFactory;
public class CookieOrderer {
public static void main(String[] args) {
......@@ -18,7 +20,15 @@ public class CookieOrderer {
.setWorkflowId("best-cookie")
.build();
CookieWorkflow workflow = client.newWorkflowStub(BestCookieWorkflow.class, options);
WorkerFactory factory = WorkerFactory.newInstance(client);
Worker worker = factory.newWorker("theOneAndOnlyQueue");
worker.registerWorkflowImplementationTypes(BestCookieWorkflow.class);
factory.start();
CookieWorkflow workflow = client.newWorkflowStub(CookieWorkflow.class, options);
workflow.orderCookie(); // Start the Workflow Execution
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment