Issue
- If any user uploads a document in the folder under document and media in which the workflow has been assigned, it should notify the approver within the organization that is based on the role type configured in the workflow.
-
Steps to reproduce:
- Install the clean instance of Liferay DXP 7.3 SP1
- Create different users, organizations and assign users to each organization. For example: User1, User2, User3, Org1, Org2, Org3. User1 is assigned to Org1 and likes the same with other users.
- Under global site,
- Create a folder and assign a single approver workflow
- Workflow:
- It should notify based on role type as Organization role
- Navigate to the created folder under document and media, Upload a file and publish it.
- Expected behavior: When any user uploads a document in this folder, it should notify the approver within the organization that is based on the role type configured in the workflow.
- Observed behavior: Notification didn't send to the users within the organization.
Environment
- Liferay DXP 7.3
Resolution
- The behavior is the expected one. Let me explain the reason behind it. The role-type tag helps the system sort out who should receive the notification based on the scope and can be set as per the requirement [like site, organization, or portal].
- As per the above steps, the user1 owns Omoderator or Organization Content Reviewer role but the document was uploaded to the Liferay global site. This scope is different from Organization.
- For example: Liferay site has one groupId(eg10xx0), Org1 has one groupId(eg10xx1). Here when user uploading a document in groupId(eg10xx0), user who belongs to Org1 [ie - groupId(eg10xx1)] will not get notified. This is how the Liferay code has been designed to work.
- Therefore, following the below steps helps to send the notification based on the organization role type configured in the workflow.
-
Additional steps are:
- Navigate to global menu > Control Panel > Users > Users and Organizations > Organizations > edit this organization(e.g. org1), enable "create site" in Organization site and save it.
- Navigate to global menu > Control Panel > Sites > Sites > go to the "org" site.
- In the Org site, follow the previous steps from 4
- Observed behavior: When a user uploads a document in this folder, it's notifying the user based on the organization role type configured in the workflow that is within the organization only.
Additional Information
- Find the attachment for sample workflow, demonstration of the additional steps, the test result for easy reference.
- Unofficial threads for a similar scenario with business-specific requirements:
- Liferay official document: