Navigation Menu

Search code, repositories, users, issues, pull requests..., provide feedback.

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly.

To see all available qualifiers, see our documentation .

  • Notifications You must be signed in to change notification settings

03-tasks.markdown

Latest commit, file metadata and controls, workflow task nodes.

[TOC levels=1-4]

Task nodes are fundamental parts of a workflow definition. When you define your organization's business processes and design corresponding workflows, you likely first envision the tasks. As the name implies, tasks are the part of the workflow where work is done. A user enters the picture and must interact with the submitted asset. Users often take the role of reviewer, deciding if an asset from the workflow is acceptable for publication or needs more work.

Unlike other workflow nodes, task nodes have Assignments, because a user is expected to do something (often approve or reject the submitted asset) when a workflow process enters the task node.

Commonly, task nodes contain task timers, assignments, actions (which can include notifications and scripts), and transitions. Notifications and actions aren't limited to task nodes, but task nodes and their assignments deserve their own article (this one).

Check out the Review task in the Single Approver definition, noting that several <role> tags are excluded from this snippet for brevity:

There are two actions in the review task, both <notification> s. Each notification may contain a name, template, notification-type, execution-type, and recipients. Besides notifications, You can also use the <action> tag. These have a name and a script and are more often used in state nodes than tasks.

Assignments

Workflow tasks are completed by a user. Assignments make sure the right users can access the tasks. You can choose how you want to configure your assignments.

You can choose to add assignments to specific roles, to multiple roles of a role type (organization, site, or regular role types), to the asset creator, to resource actions, or to specific users. Additionally, you can write a script to define the assignment. For an example, see the single-approver-definition-scripted-assignment.xml .

The above assignment specifies that an Organization Administrator must complete the task.

The above assignment specifies that only the user with the user ID of 20156 may complete the task. Alternatively, specify the <screen-name> or <email-address> of the user.

The above assignment assigns the task to the Administrator role, then checks whether the group of the asset is an Organization. If it is, the Organization Content Reviewer role is assigned to it. If it's not, the task is assigned to the Site Content Reviewer role.

Note the roles = new ArrayList<Role>(); line above. In a scripted assignment, the roles variable is where you specify any roles the task is assigned to. For example, when roles.add(adminRole); is called, the Administrator role is added to the assignment.

Assigning tasks to Roles, Organizations, or Asset Creators is a straightforward concept, but what does it mean to assign a workflow task to a Resource Action? Imagine an UPDATE resource action. If your workflow definition specifies the UPDATE action in an assignment, then anyone who has permission to update the type of asset being processed in the workflow is assigned to the task. You can configure multiple assignments for a task.

Resource Action Assignments

Resource actions are operations performed by users on an application or entity. For example, a user might have permission to update Message Boards Messages. This is called an UPDATE resource action, because the user can update the resource. If you're uncertain about what resource actions are, refer to the developer tutorial on the permission system for a more detailed explanation.

To find all the resource actions that have been created, you need access to the Roles Admin application in the Control Panel (in other words, you need permission for the VIEW action on the roles resource).

  • Navigate to Control Panel → Users → Roles.
  • Add a new Regular Role. See the article on managing roles for more information.
  • Once the role is added, navigate to the Define Permissions interface for the role.
  • Find the resource whose action should define your workflow assignment.

Here's what the assignment's XML looks like:

Now when the workflow proceeds to the task with the resource action assignment, users with UPDATE permission on the resource (for example, Message Boards Messages) are notified of the task and can assign it to themselves (if the notification is set to Task Assignees). Specifically, users see the tasks in their My Workflow Tasks application under the tab Assigned to My Roles .

Use all upper case letters for resource action names. Here are some common resource actions:

Determine the probable resource action name from the permissions screen for a resource. For example, in Message Boards, one of the permissions displayed on that screen is Add Discussion . Convert that to all uppercase and replace the space with an underscore, and you have the action name.

Task Timers

Task timers trigger an action after a specified time period passes. Timers are useful for ensuring a task does not go unattended for a long time. Available timer actions include sending an additional notification, reassigning the asset, or creating a timer action.

The above task timer creates a notification. Specify a time period in the <delay> tag, and specify what action to take when the time expires in the <timer-actions> block. The <blocking> element specifies whether the timer actions may recur. If blocking is set to false , timer actions may recur. In a recurrence element, specify the recurrence interval using a duration and a scale , as demonstrated above. The above recurrence element specifies that the timer actions run again every ten minutes after the initial occurrence. Setting blocking to true prevents timer actions from recurring.

The above snippet demonstrates how to set up a reassignment action.

Like <action> elements, <timer-action> elements can contain scripts.

The above example isn't functional but it demonstrates setting up a <script> in your task timer. Read the Scripting in Workflow article for more information.

| Note: A timer-action can contain all the same tags as an action , with |one exception: execution-type . Timer actions are always triggered once the |time is up, so specifying and execution type of onEntry , for example, isn't |meaningful inside a timer.

Tasks are at the core of the workflow definition. Once you understand how to create tasks and the other workflow nodes and add transitions between the nodes, you're on the cusp of workflow wizard-hood.

liferay workflow scripted assignment

Use Liferay's Cloud infrastructure to launch your solutions more quickly and securely.

liferay workflow scripted assignment

Increase orders with enriching product information, easy ordering tools, and product recommendations.

liferay workflow scripted assignment

Content Management System

Create, publish, and manage content, pages, and multimedia across different channels faster.

liferay workflow scripted assignment

Development and Tooling

Use out-of-the-box features and development tools to deliver solutions to users faster.

liferay workflow scripted assignment

Digital Asset Management

liferay workflow scripted assignment

DXP Self-Hosted Installation, Maintenance, and Administration

Deploy, configure, and maintain Liferay DXP on your own infrastructure.

liferay workflow scripted assignment

Integration

Unify systems, applications, and data with a single platform.

liferay workflow scripted assignment

Personalization

Deliver more personalized and relevant content through enhanced segmentation, AI-generated recommendations, and A/B testing.

liferay workflow scripted assignment

Send email notifications, test content updates, deliver solutions across multiple channels, and more with out-of-the-box platform features.

liferay workflow scripted assignment

Save users time with personalized, integrated, and organized search results.

liferay workflow scripted assignment

Protect users, data, and solutions with a platform designed with security in mind.

liferay workflow scripted assignment

Deliver customized pages and sites on any device or channel.

liferay workflow scripted assignment

Analytics Cloud

Understand your audience with integrated analytics for Liferay DXP.

liferay workflow scripted assignment

Launch modern B2B commerce experiences on Liferay DXP.

liferay workflow scripted assignment

Transition from legacy systems and build digital experiences on a single powerful platform.

liferay workflow scripted assignment

Liferay Cloud

Enterprise PaaS tailored for Liferay Digital Experience Platform.

liferay workflow scripted assignment

Documents and resources to further help implementation.

liferay workflow scripted assignment

  • Workflow Designer Overview

Creating Workflow Tasks

  • Configuring Workflow Actions and Notifications
  • Workflow Nodes
  • Using Forks and Joins
  • Using Condition Nodes
  • Assigning Task Nodes
  • Using Task Timers
  • Workflow Transitions
  • Process Automation
  • Designing and Managing Workflows
  • Workflow Designer

Subscription

The default Single Approver Definition offers a simple introduction to workflow tasks. It has only two task nodes: Review and Update. The workflow enters the Review node when a content creator submits an asset for review. In review, the asset can be accepted or rejected. If it’s rejected, the process moves to the Update task. The submitter can then modify the asset and resubmit it for review.

The single approver definition has two task nodes.

Task nodes are often the most complex parts of a workflow definition. They can have Assignments which can assign the task to users or a Resource Action (see Assigning Task Nodes ).

Task nodes also contain Notifications and Actions–both of which support workflow scripts . See Configuring Workflow Actions and Notifications .

Task nodes can also use task timers to trigger an action after a specified time period passes. Timers are useful for ensuring a task does not go unattended for a long time. Available timer actions include sending an additional notification, reassigning the asset, or creating a timer action.

When the review is finished and the approved transition is triggered, the workflow advances to the next node. In the Single Approver process, it moves to the Approved nd node.

Creating the Single Approver Workflow

You’ll create the workflow in 4 steps:

  • Create the workflow and give it a name
  • Create the Review node
  • Create the Update node
  • Configure the End node

Creating the Workflow

  • Go to the Global Menu → Applications → Process Builder.
  • Click the Workflows tab.

Add icon

  • Give your workflow a descriptive name, like My Single Approver.

Creating the Review Node

In the workflow designer Canvas, if there’s a transition connecting the Start node and End node, delete it: select it with your mouse and hit the Delete key on your keyboard.

Drag and drop a Task node onto the canvas.

Connect the Start node to the Task node by making sure no nodes are selected and then moving your pointer to the edge of the start node. When the cursor changes shape, you can click and drag a transition from the Start node to the Task node.

Select the transition and rename it Review .

Click the Task node to begin updating its properties.

Give the node a name: Review .

Add a Notification:

  • Name : Review Notification
  • Template Language : Freemarker
  • Template : Enter this Freemarker notification: ${userName} sent you a ${entryType} for review in the workflow.
  • Notification Type : Select Email and User Notification in the multiple select field.
  • Execution Type : On Assignment
  • Recipient Type : Task Assignees

Configure the Task node's notification settings to send an email and user notification that an asset is ready for review.

Add another notification:

  • Name: Review Completion Notification
  • Template Language: Freemarker
  • Template: Enter this Freemarker notification: Your submission was reviewed<#if taskComments?has_content> and the reviewer applied the following ${taskComments}</#if>.
  • Notification Type: Email
  • Execution Type: On Exit
  • Recipient Type: Asset Creator

Back

Add the Assignments . You can assign the review task to a Role, Role Type, a specific User, or a Resource Action. In this example, assign the review Task to a Role Type. Select these Roles, clicking New Section each time you must add a new Role:

  • Asset Library Administrator
  • Asset Library Content Reviewer
  • Asset Library Owner
  • Organization Administrator
  • Organization Content Reviewer
  • Organization Owner
  • Administrator
  • Portal Content Reviewer
  • Site Administrator
  • Site Content Reviewer

If you select Auto Create, a Role that doesn’t currently exist will be auto-created when the workflow is saved. For more information about Roles and Permissions, see Understanding Roles and Permissions and Assigning Users to Roles .

Configure the Task Node's notification settings to send an email and user notification that an asset is ready for review.

Click the End node and rename it to Approved .

Connect the Review node to the Approved End node. Name the connector approve .

This Task node is now configured; it sends a notification that a submission is ready for review to those Users assigned to a specific Role.

You can also assign the Task node to a Resource Action instead of another user or a Role Type. To learn more see Assigning Task Nodes .

Create the Update Node

Drag and drop another Task node onto the canvas.

Connect the review node to the new Task node by making sure no nodes are selected and then moving your pointer to the edge of the start node. When the cursor changes shape, you can click and drag a connector from the review node to the new Task node.

Select the connector and rename it reject .

Give the node a name: Update .

Now add a Notification .

  • Name: Creator Modification Notification
  • Template: Enter this Freemarker notification: Your submission was rejected by ${userName}; please modify and resubmit.
  • Notification Type: Select Email and User Notification in the multiple select field.
  • Execution Type: On Assignment
  • Recipient Type: Task Assignees

Click on Assignments . Select Asset Creator .

Now add Actions :

  • Name: reject
  • Template (Groovy): import com.liferay.portal.kernel.workflow.WorkflowStatusManagerUtil; import com.liferay.portal.kernel.workflow.WorkflowConstants; WorkflowStatusManagerUtil.updateStatus(WorkflowConstants.getLabelStatus("denied"), workflowContext); WorkflowStatusManagerUtil.updateStatus(WorkflowConstants.getLabelStatus("pending"), workflowContext);
  • Leave the rest of the defaults (e.g., Execution type On Entry ).

Make sure nothing is selected on the palette; move your mouse pointer to the edge of the update node. Drag a connector from the update node back to the review node.

Name the new connector resubmit .

Save the workflow definition.

Your workflow is taking shape. All that's left is to connect the end node.

  • Click the Publish button to publish the workflow.

Now that you’ve walked through a workflow creation and learned how to use the workflow designer, look into adding node types that can take your workflow processes to the next level; such as Forks and Joins or Conditions .

Related Topics

  • Activating Workflow
  • Using Task Nodes

Liferay.com

Capabilities

View All Capabilities

Submit Feedback

  • HIRING! CHECK OUR JOB POSTINGS

XTIVIA

Assigning User Registration Workflow to an Organization Role in Liferay

by Ashok Neupane | Apr 3, 2018 | Blog , Digital Experience , Liferay , Liferay DXP , Portals | 0 comments

assigning workflow to an Organization Role in Liferay

This article is intended to give you an overview of how can you assign a workflow task to organization role if the definition is applied to other than the organization site. You will need to know the basic concepts of Kaleo workflow in order to understand the concepts described here.

Before we get into the specific Liferay workflow scenario this blog is meant to address, let’s talk a little about Liferay workflow in general. Workflow in Liferay is most commonly used for blog posts, comments, wiki pages, message board messages, and user registration. In regards to Liferay content, workflow helps us to filter and monitor content before it goes live by assigning the task to a user or a role for the approval. The “out of the box” single approver workflow is most commonly used in Liferay. If the approver finds the content appropriate, they can accept the task, approve it, and the content is live. If the content is not appropriate, the approver can reject it. At that time, the workflow can do many things such as getting assigned back to the creator of the content. This helps maintain the integrity of the content within the site. Here are a few workflow scenarios.

Workflow assigned to a Regular Role

In a normal scenario, the approval of a workflow task is assigned to a regular role. This means every user in Liferay with that regular role has rights to accept the workflow task. This works well for organizations that have dedicated content editors & authors that work on many sites concurrently or if you only have one Liferay site. This is the most basic use case for managing content with Liferay workflow.

Workflow assigned to an Site Role

In another scenario, the content posted in a site is assigned to a site role. In this scenario, the workflow task can be approved/denied only by users who are the member of the same site where the content resides and have that site role. If other users have the same site role but are not the member of that Liferay site where the content exists, they will not be assigned to the workflow approval task. This was done intentionally to ensure only members of the site with the necessary role are assigned that workflow task. This works well if your content editors & authors have dedicated Liferay sites that they are responsible for maintaining.

Workflow assigned to an Organizational Role

The same principle applies to the organization roles as site roles. If the workflow assignment is set to an organization role, the workflow task will only get assigned to users with the specific organization role rights to accept the task and only if the workflow definition is applied to an application in an organization site. This is the less common scenario, I’d like to discuss further.

In this particular scenario, we would like to assign user registration workflow to be approved by the appropriate users within the organization the newly registered user is associated with. Therefore we need to assign the workflow task to an organization role even when the workflow definition is not in the organization site. The registration form will need to include some custom fields used to lookup the appropriate organization where they new user should reside. Then we need to assign the workflow task to the “Organization Administrator” role associated with that organization. There is no direct way to do this, but there is a workaround for achieving this goal.

First, you have to get the organization where the user should reside and where you want to assign the workflow task. We looked up the organization using custom fields on the registration form. For example, you can use a company name field & email address domain to lookup the correct organization in Liferay. Next, you need to add the user to the organization:

  • The organizationPk is the primary key of the organization. This is the organization we will assign the user and it will be used for workflow assignment.
  • The classPK is primary key of the context entry, which in this case will be the user’s primary key (aka userId).

Now to assign the task to an organization role, you need to get that role. But first, you have to set the group id of the workflowInstanceLink, workflowContext and serviceContext same as the organization’s groupId so that the organization role will get permission to view and approve the task:

The “rolesAssignment” attribute contains the role that should be assigned to the workflow task. We can now add the following in the scripted assignment of the task to assign it to the organization role even if the workflow definition is not in the organization site:

Liferay workflow is an efficient way to implement the approval based task to filter out the inappropriate content or users from your site. This blog post was written to show how can you assign the organization roles for approval of the workflow task even if the definition of the workflow is applied outside of an organization site.

If you have questions or need help, please engage with us via comments on this blog post, or reach out to us at https://www.xtivia.com/contact/ or [email protected] .

Additional Reading

You can continue to explore Liferay DXP by checking out Publishing Typed Content With Liferay DXP’s Asset Publisher for utilizing the Asset Publisher to publish typed content, or Introducing Speedray Architecture Pattern for Liferay DXP to learn about the Speedray Architecture Pattern, or The Top 10 New Features in Liferay DXP 7 from a functional perspective, or Top 5 New Features in Liferay DXP UI Development and Creating JAX-RS REST Services in Liferay DXP from a development perspective, or Top 5 DevOps Features in Liferay DXP from a devops perspective.

Submit a Comment Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed .

Need more information? Let’s Talk Today!

Hear from our customers, learn more about.

Success Stories

  • API Management
  • Applications
  • Business Intelligence
  • Customer Relationship Management
  • Cyber Security
  • Data Management
  • Data Science & AI
  • Data Warehousing
  • Digital Experience
  • Dynamics 365
  • Enterprise Information Management
  • Headless CMS
  • Liferay DXP
  • Master Data Management
  • Perspectives
  • Software Licensing

Recent Posts

  • Building Effective CRM User Adoption Strategies
  • A Seamless Integration Solution for .NET Lab Software Update
  • The Art of Customizing Microsoft Dynamics 365: Beyond the Basics
  • MS Dynamics Implementation: A Guide to Avoiding Common Mistakes

XTIVIA uses cookies to personalize content and ads. Privacy Policy

liferay workflow scripted assignment

Message Boards

  • Development

RE: Kaleo workflow scripted assignment..

  • RSS (Opens New Window) (Opens New Window)

thumbnail

Kaleo workflow scripted assignment..

thumbnail

Any updates on this?

thumbnail

liferay workflow scripted assignment

Use Liferay's Cloud infrastructure to launch your solutions more quickly and securely.

liferay workflow scripted assignment

Increase orders with enriching product information, easy ordering tools, and product recommendations.

liferay workflow scripted assignment

Content Management System

Create, publish, and manage content, pages, and multimedia across different channels faster.

liferay workflow scripted assignment

Development and Tooling

Use out-of-the-box features and development tools to deliver solutions to users faster.

liferay workflow scripted assignment

Digital Asset Management

liferay workflow scripted assignment

DXP Self-Hosted Installation, Maintenance, and Administration

Deploy, configure, and maintain Liferay DXP on your own infrastructure.

liferay workflow scripted assignment

Integration

Unify systems, applications, and data with a single platform.

liferay workflow scripted assignment

Personalization

Deliver more personalized and relevant content through enhanced segmentation, AI-generated recommendations, and A/B testing.

liferay workflow scripted assignment

Send email notifications, test content updates, deliver solutions across multiple channels, and more with out-of-the-box platform features.

liferay workflow scripted assignment

Save users time with personalized, integrated, and organized search results.

liferay workflow scripted assignment

Protect users, data, and solutions with a platform designed with security in mind.

liferay workflow scripted assignment

Deliver customized pages and sites on any device or channel.

liferay workflow scripted assignment

Analytics Cloud

Understand your audience with integrated analytics for Liferay DXP.

liferay workflow scripted assignment

Launch modern B2B commerce experiences on Liferay DXP.

liferay workflow scripted assignment

Transition from legacy systems and build digital experiences on a single powerful platform.

liferay workflow scripted assignment

Liferay Cloud

Enterprise PaaS tailored for Liferay Digital Experience Platform.

liferay workflow scripted assignment

Documents and resources to further help implementation.

liferay workflow scripted assignment

  • Crafting XML Workflow Definitions
  • Using the Script Engine in Workflow
  • Workflow Definition Node Reference
  • Workflow Task Node Reference

Workflow Notification Template Variables

  • Creating a Condition Evaluator
  • Creating an Action Executor
  • Working with Workflow Context
  • Process Automation
  • Developer Guide

Liferay 7.3+

Some variables are auto-injected into the workflow notification context. These are handy to use in your workflow notification templates.

Normally in Freemarker, you must declare variables explicitly:

Injected variables are already declared and can be used directly in the template.

To use these variables, you must know which are available in your workflow notification context. The variables available change depending on the workflow definition details and the asset in the workflow. The method presented here shows you how to get the list of variables for your specific context, so you don’t have to do any guesswork.

Discovering the Workflow Notification Template Variables

Enable DEBUG level logging for the TemplateNotificationMessageGenerator class to display the variables available in your workflow notification context:

Go to Control Panel → Configuration → Server Administration.

Click the Log Levels tab.

Add a Log Level with this configuration:

  • Logger Name : com.liferay.portal.workflow.kaleo.runtime.internal.notification.TemplateNotificationMessageGenerator
  • Log Level : DEBUG

Activate a workflow definition (e.g., the Single Approver definition) on an asset (e.g., Blogs Entry).

Submit a test entry and log messages appear that reveal the workflow available notification template variables in the context of your workflow.

For example, the Single Approver workflow shows these variables on initial submission of an asset:

The snippet of output above shows that saxReaderUtil , getterUtil , portalPermission , entryClassPK , layoutPermission , expandoTableLocalService , localeUtil , groupId , and portalUtil are available in the context that caused these messages to be printed in the log.

Using the Workflow Notification Template Variables

The contextually injected notification variables can be categorized into two main types:

Value variables provide a single value. If a variable provides a single value, you can use it to display that value in the notification, or you can pass it as a parameter to an operation that retrieves some other useful information to be displayed in the notification message.

Example: The Single Approver definition provides this notification in a FreeMarker template:

The userName and entryType provide values, so the notification might render like this:

Joe Bloggs sent you a Blogs Entry for review in the workflow.

The value type variables can also be checked for content. The Single Approver definition also contains this notification template:

If the reviewer provided task comments, they’re shown. Otherwise, the notification recipient only sees

Your submission was reviewed

Operation variables expose a Liferay DXP Java class, so you can access its operations in the notification template. For these variables, you must familiarize yourself with the class’s Javadoc or look into the source code to understand its operations.

Example: This FreeMarker gets you the current date, using the default locale, in a specific pattern ( Month/Day/Year, Hour:Minute ):

Understanding the Workflow Notification Template Variables

These are the variables logged when you enable the Single Approver Definition for Blogs Entries, then submit a new entry for publication:

Liferay.com

Capabilities

View All Capabilities

Submit Feedback

IMAGES

  1. Designing a Kaleo Workflow Definition

    liferay workflow scripted assignment

  2. Introduction to Workflow

    liferay workflow scripted assignment

  3. Creating Workflow Tasks

    liferay workflow scripted assignment

  4. How to Build a Simple Workflow in Liferay DXP 7.4

    liferay workflow scripted assignment

  5. Liferay workflow in action

    liferay workflow scripted assignment

  6. Kaleo workflow in Liferay

    liferay workflow scripted assignment

VIDEO

  1. Workflow video

  2. Streamlining Workflow Management with AWS Step Functions

  3. Sofya Helms: 4.01 Assignment: Scripted Speech

  4. Liferay Portal: From Zero to Intranet in 10 Minutes

  5. My Experience Editing the Netflix Series GRISELDA

  6. Fidelity Platform: Asynchronous Python API

COMMENTS

  1. Assigning Task Nodes

    Additionally, you can write a script to define the assignment (see Scripted Assignments). Resource Action Assignments. You can assign a workflow task to a resource action. Resource actions are operations performed by users on an application or entity. For example, a user might have permission to update message boards messages.

  2. Workflow Scripting: Programmatic Task Assignment

    Workflow Scripting: Programmatic Task Assignment. This content is meant to be added as a use case to the 7.2 Workflow Scripting official documentation, but isn't ready to go through the full process an official docs article passes through. In the Category Specific Definition, there's a script in a condition node with logic for determining ...

  3. How can I assign workflow task to multiple users by Scripted Assignment

    How can I assign workflow task to multiple users by Scripted Assignment. Fast Track: This article is part of Liferay's Fast Track publication program, providing a repository of solutions delivered while supporting our customers. In the interest of providing helpful knowledge immediately, these articles may be presented in an unedited form. Fast ...

  4. Workflow Task Nodes

    \n. The above assignment assigns the task to the Administrator role, then checks\nwhether the group of the asset is an Organization. If it is, the Organization\nContent Reviewer role is assigned to it. If it's not, the task is assigned to\nthe Site Content Reviewer role. \n. Note the roles = new ArrayList<Role>(); line above. In a scripted assignment,\nthe roles variable is where you specify ...

  5. Workflow Task Node Reference

    Workflow Task Node Reference Tasks are the part of the workflow where work is done. Tasks must be assigned to users, who review the submitted asset and decide if content from the workflow is acceptable for publication or needs more work. Unlike other workflow nodes, task nodes have assignments, because a user is expected to do something (often approve or reject the submission) when a workflow ...

  6. Creating Workflow Tasks

    Task nodes are often the most complex parts of a workflow definition. They can have Assignments which can assign the task to users or a Resource Action (see Assigning Task Nodes). Task nodes also contain Notifications and Actions-both of which support workflow scripts. See Configuring Workflow Actions and Notifications.

  7. Workflow Designer Overview

    Single Approver Definition with Scripted Assignment; Single Approver Definition; Building Workflows. To build a workflow, ... in My Workflow Tasks). As of Liferay 7.4 U20, the Workflow text that appears in the UI is translatable. To translate the workflow, Open a workflow or add a new one from the Global Menu → Applications → Process ...

  8. Configuring Workflow Actions and Notifications

    Click on the Workflow definition (for example, Single Approver). Click the Update node. Click an existing action or New if there are none currently defined. Enter reject in the Name field. Select On Assignment from the Execution Type dropdown menu. Enter the script in the Template (Groovy) field (it's called the Script field in some

  9. Liferay Portal / News: Workflow Scripting: Programmatic Task Assignment

    WorkflowTaskManager.assignWorkflowTaskToRole assigns the task to a Role by the roleId. Both methods require a long workflowTaskId. Retrieve this from the injected kaleoTaskInstanceToken script variable. java workflowTaskId = kaleoTaskInstanceToken.getKaleoTaskInstanceTokenId(); The script snippet for this looks like this:

  10. Headless Admin Workflow APIs executing groovy scripts for scripted task

    Fast Track: This article is part of Liferay's Fast Track publication program, providing a repository of solutions delivered while supporting our customers. In the interest of providing helpful knowledge immediately, these articles may be presented in an unedited form. Fast Track articles are unverified and users are responsible for verifying how well the information fits with their particular ...

  11. Workflow Scripted Role Assignment

    One workflow task uses groovy scripted assignment to assigns the task to a role. Somehow the action button of the workflow task only shows "Assign to me" icon, without the "Assign to..." icon for assigning to other users in the role. The notification part works fine (all users in the role receive email). Here's my code: <assignments> <scripted ...

  12. workflow

    I have created a workflow using kaleo workflow.In this i am trying to assign a task to multiple users,I used groovy script in scripted assignment tag for this.But its not working .when am putting two userid's in user object,first one gets replaced and second user got the approvel task. also i used users arraylist for this,like roles in kaleo ...

  13. Kaleo workflow scripted assignment..

    My current requirement for the workflow : the content that published by one department should be only assign to content approver within that department... Right now I list out all the assignment to all department content reviewer..

  14. Creating Workflow Tasks

    Creating Workflow Tasks Subscription The default Single Approver Definition offers a simple introduction to workflow tasks. It has only two task nodes: Review and Update. The workflow enters the Review node when a content creator submits an asset for review. In review, the asset can be accepted or rejected. If it's rejected, the process moves to the Update task. The submitter can then modify ...

  15. Assigning User Registration Workflow to an Organization Role in Liferay

    We can now add the following in the scripted assignment of the task to assign it to the organization role even if the workflow definition is not in the organization site: ... Liferay workflow is an efficient way to implement the approval based task to filter out the inappropriate content or users from your site. This blog post was written to ...

  16. RE: Kaleo workflow scripted assignment..

    My current requirement for the workflow : the content that published by one department should be only assign to content approver within that department... Right now I list out all the assignment to all department content reviewer..

  17. Workflow Notification Template Variables

    Liferay 7.3+. Some variables are auto-injected into the workflow notification context. These are handy to use in your workflow notification templates. Normally in Freemarker, you must declare variables explicitly: <#assign variableName = "Variable Name" />. Injected variables are already declared and can be used directly in the template.