Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update status field in service request if the service request gets completed or failed #81

Open
tejash-jl opened this issue Nov 11, 2020 · 1 comment
Labels
bug Something isn't working high priority

Comments

@tejash-jl
Copy link
Member

Describe the bug
Service request entity contains a field STATUS. When a service request is created STATUS is set to NEW. But once the service requests get completed or failed the STATUS field is not updated.

To Reproduce
Steps to reproduce the behavior:

  1. Create a workflow
  2. Trigger service request
  3. Get service requests by workflow name
  4. STATUS field in the response is always NEW

Expected behavior
STATUS field in service request should portray the current status. Once the service requests get completed/failed it should be updated.

@tejash-jl tejash-jl added bug Something isn't working high priority labels Nov 11, 2020
@sivachandran
Copy link
Contributor

The status is not persisted in DB. It is derived from the step statuses every time service request status API(i.e., .../serviceRequest/:serviceRequestId).

A workflow may have hundreds or even thousands of service requests. Computing statuses on-demand for that many service requests inside this API is going to take a lot of time. So, I suggest we don't return status and other finer detail in the API response. If the client is interested, it can call service request status API to get finer detail.

Alternatively, we can compute and persist the service request status as on when its steps are completed. In this way, the status would be readily available. But, this might involve a significant change in the implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high priority
Projects
None yet
Development

No branches or pull requests

2 participants