temporalio / temporalio/features

Add ability to complete workflow from any line

Open
#650 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
32
Forks
28
Avg merge
1d 9h
Merged PRs (30d)
7

Description

Is your feature request related to a problem? Please describe.
Currently the only way to complete or fail a workflow is through completing (or throwing exception) from the method annotated with @WorkflowMethod. Sometimes it is convinient to complete or fail workflow from some other function or even thread.

Describe the solution you'd like
An API to complete workflow from any place. Strawman:

Workflow.complete(result);
Workflow.fail(Exception); 

Describe alternatives you've considered
Do not introduce this API and rely on completion of main workflow method.l

Additional context
This feature is based on a customer request.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the workflow completion path centered on the method annotated with @WorkflowMethod. Compare that path with the proposed Workflow.complete(result) and Workflow.fail(Exception) entry points, and define completion or failure from another function or thread as the done condition.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.