-
Notifications
You must be signed in to change notification settings - Fork 201
webapi: Feature/fwf 4504 task outcome configuration #2730
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
webapi: Feature/fwf 4504 task outcome configuration #2730
Conversation
PR Reviewer Guide 🔍(Review updated until commit 6457a44)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 6457a44 Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit 62c965a
Suggestions up to commit eca9e06
Suggestions up to commit 45bd55e
Suggestions up to commit 07cc62d
|
bbd69f8
to
535b5d0
Compare
Persistent review updated to latest commit 535b5d0 |
535b5d0
to
997039f
Compare
Persistent review updated to latest commit 997039f |
997039f
to
d5c713d
Compare
Persistent review updated to latest commit d5c713d |
Persistent review updated to latest commit 203f640 |
203f640
to
c3be1c8
Compare
Persistent review updated to latest commit c3be1c8 |
c3be1c8
to
07cc62d
Compare
Persistent review updated to latest commit 07cc62d |
1 similar comment
Persistent review updated to latest commit 07cc62d |
Persistent review updated to latest commit 45bd55e |
Persistent review updated to latest commit eca9e06 |
@salabh-aot Please review this PR |
task_transition_map = fields.Raw( | ||
data_key="taskTransitionMap", required=True | ||
) # Accepts list, dict, string | ||
transition_map_type = fields.Str(data_key="transitionMapType", required=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is transition_map_type
used as reference for input field type in frontend? If yes, it would be better to limit the choices, may be using an Enum. Adds an additional validation.
if tenant is not None: | ||
query = query.filter_by(tenant=tenant) | ||
task_outcome = query.first() | ||
return task_outcome if task_outcome else None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't query.first()
return None
if there are no results? We can return task_outcome
and avoid the if ... else ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Persistent review updated to latest commit 62c965a |
@salabh-aot please check and approve if everything seems ok |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
Persistent review updated to latest commit 6457a44 |
|
User description
Issue Tracking
JIRA:
Issue Type: BUG/ FEATURE
https://aottech.atlassian.net/browse/FWF-4504
Changes
Created new database table: TaskOutcomeConfiguration to store workflow transition rules
Implemented POST endpoint
/tasks/task-outcome-configuration
: Enables saving new task outcome configurationsImplemented GET endpoint
/tasks/task-outcome-configuration/<task-id>
: Retrieves configuration by taskIdScreenshots
Checklist
PR Type
Enhancement, Tests, Documentation
Description
Add DB table and ORM model
Implement POST and GET endpoints
Create TaskService and schema
Add unit tests for Task API
Changes walkthrough 📝
1 files
Create task_outcome_configuration DB migration
1 files
Add TASK_OUTCOME_NOT_FOUND error code
7 files
Add TaskOutcomeConfiguration ORM model
Register Task API namespace
Implement TaskOutcome API endpoints
Import TaskOutcomeConfiguration schema
Define TaskOutcomeConfiguration schema
Include TaskService in service exports
Add TaskService for configuration management
2 files
Add tests for TaskOutcome API
Add task_outcome_config_payload helper
1 files
Document TaskOutcome configuration changes
1 files
Pin snowballstemmer to avoid incompatibility