An open API service indexing awesome lists of open source software.

https://github.com/indeedeng/iwf-golang-samples

samples for iWF-Golang-SDK
https://github.com/indeedeng/iwf-golang-samples

Last synced: about 1 year ago
JSON representation

samples for iWF-Golang-SDK

Awesome Lists containing this project

README

          

# iwf-golang-samples

Samples for [iWF Golang SDK](https://github.com/indeedeng/iwf-golang-sdk) that runs
against [iWF server](https://github.com/indeedeng/iwf)

## Setup

1. Start a iWF server following the [instructions](https://github.com/indeedeng/iwf#how-to-run-this-server)
2. Run this project
* To build the binary, run `make bins`
* To run the sample service: run `./iwf-samples start`

_Note that by default this project will listen on 8803 port(default worker port for iWF Golang SDK)_

## Product Use case samples

### [Money Transfer Workflow/SAGA Patten](./workflows/moneytransfer)
This example shows how to transfer money from one account to another account.
The transfer involves multiple steps. When any step fails, the whole transfer is canceled with some compensation steps.

### [Microservice orchestration](./workflows/microservices)
This is the code that is [shown in iWF server as an example of microservice orchestration](https://github.com/indeedeng/iwf#example-microservice-orchestration).

### [JobSeeker Engagement workflow](./workflows/engagement)
Screenshot 2023-04-21 at 8 53 25 AM
This engagement workflow is for:

* An engagement is initiated by an employer to reach out to a jobSeeker(via email/SMS/etc)
* The jobSeeker could respond with decline or accept
* If jobSeeker doesn't respond, it will get reminder
* An engagement can change from declined to accepted, but cannot change from accepted to declined

### [Subscription](./workflows/subscription) workflow

This [Subscription workflow](https://github.com/indeedeng/iwf-golang-samples/tree/main/workflows/subscription) (with unit tests) is to match the use case described in
* [Temporal TypeScript tutorials](https://learn.temporal.io/tutorials/typescript/subscriptions/)
* [Temporal go sample](https://github.com/temporalio/subscription-workflow-project-template-go)
* [Temporal Java Sample](https://github.com/temporalio/subscription-workflow-project-template-java)
* [Cadence Java example](https://cadenceworkflow.io/docs/concepts/workflows/#example)

### [Task orchestration with polling & signal](./workflows/polling)
Orchestrating three services:
* Task A: receive a signal when completing
* Task B: receive a signal when completing
* Task C: polling until completion