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

Monitoring api: Support query parameters #147

Merged

Conversation

symphony-soufiane
Copy link
Contributor

@symphony-soufiane symphony-soufiane commented Sep 20, 2022

In this PR, we added the support of query parameters to filter results.

  • The list workflow instances endpoint takes the status=pending/completed/failed as query parameter. An instance is considered as failing if the last executed activity is not the end event.
  • The list instance activities endpoint takes 4 possible query parameters started_before/started_after/finished_before/finished_after to filter activities in time.
  • The list global variables endpoint takes two query parameters occurred_before/occurred_after to filter variables changes in time.

More changes have been done in this PR:

  • When the monitoring token is not provided in the header, we return 401 instead of 400.
  • Fixed 500 error in the list global variables endpoints when the provided instance id is not correct.
  • Added nodeId in the activities definition, for both activities and events.
  • In the list of workflow instances and workflow activities endpoints, we added a sanity check to verify that the provided instanceId belongs to the provided workflow. Otherwise an error is thrown.
  • Added more tests

…tion. Unit tests will be corrected/added in next commit
@symphony-soufiane symphony-soufiane changed the title WIP: first take on query params handling Monitoring api: Support query parameters Sep 21, 2022
…endpoint. Fixed bug in list instance activities when the instance id is not related to the provided workflow Id
…fy if a provided instance belongs to the provided workflow. Changed query parameter filters, based on date, to ISO 8601 instead of a long timestamp. Fixed and added unit tests.

More tests will be fixed and added in next commit
…pleted and failed ones depending on th endActivityId referenced in the historicProcessInstance, if it is an endEvent then the instance has succeeded, otherwise it is a failing one.
@symphony-soufiane symphony-soufiane merged commit 820f794 into finos:master Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants