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

Day 1 part 1.2

parent d19546dc
Branches
No related tags found
No related merge requests found
package io.takima.temporalpractice.bakery;
import io.temporal.client.WorkflowClient;
import io.temporal.client.WorkflowOptions;
import io.temporal.serviceclient.WorkflowServiceStubs;
import io.takima.temporalpractice.bakery.cookie.CookieWorkflow;
import io.takima.temporalpractice.bakery.cookie.BestCookieWorkflow;
public class CookieOrderer {
public static void main(String[] args) {
// Represents the connection to your local cluster. For now, lets keep it simple
WorkflowServiceStubs serviceStub = WorkflowServiceStubs.newLocalServiceStubs();
// Your key for interacting with the Temporal world.
WorkflowClient client = WorkflowClient.newInstance(serviceStub);
WorkflowOptions options = WorkflowOptions.newBuilder()
.setTaskQueue("theOneAndOnlyQueue")
.setWorkflowId("best-cookie")
.build();
CookieWorkflow workflow = client.newWorkflowStub(BestCookieWorkflow.class, options);
workflow.orderCookie(); // Start the Workflow Execution
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment