Description
Generate a form for a selected task and present it in the side panel. The form shall be generated directly from the filtered schema and populated with the selected values retrieved from the task in the model.
The goal is to start with the setTask definition and, in subsequent tasks, extend it to other task definitions. Some tasks have a deep and complex structure that may require custom code to handle them. To keep the scope small and easy to validate, this work is restricted to setTask.
Motivation
The blueprint for building the model comes from the schema, which also provides the full task definition — including validation rules and field descriptions.
To properly build a dynamic form, it is necessary to consume the task definitions from the schema and then populate it with the task instance values from the current model state.
Proposed Implementation
current workflow model
│
▼
Task population: resolve selected node → task instance
│
▼
workflowSchema ($defs)
│
▼
Stage 1: extract and prepare the definition
│
▼
Stage 2: resolve node type → definition name
│
▼
Stage 3: walk schema → FormFieldDescriptor[]
│
▼
Stage 4: render form with react-hook-form
Refer to the spike for more detailed information and references for this implementation.
Definition of Done
Description
Generate a form for a selected task and present it in the side panel. The form shall be generated directly from the filtered schema and populated with the selected values retrieved from the task in the model.
The goal is to start with the
setTaskdefinition and, in subsequent tasks, extend it to other task definitions. Some tasks have a deep and complex structure that may require custom code to handle them. To keep the scope small and easy to validate, this work is restricted tosetTask.Motivation
The blueprint for building the model comes from the schema, which also provides the full task definition — including validation rules and field descriptions.
To properly build a dynamic form, it is necessary to consume the task definitions from the schema and then populate it with the task instance values from the current model state.
Proposed Implementation
Refer to the spike for more detailed information and references for this implementation.
Definition of Done