Files
tasks/service/history/workflow/state_machine_definition.go
zeekay 5a601d081b rebrand: go.temporal.io/server -> github.com/hanzoai/tasks
Full module path rebrand from Temporal to Hanzo Tasks:
- go.mod module: github.com/hanzoai/tasks
- All internal Go imports updated (1906 files)
- cmd/server renamed to cmd/tasksd
- Binary name: tasksd (was temporal-server)
- Docker images: hanzoai/tasks (was temporalio/server)
- README rewritten with Hanzo Tasks branding
- LLM.md created with integration notes
- Makefile, goreleaser, CI workflows updated
- go.temporal.io/sdk and go.temporal.io/api imports preserved (separate repos)

Fork of Temporal.io (MIT license).
2026-03-19 10:36:40 -07:00

38 lines
1.1 KiB
Go

package workflow
import (
"go.temporal.io/api/serviceerror"
"github.com/hanzoai/tasks/service/history/hsm"
)
// TransactionPolicy indicates whether a mutable state transaction is happening for an active namespace or passive namespace.
const (
// Mutable state is a top-level state machine in the state machines framework.
StateMachineType = "workflow.MutableState"
)
type stateMachineDefinition struct{}
// TODO: Remove this implementation once transition history is fully implemented.
func (s stateMachineDefinition) CompareState(any, any) (int, error) {
return 0, serviceerror.NewUnimplemented("CompareState not implemented for workflow mutable state")
}
func (stateMachineDefinition) Deserialize([]byte) (any, error) {
return nil, serviceerror.NewUnimplemented("workflow mutable state persistence is not supported in the HSM framework")
}
// Serialize is a noop as Deserialize is not supported.
func (stateMachineDefinition) Serialize(any) ([]byte, error) {
return nil, nil
}
func (stateMachineDefinition) Type() string {
return StateMachineType
}
func RegisterStateMachine(reg *hsm.Registry) error {
return reg.RegisterMachine(stateMachineDefinition{})
}