Skip to content
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

Update Simple Workflow Engine #4

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

SenuDyl
Copy link

@SenuDyl SenuDyl commented Feb 18, 2025

Purpose

Update the Simple Workflow Engine to ensure compatibility with the current Identity Server. Resolves the issue: wso2/product-is#23374

Goals

This update ensures that the Simple Workflow Engine is fully compatible with the current Identity Server by removing incompatible components, improving code efficiency, and resolving minor bugs.

Approach

  • Removed outdated and incompatible classes to align with the Identity Server.
  • Refactored the codebase to support the latest workflow operations.
  • Fixed minor bugs.
  • Further improvements planned for better performance.

User stories

Summary of user stories addressed by this change>

Release note

Brief description of the new feature or bug fix as it will appear in the release notes

Documentation

Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter “N/A” plus brief explanation of why there’s no doc impact

Training

Link to the PR for changes to the training content in https://github.com/wso2/WSO2-Training, if applicable

Certification

Type “Sent” when you have provided new/updated certification questions, plus four answers for each question (correct answer highlighted in bold), based on this change. Certification questions/answers should be sent to [email protected] and NOT pasted in this PR. If there is no impact on certification exams, type “N/A” and explain why.

Marketing

Link to drafts of marketing content that will describe and promote this feature, including product page changes, technical articles, blog posts, videos, etc., if applicable

Automation tests

  • Unit tests

    Code coverage information

  • Integration tests

    Details about the test cases and coverage

Security checks

Samples

Provide high-level details about the samples related to this feature

Related PRs

List any other related PRs

Migrations (if applicable)

Describe migration steps and platforms on which migration has been tested

Test environment

List all JDK versions, operating systems, databases, and browser/versions on which this feature/fix was tested

Learning

Describe the research phase and any blog posts, patterns, libraries, or add-ons you used to solve the problem.

@SenuDyl SenuDyl force-pushed the simple-workflow-support branch from 83f4928 to ebb6055 Compare February 18, 2025 11:36
Comment on lines 85 to 106
org.osgi.framework; version="[1.2.0, 2.0.0)",
org.osgi.service.component; version="[1.2.0, 2.0.0)",

org.wso2.carbon.identity.workflow.mgt,
org.wso2.carbon.identity.workflow.mgt.util,
org.wso2.carbon.identity.workflow.mgt.bean,
org.wso2.carbon.identity.workflow.mgt.bean.metadata,
org.wso2.carbon.identity.workflow.mgt.dto,
org.wso2.carbon.identity.workflow.mgt.workflow,
org.wso2.carbon.identity.workflow.mgt.exception,
org.wso2.carbon.identity.workflow.mgt.dao,
org.wso2.carbon.identity.role.v2.mgt.core,
org.wso2.carbon.identity.role.v2.mgt.core.exception,
org.wso2.carbon.identity.workflow.mgt.callback,
org.apache.commons.logging,
org.apache.commons.lang,
org.wso2.carbon.utils.multitenancy,
org.wso2.carbon.context,
org.apache.commons.collections,
org.wso2.carbon.identity.core.util,
org.wso2.carbon.database.utils.jdbc,
org.wso2.carbon.database.utils.jdbc.exceptions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in commit 151a293

String tenantDomain = CarbonContext.getThreadLocalCarbonContext().getTenantDomain();
List<String> roleIDList;
try{
roleIDList = WorkflowEngineServiceDataHolder.getInstance().getRoleManagementService().getRoleIdListOfUser(approverId, tenantDomain);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
roleIDList = WorkflowEngineServiceDataHolder.getInstance().getRoleManagementService().getRoleIdListOfUser(approverId, tenantDomain);
List<String> roleIDList = WorkflowEngineServiceDataHolder.getInstance().getRoleManagementService().getRoleIdListOfUser(approverId, tenantDomain);

Copy link
Author

@SenuDyl SenuDyl Mar 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in commit 2439b6c

throw new WorkflowEngineClientException(
WorkflowEngineConstants.ErrorMessages.ASSOCIATION_NOT_FOUND.getCode(),
WorkflowEngineConstants.ErrorMessages.ASSOCIATION_NOT_FOUND.getDescription());
//
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in commit 5e7cb4d

Comment on lines 68 to 69


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in commit 7208ac4

pom.xml Outdated
@@ -169,7 +169,12 @@
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>org.wso2.carbon.identity.configuration.mgt.core</artifactId>
<artifactId>org.wso2.carbon.identity.role.v2.mgt.core</artifactId>
<version>7.7.234-SNAPSHOT</version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<version>7.7.234-SNAPSHOT</version>
<version>7.7.234</version>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's define the version via a variable.
Ex: ${carbon.identity.framework.version}

We can change the value of that variable.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in commit 151a293

pom.xml Outdated
<dependency>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.utils</artifactId>
<version>4.10.34</version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix here also.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in commit 151a293

@SenuDyl SenuDyl changed the title Remove incompatible classes, Update the code accordingly Update Simple Workflow Engine Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants