{"id":28506519,"url":"https://github.com/temporalio/subscription-workflow-project-template-java","last_synced_at":"2025-10-29T11:09:56.061Z","repository":{"id":40519283,"uuid":"356334096","full_name":"temporalio/subscription-workflow-project-template-java","owner":"temporalio","description":"Subscription workflow project template for Java","archived":false,"fork":false,"pushed_at":"2025-07-03T02:01:09.000Z","size":97,"stargazers_count":5,"open_issues_count":1,"forks_count":8,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-07-03T03:19:33.423Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/temporalio.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-04-09T16:27:33.000Z","updated_at":"2025-07-03T02:01:12.000Z","dependencies_parsed_at":"2023-12-31T01:33:17.985Z","dependency_job_id":"ec40b7c3-e910-4e8e-9742-caf038be18a4","html_url":"https://github.com/temporalio/subscription-workflow-project-template-java","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/temporalio/subscription-workflow-project-template-java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temporalio%2Fsubscription-workflow-project-template-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temporalio%2Fsubscription-workflow-project-template-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temporalio%2Fsubscription-workflow-project-template-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temporalio%2Fsubscription-workflow-project-template-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/temporalio","download_url":"https://codeload.github.com/temporalio/subscription-workflow-project-template-java/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temporalio%2Fsubscription-workflow-project-template-java/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273100039,"owners_count":25045697,"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","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2025-06-08T20:05:53.966Z","updated_at":"2025-10-29T11:09:55.957Z","avatar_url":"https://github.com/temporalio.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Subscription Workflow Project Template in Java\n\u003c!-- @@@SNIPSTART subscription-java-readme --\u003e\nThis project template illustrates the design pattern for subscription style business logic.\n\n**Setup**\n\nBuild the project:\n\n```bash\n./gradlew build\n```\n\nRun the Temporal Server in another terminal:\n\n```bash\ngit clone https://github.com/temporalio/docker-compose.git\ncd docker-compose\ndocker-compose up\n```\n\n**Start**\n\nStart the Workflow Executions:\n\n```bash\n./gradlew -q execute -PmainClass=io.temporal.sample.starter.SubscriptionWorkflowStarter\n```\n\nThis will start Workflow Executions for 5 customers with the following Ids:\n\n```text\nId-0\nId-1\nId-2\nId-3\nId-4\n```\n\n**Get billing info**\n\nYou can Query the Workflow Executions and get the billing information of a specific customer.\nPass in an Id of an existing subscription customer (e.g. \"Id-0\").\n\n```bash\n./gradlew -q execute -PmainClass=io.temporal.sample.starter.QueryBillingInfo --args=\"Id-0\"\n```\n\n**Update billing**\n\nYou can send a Signal a Workflow Execution to update the billing cycle cost for a specific customer.\nPass in the customer Id and the amount (e.g. \"Id-0 300\").\n\n```bash\n./gradlew -q execute -PmainClass=io.temporal.sample.starter.UpdateBillingCycleCharge --args=\"Id-0 300\"\n```\n\n**Cancel subscription**\n\nYou can send a Signal to Workflow Execution to cancel the subscription for a specific customer.\nPass in the customer Id (e.g. \"Id-0\").\n\n```bash\n./gradlew -q execute -PmainClass=io.temporal.sample.starter.CancelSubscription --args=\"Id-0\"\n```\n\u003c!-- @@@SNIPEND --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftemporalio%2Fsubscription-workflow-project-template-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftemporalio%2Fsubscription-workflow-project-template-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftemporalio%2Fsubscription-workflow-project-template-java/lists"}