-
Notifications
You must be signed in to change notification settings - Fork 545
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
Improve action execution core #6262
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6262 +/- ##
============================================
+ Coverage 45.72% 45.92% +0.20%
- Complexity 14065 14581 +516
============================================
Files 1633 1659 +26
Lines 100705 103874 +3169
Branches 17706 18241 +535
============================================
+ Hits 46045 47709 +1664
- Misses 47959 49318 +1359
- Partials 6701 6847 +146
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
1d4b9c8
to
4e32383
Compare
4e32383
to
b0be613
Compare
...tion.execution/src/main/java/org/wso2/carbon/identity/action/execution/model/Incomplete.java
Show resolved
Hide resolved
...in/java/org/wso2/carbon/identity/action/execution/model/ActionInvocationSuccessResponse.java
Outdated
Show resolved
Hide resolved
...in/java/org/wso2/carbon/identity/action/execution/model/ActionInvocationSuccessResponse.java
Outdated
Show resolved
Hide resolved
2cd2670
to
4b0b14d
Compare
PR builder started |
PR builder completed |
@@ -47,6 +49,23 @@ ActionExecutionStatus<Success> processSuccessResponse(Map<String, Object> eventC | |||
ActionInvocationSuccessResponse successResponse) throws | |||
ActionExecutionResponseProcessorException; | |||
|
|||
/** | |||
* This method processes the incomplete response received from the action execution. |
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.
Better mention the default implementation throws an unsupported exception so that actions that requires incomplete state can implement this method
@@ -388,6 +417,27 @@ private void logSuccessResponse(Action action, ActionInvocationSuccessResponse s | |||
} | |||
} | |||
|
|||
private void logIncompleteResponse(Action action, ActionInvocationIncompleteResponse incompleteResponse) { | |||
|
|||
DIAGNOSTIC_LOGGER.logSuccessResponse(action); |
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 this correct? If the same functionality can be reused better rename
private final List<PerformableOperation> operations; | ||
private final ExtendedData data; |
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.
Shall we rename this to some thing like ResponseData, ResponseContext etc.
I prefer ResponseData given the value is data.
public Builder data(@JsonProperty("data") ExtendedData data) { | ||
|
||
this.data = data; | ||
return this; | ||
} | ||
|
||
public ActionInvocationSuccessResponse build() { |
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.
Isn't the builder now expecting operations to be not null ?
With this it should be either operations or data that should be present
public void setUrl(String url) { | ||
this.url = url; | ||
} |
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.
Do we need the setter ?
4b0b14d
to
5b1310b
Compare
5b1310b
to
66633f9
Compare
Quality Gate passedIssues Measures |
Issue:
With this PR following improvements will be added to the action exection core.
Add INCOMPLETE action invocation status. Eg: In the custom authentication, the external service will be want to redirect user to custom page. There we can utilize this new INCOMPLETE state with REDIRECT operation.
For success action invocation, enable to send custom json object as
data
.Eg: In the cutsom authentication, the external service will send the authenticated user detail as
data
.This will bring the Bring following method which execute the action id list to its interface.