<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>How to implement workflow end-to-end programmatically?</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=105088596" />
  <subtitle>How to implement workflow end-to-end programmatically?</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=105088596</id>
  <updated>2026-04-03T21:35:50Z</updated>
  <dc:date>2026-04-03T21:35:50Z</dc:date>
  <entry>
    <title>RE: How to implement workflow end-to-end programmatically?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105272472" />
    <author>
      <name>Russell Bohl</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105272472</id>
    <updated>2018-03-14T14:33:02Z</updated>
    <published>2018-03-14T14:33:02Z</published>
    <summary type="html">I think the behavior is intended. Organization Admins can&amp;#39;t add users, so why should they be able to approve new user accounts?&lt;br /&gt;&lt;br /&gt;I tested and the same applies to blog entries. An organization admin can only approve blogs if they&amp;#39;re entered in the organization site. Blog entries submitted in the default site do not get sent to the organization admin in the workflow.&lt;br /&gt;&lt;br /&gt;I&amp;#39;ll double check with the engineers, but this is likely not a bug.</summary>
    <dc:creator>Russell Bohl</dc:creator>
    <dc:date>2018-03-14T14:33:02Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to implement workflow end-to-end programmatically?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105235653" />
    <author>
      <name>Vinh Tuyen Lam</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105235653</id>
    <updated>2018-03-13T23:20:33Z</updated>
    <published>2018-03-13T23:20:33Z</published>
    <summary type="html">Hi Russell,&lt;br /&gt;&lt;br /&gt;I know that it would work if I create a regular role as you said. However, that should not the way to go. If it does not work with organization role, it must have been an issue of Liferay.</summary>
    <dc:creator>Vinh Tuyen Lam</dc:creator>
    <dc:date>2018-03-13T23:20:33Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to implement workflow end-to-end programmatically?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105218635" />
    <author>
      <name>Russell Bohl</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105218635</id>
    <updated>2018-03-13T16:59:35Z</updated>
    <published>2018-03-13T16:59:35Z</published>
    <summary type="html">I see. I think the fix is easy: create a regular role, give the role permissions on the User resource, and assign your Organization Admins to this role. Use this new role in the workflow for your assignment and notification. Everything should work fine this way.</summary>
    <dc:creator>Russell Bohl</dc:creator>
    <dc:date>2018-03-13T16:59:35Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to implement workflow end-to-end programmatically?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105205848" />
    <author>
      <name>Vinh Tuyen Lam</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105205848</id>
    <updated>2018-03-13T14:02:43Z</updated>
    <published>2018-03-13T14:02:43Z</published>
    <summary type="html">Good morning Russell,&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;-This makes it sound like you&amp;#39;re sending all new Users through a workflow process, right? So far so good. &lt;/blockquote&gt;&lt;br /&gt;Yes,  that&amp;#39;s right. &lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;I&amp;#39;m having a hard time understanding what your use case is. What User(s) should review the nnewly added User in the workflow task?&lt;/blockquote&gt;&lt;br /&gt;Let me clarify this a bit, what I want is that every new Users need to be reviewed by someone who has a role of Organization Role to get through. I&amp;#39;m setting Task Assignee as following:&lt;br /&gt;- Assignment Type: Role Type&lt;br /&gt;- Role Type: Organization&lt;br /&gt;- Role name: name of any existing organization role&lt;br /&gt;&lt;br /&gt;About the notification, I&amp;#39;m setting as below:&lt;br /&gt;- Notification Type: User Notification&lt;br /&gt;- Execution Type: On Assignment&lt;br /&gt;- Recipient Type: Role Type&lt;br /&gt;- Role Type: Organization&lt;br /&gt;- Role name: name of any existing organization role&lt;br /&gt;&lt;br /&gt;I believe you also will have the same issue, please give it a try and let me know if you do.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;-Why did you need a script to display the task in the reviewer&amp;#39;s My Workflow Tasks portlet.&lt;br /&gt;I think I still have a fundamental misunderstanding about what you&amp;#39;re trying to do.&lt;/blockquote&gt;&lt;br /&gt; As I said, notification is not being sent to the User who is the reviewer of the Task, and this User also doesn&amp;#39;t see any Task in his &amp;#34;My Workflow Tasks&amp;#34;. The script is just a workaround which tries to do the assignment manually, but apparently it&amp;#39;s not working properly.</summary>
    <dc:creator>Vinh Tuyen Lam</dc:creator>
    <dc:date>2018-03-13T14:02:43Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to implement workflow end-to-end programmatically?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105200259" />
    <author>
      <name>Russell Bohl</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105200259</id>
    <updated>2018-03-13T12:37:26Z</updated>
    <published>2018-03-13T12:37:26Z</published>
    <summary type="html">Hi Vinh, I&amp;#39;m glad to help, if I can.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Thank you so much for your response. Actually what I want is that when after you sign up a new account, the workflow should be triggered. Right now the workflow is already triggered as I expect. However I&amp;#39;m facing a couple of issues:&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;This makes it sound like you&amp;#39;re sending all new Users through a workflow process, right? So far so good. &lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;- At the very first step when I set the Assignments (click on a task, double click on Assignments to add its value) to point to an organization role, then there won&amp;#39;t be anything happen, nothing gets assigned to any user having organization role.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;I&amp;#39;m having a hard time understanding what your use case is. What User(s) should review the nnewly added User in the workflow task?&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;- The notification also is not working at the moment for organization role.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Okay, that&amp;#39;s strange. That gives us a clue that something&amp;#39;s not right, assuming you have set the notification properly (I usually set it to Task Assignee without any problems).&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;And then even though the workflow task can be displayed in My Account -&amp;gt; My workflow tasks (this is done by some work around implementing groovy script), when I click on a specific task to view its detail, it&amp;#39;s throwing this error message &amp;#34;You do not have the required permissions.&amp;#34;. I guess I need to define permissions somehow properly to solve this, but not sure how to do it.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Why did you need a script to display the task in the reviewer&amp;#39;s My Workflow Tasks portlet.&lt;br /&gt;I think I still have a fundamental misunderstanding about what you&amp;#39;re trying to do.</summary>
    <dc:creator>Russell Bohl</dc:creator>
    <dc:date>2018-03-13T12:37:26Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to implement workflow end-to-end programmatically?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105176940" />
    <author>
      <name>Vinh Tuyen Lam</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105176940</id>
    <updated>2018-03-12T22:49:51Z</updated>
    <published>2018-03-12T22:49:51Z</published>
    <summary type="html">Hi Russell,&lt;br /&gt;&lt;br /&gt;Thank you so much for your response. Actually what I want is that when after you sign up a new account, the workflow should be triggered. Right now the workflow is already triggered as I expect. However I&amp;#39;m facing a couple of issues:&lt;br /&gt;- At the very first step when I set the Assignments (click on a task, double click on Assignments to add its value) to point to an organization role, then there won&amp;#39;t be anything happen, nothing gets assigned to any user having organization role.&lt;br /&gt;- The notification also is not working at the moment for organization role.&lt;br /&gt;And then even though the workflow task can be displayed in My Account -&amp;gt; My workflow tasks (this is done by some work around implementing groovy script), when I click on a specific task to view its detail, it&amp;#39;s throwing this error message &amp;#34;You do not have the required permissions.&amp;#34;. I guess I need to define permissions somehow properly to solve this, but not sure how to do it.&lt;br /&gt;&lt;br /&gt;If you have any ideas/suggestions, please let me know. Thank you.</summary>
    <dc:creator>Vinh Tuyen Lam</dc:creator>
    <dc:date>2018-03-12T22:49:51Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to implement workflow end-to-end programmatically?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105148684" />
    <author>
      <name>Russell Bohl</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105148684</id>
    <updated>2018-03-12T14:48:36Z</updated>
    <published>2018-03-12T14:48:36Z</published>
    <summary type="html">Maybe you do want to implement workflow programmatically, but I&amp;#39;m not sure you need to. And even if you did, you&amp;#39;d be using Kaleo&amp;#39;s services to do it, so saying&lt;br /&gt;&lt;br /&gt;&lt;div class="quote-title"&gt;Vinh Tuyen Lam:&lt;/div&gt;&lt;blockquote&gt;I&amp;#39;m thinking of an approach to do everything myself so that I can do whatever I want and do not depend on Kaleo.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Wouldn&amp;#39;t be true anyway.&lt;br /&gt;&lt;br /&gt;Let&amp;#39;s see if we can get you what you&amp;#39;re looking for. I&amp;#39;ll start with the first thing you mention:&lt;br /&gt;&lt;br /&gt;&lt;div class="quote-title"&gt;Vinh Tuyen Lam:&lt;/div&gt;&lt;blockquote&gt;Whenever a new user is registered, I want it to invoke my workflow to do some works such as assign a task to user list or role list for their reviews, or reject the user registration if the information is missing, ....&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;So an admin is adding a new user via the Add User form in the control Panel. You want the User entity itself to be run through a workflow? Which information do you want to ensure is entered? Instead of workflow, why not just use validation on the fields you need?&lt;br /&gt;&lt;br /&gt;See if &lt;a href="https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/using-liferays-language-settings#localizing-user-names"&gt; this documentation&lt;/a&gt; helps at all in regards to required name fields. &lt;br /&gt;&lt;br /&gt;Additionally, I think you can turn on front-end validation for whatever field you want in the Add User form by overriding its JSP. &lt;a href="https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/overriding-jsps"&gt;These docs&lt;/a&gt; will get you started in learning about JSP overrides. &lt;a href="https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/forms-and-validation"&gt;These docs will cover the validation tag&lt;/a&gt;.</summary>
    <dc:creator>Russell Bohl</dc:creator>
    <dc:date>2018-03-12T14:48:36Z</dc:date>
  </entry>
  <entry>
    <title>How to implement workflow end-to-end programmatically?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105088595" />
    <author>
      <name>Vinh Tuyen Lam</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105088595</id>
    <updated>2018-03-09T23:06:47Z</updated>
    <published>2018-03-09T23:06:47Z</published>
    <summary type="html">Hi,&lt;br /&gt;&lt;br /&gt;Anyone knows how to implement a workflow end-to-end programmatically? Whenever a new user is registered, I want it to invoke my workflow to do some works such as assign a task to user list or role list for their reviews, or reject the user registration if the information is missing, .... I tried Kaleo Designer to create a workflow like that and apply such workflow to User entity in Workflow Configuration, however there are many limitations doing it that way, e.g:  if I make assignment to organization role, nothing will happen after user registered, as well as no notification sent to users of that organization role. I&amp;#39;m thinking of an approach to do everything myself so that I can do whatever I want and do not depend on Kaleo.&lt;br /&gt;&lt;br /&gt;Any ideas, approaches, helps would be appreciated. Thank you!</summary>
    <dc:creator>Vinh Tuyen Lam</dc:creator>
    <dc:date>2018-03-09T23:06:47Z</dc:date>
  </entry>
</feed>
