{"id":45677704,"url":"https://github.com/conductor-sdk/typescript-workers-patients-example","last_synced_at":"2026-02-24T13:07:55.023Z","repository":{"id":208709254,"uuid":"720241011","full_name":"conductor-sdk/typescript-workers-patients-example","owner":"conductor-sdk","description":"typescript-workers-patients-example","archived":false,"fork":false,"pushed_at":"2023-11-22T19:43:38.000Z","size":91,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2023-11-22T22:27:54.965Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/conductor-sdk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-11-17T22:39:36.000Z","updated_at":"2023-11-22T22:27:58.251Z","dependencies_parsed_at":"2023-11-22T22:37:59.122Z","dependency_job_id":null,"html_url":"https://github.com/conductor-sdk/typescript-workers-patients-example","commit_stats":null,"previous_names":["conductor-sdk/typescript-workers-patients-example"],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/conductor-sdk/typescript-workers-patients-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conductor-sdk%2Ftypescript-workers-patients-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conductor-sdk%2Ftypescript-workers-patients-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conductor-sdk%2Ftypescript-workers-patients-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conductor-sdk%2Ftypescript-workers-patients-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/conductor-sdk","download_url":"https://codeload.github.com/conductor-sdk/typescript-workers-patients-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conductor-sdk%2Ftypescript-workers-patients-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29783615,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T10:45:18.109Z","status":"ssl_error","status_checked_at":"2026-02-24T10:45:09.911Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2026-02-24T13:07:54.251Z","updated_at":"2026-02-24T13:07:55.017Z","avatar_url":"https://github.com/conductor-sdk.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# typescript-workers-patients-example\n### Set environment variables\n```\nKEY\nSECRET\nCONDUCTOR_SERVER_URL\n```\nMake sure your application has permission to execute workflow,\npoll and execute tasks. \u003cbr\u003e\nThe quickest way to set this up is to grant Unrestricted Worker,\nWorkflow Manager roles.\n\n### Database setup\n\n#### Native Setup\n\nWorkflow execution command is at the end of this document. Example input for the workflow execution specifies local postgres database with:\n* username: _patients_\n* password: _patients_\n* database: _patients_\n* no SSL\n* table `patients1` (meant to serve as local) in `public` schema\n* table `patients2` (meant to serve as external) in `public` schema\n\nRun following commands from the command line:\n```\ncreatedb patients\npsql patients\n```\nYou should be logged into the test database via psql.\n\n### Table setup for successful run:\nPaste the following commands to setup the tables from the psql shell.\n```\ncreate table patients1 (\n    first_name text,\n    last_name text,\n    dob date,\n    family_doctor_assigned bool\n);\n\ncreate table patients2 (\n    first_name text,\n    last_name text,\n    dob date,\n    family_doctor_assigned bool\n);\nINSERT INTO patients1 VALUES ('John', 'Smith', '1983-05-21'::date, false);\nINSERT INTO patients2 VALUES ('John', 'Smith', '1983-05-21'::date, true);\n```\nor\n\n#### Docker Setup\n\n`docker-compose up` will create a container with the database in it and also initialize it.\n\n### Run the Application\nNavigate to the root of the cloned repository and run the following command\n\n```\nyarn \u0026\u0026\nts-node src/main.ts\n```\n\nor for node\n```\nyarn \u0026\u0026\nyarn build \u0026\u0026\nnode dist/main.js\n```\n\n### Workflow Setup\nMake sure this workflow definition is added to your Orkes instance if not testing on the Playground - https://play.orkes.io/workflowDef/PatientWorkflow/1.\n\n### Trigger the workflow\n\n```\n curl -X POST localhost:3000/ --data '{\"localTable\":\"patients1\",\"externalTable\":\"patients2\",\"dob\":\"1983-05-21\",\"LocalDBConnectionString\":\"postgres://patients:patients@localhost:5432/patients\",\"last_name\":\"Smith\",\"first_name\":\"John\",\"ExternalDBConnectionString\":\"postgres://patients:patients@localhost:5432/patients\"}' -H \"Content-Type: application/json\"\n```\n\nThe above command should result in a successfult workflow execution of the PatientWorkflow similar to https://play.orkes.io/execution/ffe5f01d-83fb-11ee-b9e2-3e6b0496d0cf?tab=diagram.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconductor-sdk%2Ftypescript-workers-patients-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconductor-sdk%2Ftypescript-workers-patients-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconductor-sdk%2Ftypescript-workers-patients-example/lists"}