Skip to content

Latest commit

 

History

History
47 lines (33 loc) · 2.34 KB

README.md

File metadata and controls

47 lines (33 loc) · 2.34 KB

iwf-golang-samples

Samples for iWF Golang SDK that runs against iWF server

Setup

  1. Start a iWF server following the instructions
  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

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.

This is the code that is shown in iWF server as an example of microservice orchestration.

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 workflow

This Subscription workflow (with unit tests) is to match the use case described in

Orchestrating three services:

  • Task A: receive a signal when completing
  • Task B: receive a signal when completing
  • Task C: polling until completion