-
Notifications
You must be signed in to change notification settings - Fork 146
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
call-back-api #446
base: feature-workflow-externalization
Are you sure you want to change the base?
call-back-api #446
Conversation
@@ -0,0 +1,33 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!-- | |||
~ Copyright (c) 2022, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. |
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.
update with the correct year. check all files
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.
fixed by :0f13918
<groupId>org.wso2.carbon.identity.server.api</groupId> | ||
<artifactId>org.wso2.carbon.identity.api.server.workflow.management</artifactId> | ||
<relativePath>../pom.xml</relativePath> | ||
<version>1.2.43-SNAPSHOT</version> |
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.
when merging the PR, need to make sure the correct version is included here
import org.wso2.carbon.identity.workflow.mgt.WorkFlowExecutorManager; | ||
|
||
/** | ||
* Service holder class for user organization management services. |
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.
incorrect comment
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.
fixed by : 0f13918
* @param requestId workflow request id. | ||
* @param workflowApprovalPatchRequest workflow request status. |
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.
not formatted properly
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.
fixed by : 34dc2a5
* @param workflowApprovalPatchRequest workflow request status. | ||
* @throws WorkflowException throw exception while approving workflow request | ||
*/ | ||
public void approveWorkflowRequest(String requestId, WorkflowApprovalPatchRequest workflowApprovalPatchRequest) throws WorkflowException { |
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.
check if this exceeds the maximum character length (120) limit
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.
fixed by : 09a4962
public void approveWorkflowRequest(String requestId, WorkflowApprovalPatchRequest workflowApprovalPatchRequest) throws WorkflowException { | ||
|
||
getWorkFlowExecutorManager().handleCallback(requestId, workflowApprovalPatchRequest.getStatus(), null); | ||
|
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.
unwanted new line
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.
fixed by : 09a4962
* Custom exception for user organization management endpoint. | ||
*/ | ||
public class WorkflowManagementEndpointException extends WebApplicationException { | ||
private String errorCode; |
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.
add a new line after the class declaration
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.
fixed by : 3f0c886
public WorkflowManagementEndpointException(String errorCode) { | ||
|
||
} |
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.
what's the purpose of this?
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.
fixed by : 3f0c886
package org.wso2.carbon.identity.workflow.mgt.api.v1.impl; | ||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.wso2.carbon.identity.workflow.mgt.api.v1.*; |
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.
avoid star imports. please note this is not applicable for files in gen folder
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.
fixed by : 3f0c886
import java.util.List; | ||
import javax.ws.rs.core.Response; | ||
|
||
public class WorkflowApiServiceImpl implements WorkflowApiService { |
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.
add a class comment
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.
fixed by : 3f0c886
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.wso2.carbon.identity.workflow.mgt.api.v1.*; | ||
import org.wso2.carbon.identity.workflow.mgt.api.v1.core.WorkflowManagementService; | ||
import org.wso2.carbon.identity.workflow.mgt.api.v1.exceptions.WorkflowManagementEndpointException; |
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.
seems like this import is not used within the class
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.
fixed by : 3f0c886
public Response workflowWorkflowIdPatch(String workflowId, WorkflowApprovalPatchRequest workflowApprovalPatchRequest) { | ||
|
||
try { | ||
workflowManagementService.approveWorkflowRequest(workflowId,workflowApprovalPatchRequest); |
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.
formatting issue
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.
fixed by : 3f0c886
// /** | ||
// * An error code. | ||
// **/ | ||
// public Error code(String code) { |
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.
remove this class if not used
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.
fixed by : 3f0c886
// | ||
//import javax.ws.rs.core.Response; | ||
// | ||
//public class WorkflowManagementEndpointUtil { |
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.
remove this class if not needed
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.
fixed by : 3f0c886
responses: | ||
'200': | ||
description: Successful Response | ||
|
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.
remove new line
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.
fixed by : 3f0c886
properties: | ||
code: | ||
type: string | ||
example: UOM-00000 |
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 the correct error code prefix?
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.
fixed by : 3f0c886
type: string | ||
example: 'APPROVED' | ||
|
||
|
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.
remove line
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.
fixed by : 3f0c886
Purpose
Goals
Approach
User stories
Release note
Documentation
Training
Certification
Marketing
Automation tests
Security checks
Samples
Related PRs
Migrations (if applicable)
Test environment
Learning