Skip to content

Commit

Permalink
EDU-8: Update source code for "Run your first app in Java" and port t…
Browse files Browse the repository at this point in the history
…o Maven (#29)

* EDU-2293: Update source code for "Run your first app in Java" and port to Maven

JIRA: https://temporalio.atlassian.net/browse/EDU-2293

* EDU-2293:  Update source code for "Run your first app in Java"

* Source code updated
* Ported to Maven
* Transaction details are now a single type
* Jackson Deserialization is now supported for the custom type
* Test run and pass
* Worker runs correctly
* Caller app runs correctly

JIRA: https://temporalio.atlassian.net/browse/EDU-2293

* EDU-2293:  Update source code for "Run your first app in Java"

    * Change amount from double to int
    * Added toggles to control the success of the deposit and refund
    * Add compensation mechanism to refund failed deposit

JIRA: https://temporalio.atlassian.net/browse/EDU-2293

* EDU-2293: updated to rethrow exception in Workflow fail case

JIRA: https://temporalio.atlassian.net/browse/EDU-2293
  • Loading branch information
fairlydurable authored May 3, 2024
1 parent 4e1ca12 commit dddb46d
Show file tree
Hide file tree
Showing 26 changed files with 535 additions and 590 deletions.
39 changes: 16 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,28 @@
# Money transfer: Java project template

This project can be used as a template to start building your own Temporal Workflow application.
# Money transfer project: Java

Learn how the pieces of a Temporal application work together.
Follow the [Run your first app tutorial](https://docs.temporal.io/docs/java/run-your-first-app-tutorial) to learn more about Temporal Workflows.

This project uses [Snipsync](https://github.com/temporalio/snipsync) comment wrappers to automatically keep code snippets up to date within our documentation.

## How to use the template

To use the template, either download it as a zip file or click "Use Template" to make a copy of it in your own Github account.
Note: This project uses [Snipsync](https://github.com/temporalio/snipsync) comment wrappers to automatically keep code snippets up to date within our documentation.

## Build the project
## Building, cleaning, and other tasks

Either open the project in IntelliJ, which will automatically build it, or in the project's root directory run:

```
./gradlew build
```
build:
mvn clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=info 2>/dev/null
## Run the Workflow
clean:
mvn clean -q -Dmaven.logging.level=0
First, make sure the [Temporal server](https://docs.temporal.io/docs/server/quick-install) is running.
worker:
mvn compile exec:java -Dexec.mainClass="moneytransferapp.MoneyTransferWorker" -Dorg.slf4j.simpleLogger.defaultLogLevel=warn
To start the Workflow, either run the InitiateMoneyTransfer class from IntelliJ or from the project root run:
run:
mvn compile exec:java -Dexec.mainClass="moneytransferapp.TransferApp" -Dorg.slf4j.simpleLogger.defaultLogLevel=warn
```
./gradlew initiateTransfer
```
serve:
`command -v temporal` server start-dev --log-level=never &
To start the Worker, either run the MoneyTransferWorker class from IntelliJ or from the project root run:

```
./gradlew startWorker --console=plain
stop-server:
pkill temporal
```
40 changes: 0 additions & 40 deletions build.gradle

This file was deleted.

Binary file removed gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 0 additions & 6 deletions gradle/wrapper/gradle-wrapper.properties

This file was deleted.

244 changes: 0 additions & 244 deletions gradlew

This file was deleted.

Loading

0 comments on commit dddb46d

Please sign in to comment.