Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8630733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:07:01+00:00 2026-06-12T09:07:01+00:00

I am using liferay workflow. I want to create my own workflow definition. Now

  • 0

I am using liferay workflow. I want to create my own workflow definition.

Now with the default workflow “Single Approver” its just directly notifying the admin that the particular document uploaded with the document and media portlet by a user. What I want is described in this image.

enter image description here

enter image description here

Whenever users under Organization A will upload any document then it will not send notification to approve the user to main ADMIN but rather it should send to Organization A Admin to approve the user.

I hope my question is understandable…

Whenever users under Organization A will upload any document then it will not send notification to approve the user to main ADMIN but rather it should send to Organization A Admin to approve the user..

I hope i have made understand my question…

I have done like this in my workflow I have single approve definition i have given that definition to one folder in media and document portlet Now there is four role they created automatically

1)portal Legal Reviewer - Auto generated role from workflow definition 

2)portal Content Reviewer - Autogenerated role from workflow definition 

3)organization Legal Reviewer - Autogenerated role from workflow definition 

4)organization Content Reviewer - Autogenerated role from workflow definition 

Now whenever i upload something to that folder the notification goes to my site owner

And in that there is two option

1)assign to me
2)assign to -> users (who have role from above 4 they created automatically)

Now suppose i assign to user which have role from above four and when i open the account that user then there is no control panel or no workflow task action i can show .so how can anyone approve the content?

and one thing more where i have to edit the role in xml that it will notify the particular role described in xml not the default way to site owner

Only if i create user who have role to Administrator with the Organization Approver Role that only can access control panel and in workflow task they can find assign to and assign me notification

My defination of workflow goes Here

<?xml version="1.0"?>

<workflow-definition
    xmlns="urn:liferay.com:liferay-workflow_6.1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="urn:liferay.com:liferay-workflow_6.1.0 http://www.liferay.com/dtd/liferay-workflow-definition_6_1_0.xsd"
>
    <name>UPLOAD Approver</name>
    <description>A single approver can approve a workflow content.</description>
    <version>1</version>
    <state>
        <name>created</name>
        <metadata>
            <![CDATA[{"xy":[36,51]}]]>
        </metadata>
        <initial>true</initial>
        <transitions>
            <transition>
                <name>review</name>
                <target>review</target>
            </transition>
        </transitions>
    </state>
    <task>
        <name>update</name>
        <metadata>
            <![CDATA[{"transitions":{"resubmit":{"bendpoints":[[303,140]]}},"xy":[328,199]}]]>
        </metadata>
        <actions>
            <action>
                <name>reject</name>
                <script>
                    <![CDATA[
                        Packages.com.liferay.portal.kernel.workflow.WorkflowStatusManagerUtil.updateStatus(Packages.com.liferay.portal.kernel.workflow.WorkflowConstants.toStatus("denied"), workflowContext);
                        Packages.com.liferay.portal.kernel.workflow.WorkflowStatusManagerUtil.updateStatus(Packages.com.liferay.portal.kernel.workflow.WorkflowConstants.toStatus("pending"), workflowContext);
                    ]]>
                </script>
                <script-language>javascript</script-language>
                <execution-type>onAssignment</execution-type>
            </action>
            <notification>
                <name>Creator Modification Notification</name>
                <template>Your submission was rejected by a reviewer, please modify and resubmit.</template>
                <template-language>text</template-language>
                <notification-type>email</notification-type>
                <execution-type>onAssignment</execution-type>
            </notification>
        </actions>
        <assignments>
            <user />
        </assignments>
        <transitions>
            <transition>
                <name>resubmit</name>
                <target>review</target>
            </transition>
        </transitions>
    </task>
    <task>
        <name>review</name>
        <metadata>
            <![CDATA[{"xy":[168,36]}]]>
        </metadata>
        <actions>
            <notification>
                <name>Review Notification</name>
                <template>You have a new submission waiting for your review in the workflow.</template>
                <template-language>text</template-language>
                <notification-type>email</notification-type>
                <execution-type>onAssignment</execution-type>
            </notification>
            <notification>
                <name>Review Completion Notification</name>
                <template>
                    Your submission has been reviewed and the reviewer has applied the following ${taskComments}.</template>
                <template-language>freemarker</template-language>
                <notification-type>email</notification-type>
                <recipients>
                    <user />
                </recipients>
                <execution-type>onExit</execution-type>
            </notification>
        </actions>
        <assignments>
            <roles>
                <role>
                    <role-type>organization</role-type>
                    <name>Organization APPROVER</name>
                </role>
                <role>
                    <role-type>organization</role-type>
                    <name>Organization Content Reviewer</name>
                </role>
                <role>
                    <role-type>organization</role-type>
                    <name>Organization Owner</name>
                </role>

                <role>
                    <role-type>regular</role-type>
                    <name>Portal Content Reviewer</name>
                </role>
                <role>
                    <role-type>site</role-type>
                    <name>Site Administrator</name>
                </role>
                <role>
                    <role-type>site</role-type>
                    <name>Site Content Reviewer</name>
                </role>

            </roles>
        </assignments>
        <transitions>
            <transition>
                <name>approve</name>
                <target>approved</target>
            </transition>
            <transition>
                <name>reject</name>
                <target>update</target>
                <default>false</default>
            </transition>
        </transitions>
    </task>
    <state>
        <name>approved</name>
        <metadata>
            <![CDATA[
                {"xy":[380,51]}
            ]]>
        </metadata>
        <actions>
            <action>
                <name>approve</name>
                <script>
                    <![CDATA[
                        Packages.com.liferay.portal.kernel.workflow.WorkflowStatusManagerUtil.updateStatus(Packages.com.liferay.portal.kernel.workflow.WorkflowConstants.toStatus("approved"), workflowContext);
                    ]]>
                </script>
                <script-language>javascript</script-language>
                <execution-type>onEntry</execution-type>
            </action>
        </actions>
    </state>
</workflow-definition>

I have not included two roles as follows which is in single approve definition comes by default..

<role>
<role-type>organization</role-type>
<name>Organization Administrator</name>
</role>

<role>
<role-type>regular</role-type>
<name>Administrator</name>
</role> 

So whats happening now that i need to give a particular user to role of administrator as well as the organizationapprover but if i give the administrator rights to that user then only he can access the control panel and can go to the workflow task option but its not real idea to give rights of admin to user whose work is just to approve the content..so i want that somehow just give the permission to organizationapprover to use control panel but only to access workflow task option.the user cant do anything rather just use the workflow task option.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T09:07:02+00:00Added an answer on June 12, 2026 at 9:07 am

    If you look at the default workflow definition (singleapprover.xml or similar) you’ll see that it defines the responsible roles as “Organization Approver”, “Site Approver”, “Approver” or “Administrator” (from memory).

    You can change this – if that’s the only thing you’d like to change, it’s even simple to do so directly in the xml file. You’ll find it within the plugin or in Liferay’s sourcecontrol on github. You probably only need to remove the Administrator from the list of responsible roles, then make the people you want to be responsible member of the “Site Approver” role for their relevant sites.

    Done

    Edit: I don’t fully understand your comment below, but the solution I gave assumes that your users are structured in either organizations or sites – in that case, you can have a user being “Site Approver” or “Organization approver” within that organization. All content that is created within the scope of the site or organization will be required to be approved by the approver within that grouping.

    In case you upload all the content in the same site, but have different user’s assignments, you’ll most likely need to go with some scripted assignments (you can script certain parts of the workflow system) but that would go beyond anything I could explain in a few words here. I could point you to the currently available documentation but I doubt this will be enough to illustrate what I’m talking about – sorry

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just started to use Liferay and I want to develop a portlet using
I am using Liferay 6.1, and I want to override default Liferay Login authentication
I'm loading yui.js 3.3.0 version file from portlet but liferay its using 3.2.0 yui.js
I am trying to create a simple portlet for Liferay 5.2.2 using Grails 1.2.1
I can easily create Liferay portlets and themes individually using the Liferay plugin SDK.
How can I see/access Liferay Database? I want to see all the tables its
I am working in Liferay. Recently I have developed 3 level workflow using Kaleo
I am using liferay ui tabs in my project. I would like to call
I am using Liferay 6 . I have read that Liferay Hooks can be
I had Solr 1.2 up and running at port 8983 and using liferay 5.1.1

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.