-
Notifications
You must be signed in to change notification settings - Fork 91
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
Patch approval service #154
base: feature-workflow-engine-simple
Are you sure you want to change the base?
Patch approval service #154
Conversation
|
UserApprovalServiceHolder.taskOperationService = taskOperationService; | ||
} | ||
|
||
public static void setApprovalEventService(ApprovalEventService approvalEventService1) { |
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 method comments to public methods. Fix other places as well.
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.
Addressed with this commit e7dc2ae
UserApprovalServiceHolder.taskOperationService = taskOperationService; | ||
} | ||
|
||
public static void setApprovalEventService(ApprovalEventService approvalEventService1) { |
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.
switch variable name
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.
Addressed with this commit e7dc2ae
import org.wso2.carbon.context.PrivilegedCarbonContext; | ||
import org.wso2.carbon.humantask.core.TaskOperationService; | ||
|
||
public class OSGIBpelService extends AbstractFactoryBean<TaskOperationService> { |
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 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.
Addressed with this commit e7dc2ae
@@ -0,0 +1,30 @@ | |||
package org.wso2.carbon.identity.api.user.approval.common.factory; |
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 license header
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.
Addressed with this commit e7dc2ae
if (taskOperationService != null) { | ||
this.taskOperationService = taskOperationService; | ||
} else { | ||
throw new Exception("Unable to retrieve TaskOperationService service."); |
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.
change into run time exception
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.
Addressed with this commit e7dc2ae
|
||
/** | ||
* Factory Beans serves as a factory for creating other beans within the IOC container. This factory bean is used to | ||
* instantiate the TaskOperationService type of object inside the container. | ||
*/ | ||
public class OSGIServiceFactory extends AbstractFactoryBean<TaskOperationService> { | ||
public class OSGIServiceFactory extends AbstractFactoryBean<ApprovalEventService> { |
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.
keep this class as it is and add a new class as a OSGI service
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.
Addressed with this commit e7dc2ae
if (taskOperationService != null) { | ||
this.taskOperationService = taskOperationService; | ||
if (this.approvalEventService == null) { | ||
ApprovalEventService approvalEventService1 = (ApprovalEventService) PrivilegedCarbonContext. |
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.
fix variable name
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.
Addressed with this commit e7dc2ae
import org.wso2.carbon.identity.rest.api.user.approval.v1.dto.TaskDataDTO; | ||
import org.wso2.carbon.identity.rest.api.user.approval.v1.dto.ErrorDTO; | ||
import org.wso2.carbon.identity.rest.api.user.approval.v1.dto.TaskSummaryDTO; | ||
import org.wso2.carbon.identity.rest.api.user.approval.v1.dto.StateDTO; |
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 these imports can be removed
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.
Yes. no need.
@@ -29,25 +32,49 @@ | |||
*/ | |||
public class MeApiServiceImpl extends MeApiService { | |||
|
|||
private ApprovalEventService approvalEventService; | |||
private UserApprovalService userApprovalService; | |||
public static final String SIMPLE_WORKFLOW_ENGINE = "Workflow.SimpleWorkflow.Enable"; |
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 can be moved to a constant 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.
Addressed with this commit e7dc2ae
public MeApiServiceImpl() { | ||
|
||
} |
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 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.
need it.
</bean> | ||
<bean id="approvalEventServiceFactoryBean" | ||
class="org.wso2.carbon.identity.api.user.approval.common.factory.OSGIServiceFactory"/> | ||
<bean id="UserApprovalServiceHolderBean1" class="org.wso2.carbon.identity.api.user.approval.common.UserApprovalServiceHolder"> |
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.
fix bean id
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.
Addressed with this commit e7dc2ae
pom.xml
Outdated
<dependency> | ||
<groupId>org.wso2.carbon.identity.workflow.engine</groupId> | ||
<artifactId>workflow.engine</artifactId> | ||
<version>1.0-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.
get the version through a property
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.
Addressed with this commit b89af13
Purpose
Goals
Approach
User stories
Release note
Documentation
Training
Certification
Marketing
Automation tests
Security checks
Samples
Related PRs
Migrations (if applicable)
Test environment
Learning