You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Develop a new endpoint '/workflows/action' to process the action object, which is a union of request and response objects, and trigger the next steps in the workflow.
The /workflows/action endpoint is a critical component of the Stakwork Common Workflow Plumbing feature. It is designed to process an "action" object, which is a union of request and response objects. This endpoint will trigger the subsequent steps in the workflow, ensuring that the system can handle complex interactions between requests and responses efficiently.
This is related to a broader project defined here:
For context see: #1922
System Schematic:
Design
Endpoint URL: /workflows/action
HTTP Method: POST
Request Body: The request will contain an "action" object, which includes both request and response data.
Validate the incoming action object to ensure it contains required data
Log the action object for auditing and tracking purposes.
Process the action by:
i. updating the workflow request state in wf_requests
ii. trigger the next action based on the action "string".
iii. If there is no defined action then log "no action taken" and exit
Return a response indicating the outcome of the processing.
Note the action string will need to map to a next function to take.
Assignment Criteria
Familiarity with RESTful API design and implementation.
Experience with JSON data structures and validation.
Communication via Sphinx V2 is required; ensure you are live on Sphinx V2.
Acceptance Criteria
The endpoint must accept a POST request at /workflows/action.
The request body must include a valid action object with both request and response data.
The endpoint must validate the action object and log it appropriately.
The workflow state must be updated based on the action data.
Any subsequent workflow steps must be triggered as necessary.
The endpoint must return a JSON response indicating success or failure.
The implementation must include unit tests covering both positive and negative cases.
The endpoint must handle errors gracefully and log them for further analysis.
The text was updated successfully, but these errors were encountered:
Context
Develop a new endpoint '/workflows/action' to process the action object, which is a union of request and response objects, and trigger the next steps in the workflow.
The
/workflows/action
endpoint is a critical component of the Stakwork Common Workflow Plumbing feature. It is designed to process an "action" object, which is a union of request and response objects. This endpoint will trigger the subsequent steps in the workflow, ensuring that the system can handle complex interactions between requests and responses efficiently.This is related to a broader project defined here:
For context see: #1922
System Schematic:
Design
/workflows/action
Logic:
i. updating the workflow request state in wf_requests
ii. trigger the next action based on the action "string".
iii. If there is no defined action then log "no action taken" and exit
Note the action string will need to map to a next function to take.
Assignment Criteria
Acceptance Criteria
/workflows/action
.The text was updated successfully, but these errors were encountered: