{"id":24552980,"url":"https://github.com/npdeehan/genericerrorandreturn","last_synced_at":"2025-09-16T09:57:48.407Z","repository":{"id":90222830,"uuid":"226306597","full_name":"NPDeehan/GenericErrorAndReturn","owner":"NPDeehan","description":"Showing how to throw an error anywhere in the process and then Return back afterwards","archived":false,"fork":false,"pushed_at":"2019-12-06T10:53:42.000Z","size":109,"stargazers_count":9,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T23:16:59.030Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NPDeehan.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":"2019-12-06T10:43:17.000Z","updated_at":"2024-05-08T21:02:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"989b1e17-6805-400e-b0ba-76cecfa5aebc","html_url":"https://github.com/NPDeehan/GenericErrorAndReturn","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NPDeehan/GenericErrorAndReturn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NPDeehan%2FGenericErrorAndReturn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NPDeehan%2FGenericErrorAndReturn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NPDeehan%2FGenericErrorAndReturn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NPDeehan%2FGenericErrorAndReturn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NPDeehan","download_url":"https://codeload.github.com/NPDeehan/GenericErrorAndReturn/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NPDeehan%2FGenericErrorAndReturn/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275399622,"owners_count":25457779,"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-16T02:00:10.229Z","response_time":65,"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-01-23T01:33:47.011Z","updated_at":"2025-09-16T09:57:48.364Z","avatar_url":"https://github.com/NPDeehan.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Generic Error And Return\n\nThis is an example in spring boot of how you can have a process throw an error at some point in the process. Then have a generic event subprocess deal with the error before returning to where the process left off. \n\n![process-model]\n \n you can start the process and each service will throw an error randomly. The error is thrown and the current activity id is added as a message to the error event. \n \n ```java \nthrow new BpmnError(\"GenericError\", delegateExecution.getCurrentActivityId());\n ```\n \n This is then stored in a variable that is accessed in order make the return. Which puts the token back the end of the symbol that threw the error\n \n ````java\n delegateExecution.getProcessEngineServices().getRuntimeService()\n                    .createProcessInstanceModification(delegateExecution.getProcessInstanceId())\n                    .startAfterActivity(errorTaskId)\n                    .execute();  \n````\n \n[process-model]: ./src/main/resources/genericErrorAndReturn.png \"Order Sorter Process Model\"","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpdeehan%2Fgenericerrorandreturn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnpdeehan%2Fgenericerrorandreturn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpdeehan%2Fgenericerrorandreturn/lists"}