{"repo":"vhidvz/workflow-template","free":true,"listed":false,"github":"https://github.com/vhidvz/workflow-template","clone":"git clone https://github.com/vhidvz/workflow-template.git","description":"This repository has an example of creating a simple workflow microservice with NestJS and WorkflowJS.","language":"TypeScript","stars":19,"topics":["template","nestjs","workflow"],"license":"MIT","category":"workflow-automation","readme_excerpt":"Simple Workflow Microservice This repository has an example of creating a simple workflow microservice with NestJS and WorkflowJS. Diagram Up and Running First of all need to clone this repository by following command. Then install the node dependencies with command cd workflow-template && npm ci . after that, install the MongoDB community server by the following command in your terminal. To start and run the project type npm run start , that's it... Usage and Dangling Swagger UI is also exists and running on [http://[::1]:3000/api](http://[::1]:3000/api) if you need to understand better please look at the src/ app.workflow.ts file. Scenario 1: Requested Service Not Approved Step 1 Create a flow by posting a request with plain data Hi . Response: base on the flow definition exclusive gateway approval gateway cannot automatically done, therefor workflow will pauses at this point. Step 2 Find a flow by mongo id with the following GET request. Response: it must be same as the previous result. Step 3 Resume the flow by posting a PATCH request with no response by user. Response: because of some task is a user task at this state based on diagram we need to pause flow, therefor another request needed to complete this task. Step 4 Finishing flow by resuming task some task . Response: status of context is terminated and could not resume again. Scenario 2: Requested Service Approved Step 1 Create a flow by posting a request with plain data Hi . Response: would like be previous scenario","default_branch":null,"files":null,"tree":[],"storefront":"/r/vhidvz","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/vhidvz/workflow-template/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}