-
Notifications
You must be signed in to change notification settings - Fork 120
Java: flows #1793
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
base: main
Are you sure you want to change the base?
Java: flows #1793
Conversation
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.
Spelling Mistakes
- java/flows.md:80:46 Unknown word "dependenies"
Generally, for each spelling mistake there are 2 ways to fix it:
- Fix the spelling mistake and commit it.
- The word is incorrectly reported as misspelled → put the word on the project-words.txt list, located in the root project directory.
|
||
Let's take a look at the [CAP SFLIGHT App](https://github.com/SAP-samples/cap-sflight) sample and how we can update it using the flow feature. | ||
|
||
The `cds-feature-flow` has been added to the dependenies. |
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.
The `cds-feature-flow` has been added to the dependenies. | |
The `cds-feature-flow` has been added to the dependences. |
Or maybe one of these: dependencies, dependence, dependents, dependent's?
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! We need to discuss whether Flows should be top level topic (keep it as it is for now)
```xml | ||
<dependency> | ||
<groupId>com.sap.cds</groupId> | ||
<artifactId>cds-feature-flows</artifactId> |
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.
identation
```xml | ||
<dependency> | ||
<groupId>com.sap.cds</groupId> | ||
<artifactId>cds-feature-flows</artifactId> |
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.
indentation
key TravelUUID : UUID; | ||
TravelID : Integer default 0 @readonly; | ||
@flow.status | ||
TravelStatus : Association to TravelStatus default 'O' @readonly; |
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.
TravelStatus
is not shown in the example and seems to be an intermediate CodeList
} | ||
``` | ||
|
||
We can simply remove the [AcceptRejectHandler](https://github.com/SAP-samples/cap-sflight/blob/main/srv/src/main/java/com/sap/cap/sflight/processor/AcceptRejectHandler.java). All of the logic is taken care of by the flow feature. The flow feature will validate that entry state is `Open`. The flow feature will transit the status to `Accepted` and `Canceled` respectively. |
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.
"You can simply remove ..."
I fear customers will not investigate existing SFlight code ni depth - you could still name the benefit, that a custom reject handler is not needed due to flow capabilities.
WIP, draft for early feedback