Skip to content

Latest commit

 

History

History
83 lines (53 loc) · 4.93 KB

README.md

File metadata and controls

83 lines (53 loc) · 4.93 KB

iwf-java-samples

Samples for iWF Java SDK that runs against iWF server.

We also have smaller code snippets (also known as mini demos) that demonstrate how to utilize iWF to perform a minimum funcion.

Setup

  1. Start a iWF server following the instructions
  2. Run this project by using gradle task bootRun.

_Note that by default this project will listen on 8803 port

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.

A common use case that is almost everywhere -- new user sign-up/register a new account in a website/system. E.g. Amazon/Linkedin/Google/etc...

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

See Engagement for how to build an jobSeeker engagement workflow.

  • 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

See JobPost for how to build an JobPost system like Indeed.com

Support typical CRUD operations:

  • Create a job with tile, description and notes
  • Read a job
  • Update a job
  • Delete a job

And also

  • Search for jobs using full-text search
  • Update will trigger a background action to update external system with eventual consistency

Subscription workflow

See Subscription with unit tests for the use case also described in:

In additional, iWF provides "Auto-ContinueAsNew feature to allow running the workflow infinitely

Candidate Shortlisting Use Case

See ShortlistCandidates for how to build a workflow to automatically establish connections with shortlisted candidates on behalf of an employer.

  • Design a workflow as long-term storage: leveraging the attributes of iWF to retain the employer opt-in information in EmployerOptInWorkflow.
  • Retrieve the attributes of another workflow from within a different workflow: checking the employer's opt-in status stored in the EmployerOptInWorkflow when making a decision on whether to automatically contact shortlisted candidates for that employer in the ShortlistWorkflow.