{"id":13542742,"url":"https://github.com/tsurdilo/swtemporal","last_synced_at":"2025-04-28T18:08:30.211Z","repository":{"id":138211273,"uuid":"410703572","full_name":"tsurdilo/swtemporal","owner":"tsurdilo","description":"Serverless Workflow web editor and diagram generation and execution via Temporal","archived":false,"fork":false,"pushed_at":"2023-09-28T22:20:03.000Z","size":6012,"stargazers_count":86,"open_issues_count":4,"forks_count":17,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-28T18:08:23.566Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tsurdilo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-27T01:19:13.000Z","updated_at":"2024-12-23T00:04:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"d243a2a5-0aeb-4db0-bef0-0a1ad7d93c44","html_url":"https://github.com/tsurdilo/swtemporal","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsurdilo%2Fswtemporal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsurdilo%2Fswtemporal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsurdilo%2Fswtemporal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsurdilo%2Fswtemporal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsurdilo","download_url":"https://codeload.github.com/tsurdilo/swtemporal/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251362152,"owners_count":21577403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T11:00:16.755Z","updated_at":"2025-04-28T18:08:30.188Z","avatar_url":"https://github.com/tsurdilo.png","language":"JavaScript","funding_links":[],"categories":["Libraries"],"sub_categories":[],"readme":"# Serverless Workflow Demo - Temporal execution\n\nThis demo shows the integration of [Serverless Workflow](https://serverlessworkflow.io/)\nwith [Temporal](https://temporal.io/)\n\nIt also shows the Serverless Workflow project experience,\nwhere you can easily build an online editor, visualization,\nform-based workflow data inputs and ability to start \nworkflow execution and wait for results.\n\nNote: this is a demo and not intended for production use.\nThe demo integration does not support 100% of the Serverless Workflow\nspecification, but the intent is that it does soon.\n\nNote: Serverless Workflow specification supports standards-based\nfunction executions, meaning it supports standards such as OpenApi,\nAsyncApi, GraphQL, etc. For the integration SW functions align\nto invocations of Temporal Activities. Temporal activities \nare functions where you can add your own code. For this demo\nwe did not implement (yet) actual invocation of 3rd party services.\nCurrently activities just simulate that work but irl that code\ncan be auto-generated using generators from for example OpenApi \nservice definitions.\n\n## About\n\nDemo uses the [Temporal Java SDK](https://github.com/temporalio/sdk-java) to define a dynamic workflow capable\nof executing instructions defined in the [Serverless Workflow DSL](https://github.com/serverlessworkflow/specification/tree/main/schema).\nFor that it uses the [Serverless Workflow Java SDK](https://github.com/serverlessworkflow/sdk-java) for validating and \nparsing the JSON (or yaml can be used too) DSL into an object model before interpreting it.\n\nNote that the same type of demo can be produced \nfor \nGolang - [Temporal Go SDK](https://github.com/temporalio/sdk-go), [Serverless Workflow Go SDK](https://github.com/serverlessworkflow/sdk-go)\nTypeScript - [Temporal Typescript SDK](https://github.com/temporalio/sdk-node), [Serverless Workflow TypeScript SDK](https://github.com/serverlessworkflow/sdk-typescript)\n\nIf you would like to help with this one, or the other mentioned \nintegrations let me know. \n\nThis demo runs on [Quarkus](https://quarkus.io/).\n\nThis demo is a work in progress and will be improved over time. The integration \ncan definitely be improved, especially on the passing data between the UI, Quarkus app and Temporal. \n\n## Start the demo app\n\n### 1. Start Temporal Server on Docker\n\n    git clone https://github.com/temporalio/docker-compose.git\n    cd  docker-compose\n    docker-compose -f docker-compose-cas-es.yml up\n\n### 2. Start the demo app (Quarkus dev mode)\n\n    mvn clean install quarkus:dev\n\n## Interact with the demo\n\n### 1. Access the demo\n\n    http://localhost:8080\n\nThe top-part of the demo shows the Serverless Workflow online editor\nand the dynamic graphical workflow representation. Note that the \ngraphical generation is done via the Serverless Workflow [Typescript SDK](https://github.com/serverlessworkflow/sdk-typescript)\nand the MermaidJS library.\n\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"docs/demoimg1.png\" width=\"650px\"/\u003e\n\u003c/p\u003e\n\nThe editor supports auto-completion and validation\nusing the [Serverless Workflow workflow Json Schema definition](https://github.com/serverlessworkflow/specification/blob/main/schema/workflow.json).\n\nIf you make some\nchanges to your workflow press the \"Generate workflow diagram\"\nbutton to re-generate the workflow image to reflect your\nchanges/updates.\n\n### 2. View/Edit the Customer Application workflow\n\nCheck out the Customer Application workflow.\nNote the \"MakeApplicationDecision\" switch state, here we use \nJsonPath (default for Serverless Workflow is jq) to define two conditions\n(depending on the customers provided age). \nYou can play with the age numbers if you want to see different workflow\nexecution results.\n\n### 3. Enter workflow data input\n\nOur workflow expects some data inputs, namely the customer information\nthat is used during workflow execution.\nScroll down to the bottom part of the page.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"docs/demoimg2.png\" width=\"650px\"/\u003e\n\u003c/p\u003e\n\nEnter customer first and last name, age and some purchase request,\nfor example \"purchase a laptop\".\n\nPress the \"Run Workflow\" button to start workflow execution.\n\n### 4. Check the Temporal Web UI\n\nCheck the Temporal Web UI by navigating to:\n\n    http://localhost:8088\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"docs/demoimg3.png\" width=\"650px\"/\u003e\n\u003c/p\u003e\n\nYou will see your \"TemporalServerlessWorkflow\" workflow was executed\ncompleted. You can click on the workflow Run Id link to see execution details.\n\n### 5. Check the workflow execution results\n\nBack on our app page (localhost:8080)\n\nlook at the \"Decision (workflow output)\" section. You should see\nthe final decision (\"Approved\" or \"Denied\"), in the \"Decision\" text\nbox and the whole workflow out put JSON in the \"Workflow Result\"\ntextbox.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"docs/demoimg4.png\" width=\"650px\"/\u003e\n\u003c/p\u003e\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsurdilo%2Fswtemporal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsurdilo%2Fswtemporal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsurdilo%2Fswtemporal/lists"}