Skip to content

Java example with UI for running Temporal Workflows (with various failure states and design patterns)

Notifications You must be signed in to change notification settings

rross/temporal-money-transfer-java

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Temporal Money Transfer Demo

Demonstrates a Money Transfer Demo for Temporal using the Java and .NET SDKs

Based on Steve Androulakis' Awesome Money Transfer Demo this demo creates a .NET Worker Version that is compatible with the Java UI Web Application.

Prerequisites

  1. Temporal CLI
  2. Java SDK
  3. .NET SDK

Run locally

To run everything on your own laptop, follow these instructions

Start Temporal CLI

Start the temporal server locally:

temporal server start-dev

Open up the Temporal UI

In a browser, navigate to http://localhost:8233

Start the Java Web UI

Open a new terminal window and run the following commands:

cd app-java
./startlocalwebui.sh

Open the UI in another browser tab

In a browser, navigate to http://localhost:7070/

Start the .NET Worker

Open a new terminal window and run the following commands:

cd app-dotnet/src
dotnet run

You are now ready to use the Demo UI to demonstrate Temporal features.

Run On Temporal Cloud

To run everything on Temporal Cloud, follow these instructions

Open a browser to Temporal Cloud

Open a browser and navigate to Temporal Cloud. Go to your namespace and then workflows.

Set up environment variables

In the root folder of this repository, edit the cloudenvsetup.sh to reflect the information needed for your account. It should look something like this:

#!/bin/bash
export TEMPORAL_ADDRESS=<namespace>.<accountId>.tmprl.cloud:7233
export TEMPORAL_NAMESPACE=<namespace>.<accountId>
export TEMPORAL_CERT_PATH="/path/to/cert"
export TEMPORAL_KEY_PATH="/path/to/key"

After you have made changes and saved it, you can continue.

Start the Java UI

cd app-java
./startcloudwebui.sh

Note that the startcloudwebui.sh file uses the environment variables in the cloudenvsetup.sh file.

Open the UI in another browser tab

In a browser, navigate to http://localhost:7070/

Start the .NET Worker

Open a new terminal window and run the following commands:

cd app-dotnet/src
source ../cloudenvsetup.sh
dotnet run

You are now ready to use the Demo UI to demonstrate Temporal features.

About

Java example with UI for running Temporal Workflows (with various failure states and design patterns)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 83.9%
  • Java 10.2%
  • HTML 3.3%
  • C# 2.2%
  • Other 0.4%