Once a client has a valid Websocket connection to the server, they should be able to retrieve details of a flow and step for a person.
Goal*
A client should be able to provide a Person.id and a FlowInstance.id or FlowInstance.identifier and will receive a response that indicates the state of the flow for that person.
A client should be able to provide a Person.id and a StepSchema.identifier and will receive a response that indicates the state of the step for that person.
Implementation Details*
Calls to this endpoint should be idempotent. Calling this endpoint multiple times with the same parameters should always result in the same outcome.
// Example request when requesting the state of a flow
{
"action" "flow_status",
"request_id" : Date.now(),
"data": {
"person_id": "string",
"flow_schema_identifier": "string",
"flow_instance_id": "string"
}
}
// Example response when requesting the state of a flow
{
"request_id": 1519211809934,
"errors": [],
"status": 200,
"data": {
"flow_instance_id": "string",
"flow_schema_identifier": "string",
"state": "string (active, inactive, completed, exited)",
"active_steps": [
{
"step_instance_id": "string",
"step_schema_identifier": "string",
"state": "string (active, inactive, completed)"
}
]
}
// Example request when requesting the state of a step
{
"action": "step_status",
"request_id" : Date.now(),
"data": {
"person_id": "string",
"flow_instance_id": "string",
"step_schema_identifier": "string"
}
}
// Example response when requesting the state of a step
{
"request_id": 1519211809934,
"errors": [],
"status": 200,
"data": {
"step_instance_id": "string",
"step_schema_identifier": "string",
"state": "string (active, inactive, completed)"
}
}
Acceptance Criteria*
Test cases that
Assert that given a valid Person.id and a FlowInstance.id or FlowInstance.identifier the server will respond with a 200 / status OK.
Assert that given a valid Person.id and a FlowInstance.id or FlowInstance.identifier the server will provide a JSON response in the format and structure defined above.
Assert that given a invalid Person.id or a FlowInstance.id or FlowInstance.identifier the server will indicate that these were invalid.
Assert that given a valid Person.id and a StepSchema.identifier the server will respond with a 200 / status OK.
Assert that given a valid Person.id and a StepSchema.identifier the server will provide a JSON response in the format and structure defined above.
Dependencies
Blockers:
22
62
Additional Details
Subscribing to flow / step state changes are not covered by this issue. A client will need to send another request type to subscribe to these changes.
Background & Context*
Once a client has a valid Websocket connection to the server, they should be able to retrieve details of a flow and step for a person.
Goal*
Person.id
and aFlowInstance.id
orFlowInstance.identifier
and will receive a response that indicates the state of the flow for that person.Person.id
and aStepSchema.identifier
and will receive a response that indicates the state of the step for that person.Implementation Details*
Calls to this endpoint should be idempotent. Calling this endpoint multiple times with the same parameters should always result in the same outcome.
Acceptance Criteria*
Test cases that
Person.id
and aFlowInstance.id
orFlowInstance.identifier
the server will respond with a 200 / status OK.Person.id
and aFlowInstance.id
orFlowInstance.identifier
the server will provide a JSON response in the format and structure defined above.Person.id
or aFlowInstance.id
orFlowInstance.identifier
the server will indicate that these were invalid.Person.id
and aStepSchema.identifier
the server will respond with a 200 / status OK.Person.id
and aStepSchema.identifier
the server will provide a JSON response in the format and structure defined above.Dependencies
Blockers:
22
62
Additional Details
Subscribing to flow / step state changes are not covered by this issue. A client will need to send another request type to subscribe to these changes.
*required field.