MCPcopy Create free account
hub / github.com/ScrapeGraphAI/scrapecraft / add_transition

Method add_transition

backend/app/models/workflow.py:105–116  ·  view source on GitHub ↗

Add a phase transition to history.

(self, to_phase: WorkflowPhase, reason: str = "", triggered_by: str = "system")

Source from the content-addressed store, hash-verified

103 version: int = 1
104
105 def add_transition(self, to_phase: WorkflowPhase, reason: str = "", triggered_by: str = "system"):
106 """Add a phase transition to history."""
107 transition = WorkflowTransition(
108 from_phase=self.phase,
109 to_phase=to_phase,
110 reason=reason,
111 triggered_by=triggered_by
112 )
113 self.phase_transitions.append(transition)
114 self.phase = to_phase
115 self.updated_at = datetime.utcnow()
116 self.last_modified_by = triggered_by
117
118 def add_user_modification(self, field: str, old_value: Any, new_value: Any, user: str = "user"):
119 """Track user modifications."""

Callers 7

update_urlsMethod · 0.80
update_schemaMethod · 0.80
approve_actionMethod · 0.80
manual_transitionFunction · 0.80

Calls 1

WorkflowTransitionClass · 0.70

Tested by

no test coverage detected