CrumpetDev / crumpet

GNU Affero General Public License v3.0
18 stars 1 forks source link

A client can call a transition on a flow instance (using its identifier) #67

Open tomtitherington opened 7 months ago

tomtitherington commented 7 months ago

Background & Context*

Once a client has a valid Websocket connection to the server, they should be able to call a transition defined on a FlowSchema / TransitionSchema using the TransitionSchema.identifier.

Goal*

Implementation Details*

Requests and responses should adhere to the following format.

// Example request
{
  "action": "transition",
  "request_id": Date.now(),
  "data": {
    "flow_instance_id": "string",
    "step_schema_identifier": "string",
    "transition_schema_identifier": "string"

  }
}
// Example response
{
  "request_id": 1519211809934,
  "errors": [],
  "status": 200,
  "data" : {
    "result": "string (success, failure)"
    "message": "null | string (if result is failure)"
    "flow_instance_id": "string",
    "step_schema_id": "string",
    "transition_schema_identifier": "string",
  }
}

Acceptance Criteria*

Test cases that

Dependencies

Blockers:

*required field.