Skip to content

Handle SELF_REGISTER_USER operation type in workflow#77

Merged
PasinduYeshan merged 2 commits intowso2-extensions:masterfrom
PasinduYeshan:fix/wf-self-reg
Sep 10, 2025
Merged

Handle SELF_REGISTER_USER operation type in workflow#77
PasinduYeshan merged 2 commits intowso2-extensions:masterfrom
PasinduYeshan:fix/wf-self-reg

Conversation

@PasinduYeshan
Copy link
Contributor

@PasinduYeshan PasinduYeshan commented Sep 9, 2025

Proposed changes in this pull request

This pull request introduces support for handling user self-registration as a distinct workflow event in the user management workflow module. The main changes involve recognizing self-registration flows, adding a dedicated workflow request handler, and ensuring that pending self-registration workflows are correctly validated.

Self-registration workflow support:

  • Added a new workflow event constant SELF_REGISTER_USER_EVENT in UserStoreWFConstants to represent user self-registration as a separate event.
  • Implemented a new handler SelfRegisterUserWFRequestHandler (extending AddUserWFRequestHandler) to process self-registration workflow requests, providing a friendly name and description.
  • Registered the new SelfRegisterUserWFRequestHandler as a service in the OSGi component activation method. [1] [2]

User addition and validation logic updates:

  • Updated UserStoreActionListener to detect self-registration flows using the IdentityContext and Flow API, switching to the new workflow event and handler when appropriate. [1] [2] [3]
  • Enhanced validation in AddUserWFRequestHandler to check for pending workflows of both ADD_USER_EVENT and the new SELF_REGISTER_USER_EVENT, preventing duplicate user creation in self-registration scenarios.

Merge Order

  1. Add SELF_REGISTER_USER operation type wso2/identity-api-server#988
  2. Prevent duplicate associations for the same workflow, event, and condition wso2/carbon-identity-framework#7354
  3. Handle SELF_REGISTER_USER operation type in workflow #77
  4. Introduce SELF_REGISTER_USER operation type for workflow wso2/identity-apps#9055

@PasinduYeshan PasinduYeshan changed the title Fix/wf self reg Handle SELF_REGISTER_USER operation type in workflow Sep 9, 2025
@PasinduYeshan
Copy link
Contributor Author

@jenkins-is-staging
Copy link

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/17578460389

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/17578460389
Status: success

Copy link

@jenkins-is-staging jenkins-is-staging left a comment

Choose a reason for hiding this comment

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

Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/17578460389

@PasinduYeshan PasinduYeshan merged commit 88429b7 into wso2-extensions:master Sep 10, 2025
2 checks passed
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.

3 participants