Journey Academy · 5 / 5
Finish a coherent handoff
Combine context, answers, typed readiness data and conditional guidance into one process.
YOUR TASK
Make this happen
Add a schemaForm readiness step with outputKey readiness. Require a nonnegative integer quantity and keep the earlier answers, job input and urgent guidance.
Keep the working capabilities from the previous lesson and connect the new pieces to the same solution.
Check the complete solution, then inspect any unmet requirements.
This step starts with the earlier solution and one new challenge. Each lesson keeps its own draft.
Read the starter files
main.cococo
journey_document "handoff" {
id = "job-handoff"
title = "Job handoff"
icon = "job"
estimatedMinutes = 3
summary = "Prepare a clear handoff for the next operator."
inputs = [journey_input.job]
steps = [journey_info.start, journey_form.details, journey_info.attention, journey_done.finish]
}
stages.cococo
journey_info "start" {
kind = "info"
id = "start"
title = "Before you hand over"
body = "Check the current job and prepare your handoff notes."
checklist = ["Know which job you are handing over."]
}
journey_done "finish" {
kind = "done"
id = "finish"
title = "Handoff prepared"
body = "Prepared by {{ $.state.operator }}: {{ $.state.notes }}"
}
answers.cococo
journey_field "operator" {
key = "operator"
kind = "text"
label = "Your name"
required = true
}
journey_field "notes" {
key = "notes"
kind = "multiline"
label = "Handoff notes"
required = true
}
journey_form "details" {
kind = "form"
id = "details"
title = "Prepare the handoff"
fields = [journey_field.operator, journey_field.notes, journey_field.urgent]
}
journey_field "urgent" {
key = "urgent"
kind = "toggle"
label = "Needs immediate attention"
}
context.cococo
journey_input "job" {
key = "job"
kind = "resource"
resourceType = "job"
label = "Job to hand over"
required = true
}
conditions.cococo
journey_eq "urgent" {
kind = "eq"
path = "$.state.urgent"
type = "boolean"
value = "true"
}
journey_when "urgent" {
conditions = [journey_eq.urgent]
}
journey_info "attention" {
kind = "info"
id = "attention"
title = "Tell the next operator directly"
body = "Contact the next operator now; the handoff note is not an alert."
condition = journey_when.urgent
}
checks.cococo
journey_schema_form "checks" {
kind = "schemaForm"
id = "checks"
# TODO: add title — see the task above.
# TODO: add outputKey — see the task above.
# TODO: add schema — see the task above.
}
Supplied supporting files
Reference: journeys · getting-startedjourneys · bindingsjourneys · formsjourneys · schema-formsjourneys · conditionsjourneys · completionjourneys · go-live