Workflow Tasks RSS Feed

6 views
Skip to first unread message

Nathan Keiter

unread,
Mar 12, 2021, 10:15:04 AM3/12/21
to dot...@googlegroups.com
I've had a request to create a workflow tasks RSS feed.


Has anyone done this before? Is there anything built-in I can leverage? Maybe a workflow REST API?

Nathan I. Keiter | Lead Network Applications Programmer | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993
https://www.gettysburg.edu<https://www.gettysburg.edu/>

Mark Pitely

unread,
Mar 12, 2021, 10:41:02 AM3/12/21
to dot...@googlegroups.com
The best idea I could come up with is to add a step to the appropriate workflows and use custom code to make a content entry which can be pulled for your RSS.
Maybe add a final step in the Workflow to delete/mark that content entry? (create on assign, delete on complete). I'd just let them live and clean them out, it would give you a sort of reporting option.
Looks like the Task List is populated via ajax, so you can't do a sneaky login to get the user's tasks without using something like Puppeteer.
I bet there's an internal way that the ajax is populated and you could spy on it...but that would be both hard and flaky.

Mark Pitely
Marywood University

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/1615562101064.14984%40gettysburg.edu.

Nathan Keiter

unread,
Mar 12, 2021, 10:53:03 AM3/12/21
to dot...@googlegroups.com
Thanks for the tip. I probably need to write a plugin.


I could maybe reverse engineer the JSP for the feed I want.


/html/portlet/ext/workflows/view_tasks_list.jsp?r=942594432&keywords=&assignedTo=233821a5-b7c3-42f4-8ddd-8dc4a54aca3a&assignedto=on&assignedto=on&daysold=&schemeId=71595f4b-6e1f-429d-a2e8-6b45f541305f&stepId=755df36a-9b0c-456d-9e5e-cc2226a8f7e2&open=true&closed=false&filterButton=&resetButton=&show4all=true

Nathan I. Keiter | Lead Network Applications Programmer | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993
https://www.gettysburg.edu<https://www.gettysburg.edu/>
________________________________
From: dot...@googlegroups.com <dot...@googlegroups.com> on behalf of Mark Pitely <pit...@maryu.marywood.edu>
Sent: Friday, March 12, 2021 10:40 AM
To: dot...@googlegroups.com
Subject: Re: [dotcms] Workflow Tasks RSS Feed

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
________________________________
The best idea I could come up with is to add a step to the appropriate workflows and use custom code to make a content entry which can be pulled for your RSS.
Maybe add a final step in the Workflow to delete/mark that content entry? (create on assign, delete on complete). I'd just let them live and clean them out, it would give you a sort of reporting option.
Looks like the Task List is populated via ajax, so you can't do a sneaky login to get the user's tasks without using something like Puppeteer.
I bet there's an internal way that the ajax is populated and you could spy on it...but that would be both hard and flaky.

Mark Pitely
Marywood University

On Fri, Mar 12, 2021 at 10:15 AM 'Nathan Keiter' via dotCMS User Group <dot...@googlegroups.com<mailto:dot...@googlegroups.com>> wrote:
I've had a request to create a workflow tasks RSS feed.


Has anyone done this before? Is there anything built-in I can leverage? Maybe a workflow REST API?

Nathan I. Keiter | Lead Network Applications Programmer | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993
https://www.gettysburg.edu<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.gettysburg.edu&c=E,1,8Xk2c2bDdKbVtbDZ7qCW9r3cYMR-PI4KUIlJTg7R2PP4nHSMZ0UL3GWqAVyijvScIf_n9ooli0aA-uVFybkpvlKimrUsegbut1SUc8HtLsVlhdld&typo=1><https://www.gettysburg.edu/<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.gettysburg.edu%2f&c=E,1,4hVaucCODs-KOM643YgwRxTvs40-hKYkD-JygvB-otLqvcKTk7UV8L8wsiH-iEhu8lZ32HWiTmtplR3hFrV54xymD5f7lDdHZktVpdJnPBoKTyZi2A,,&typo=1>>

--
http://dotcms.com<https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fdotcms.com&c=E,1,gXAzKuPF1ChW2FZ8bOK-c6-hsKpZaCmlEJV8RwA4BYSU_xwzBuh-_jslEWXwJdhQvl5AzzaS_BOLm2t17SuDE7UR1mG7b2CN8U_kSbHSdJxBR-eAUNCh&typo=1> - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+un...@googlegroups.com<mailto:dotcms%2Bunsu...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/1615562101064.14984%40gettysburg.edu<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fgroups.google.com%2fd%2fmsgid%2fdotcms%2f1615562101064.14984%2540gettysburg.edu&c=E,1,If1MUg59yjMyANuR4WfbHTFIRGjVqvYAz_8--IYqR-cBGXYu4jPd13hPrChqNuCf3ula4Zxws9kJz02EL9yurPTP1Fxo4usxuSW_-c1AhKExF8q2hg,,&typo=1>.

--
http://dotcms.com<https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fdotcms.com&c=E,1,KDiaolWncXL7x9l7zUAdFXRFcAB6L5970hxtZaBjNwGt1N1qlAqBSuNXhwvlaoRGJ9AqV_E3ZnmE8Gb0CaBMYEpcYe4lbO5mMqnq65sZ&typo=1> - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+un...@googlegroups.com<mailto:dotcms+un...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CAFeiKqNBfkvO4EHWksVoOoTGP3fFb9K6kW_KcBxPpH3FGpv5Qg%40mail.gmail.com<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fgroups.google.com%2fd%2fmsgid%2fdotcms%2fCAFeiKqNBfkvO4EHWksVoOoTGP3fFb9K6kW_KcBxPpH3FGpv5Qg%2540mail.gmail.com%3futm_medium%3demail%26utm_source%3dfooter&c=E,1,Fa2TtjRzZSUud1BLicW-IYp29C7f12ia0uhg__7N0CMciVSrqXZ0WmAzCppWi2nURythkSsllOIkIoCgHZebv_xEKoa0oaKSeTAmRCvAgp2SwmILBiR_&typo=1>.

jonathan...@dotcms.com

unread,
Mar 12, 2021, 2:45:30 PM3/12/21
to dotCMS User Group
Hi,

I think you may want to create an OSGI plugin that basically include a Rest Endpoint that basically uses the WorkflowSearcher, something like (I just coded here not sure if works but it is the idea)
```
@GET
@Path("/tasks")
@JSONP
@NoCache
@Produces({MediaType.APPLICATION_JSON, "application/javascript"})
public final Response findTasks(
@Context final HttpServletRequest request,
@Context final HttpServletResponse response,
@QueryParam("schemeId") final String schemeId,
@QueryParam("assignedTo") final String assignedTo,
@QueryParam("keywords") final String keywords,
@QueryParam("orderBy") final String orderBy,
@QueryParam("page") final String page,
@QueryParam("count") final String count) throws DotDataException {

final InitDataObject initDataObject = this.webResource.init
(null, request, response, true, null);

Logger.debug(this.getClass().getName(),"Getting the workflow tasks");

final Map<String, Object> newMap = new HashMap<>();
newMap.putAll(request.getParameterMap());
final WorkflowSearcher searcher = new WorkflowSearcher(newMap, initDataObject.getUser());

return Response.ok(new ResponseEntityView(searcher.findTasks()))
.build(); // 200

} // findTasks.
```

Nathan Keiter

unread,
Mar 12, 2021, 2:48:21 PM3/12/21
to dot...@googlegroups.com
Thanks Jonathan.

Nathan I. Keiter | Lead Network Applications Programmer | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993
https://www.gettysburg.edu<https://www.gettysburg.edu/>
________________________________
From: dot...@googlegroups.com <dot...@googlegroups.com> on behalf of jonathan...@dotcms.com <jonathan...@dotcms.com>
Sent: Friday, March 12, 2021 2:45 PM
To: dotCMS User Group
Subject: Re: [dotcms] Workflow Tasks RSS Feed

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
________________________________
Phone: 717.337.6993<tel:(717)%20337-6993>
https://www.gettysburg.edu<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.gettysburg.edu&c=E,1,vPXBqof4uz0q5ac2Krb0a6tXyrk2JJHY_xGQ45xr8-8TphZrENvlp9OUc84OvLLOcXhtDy_K2Du_RSZlcmY_J1DKefzvspRKe6SAKyDVRLZtpHBk1gtKMPuv8mo,&typo=1><https://www.gettysburg.edu/<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.gettysburg.edu%2f&c=E,1,YWNs1kI9i15Oenq0SioGJlt2i_eiIZ7u6f7js8GmUYQVeBw6BMHRViMK88qqD2cuIrPe8Aqghpl-3La7BYPeA0owEhLMHlif6J-i9kY0&typo=1>>
________________________________
From: dot...@googlegroups.com <dot...@googlegroups.com> on behalf of Mark Pitely <pit...@maryu.marywood.edu>
Sent: Friday, March 12, 2021 10:40 AM
To: dot...@googlegroups.com
Subject: Re: [dotcms] Workflow Tasks RSS Feed

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
________________________________
The best idea I could come up with is to add a step to the appropriate workflows and use custom code to make a content entry which can be pulled for your RSS.
Maybe add a final step in the Workflow to delete/mark that content entry? (create on assign, delete on complete). I'd just let them live and clean them out, it would give you a sort of reporting option.
Looks like the Task List is populated via ajax, so you can't do a sneaky login to get the user's tasks without using something like Puppeteer.
I bet there's an internal way that the ajax is populated and you could spy on it...but that would be both hard and flaky.

Mark Pitely
Marywood University

On Fri, Mar 12, 2021 at 10:15 AM 'Nathan Keiter' via dotCMS User Group <dot...@googlegroups.com<mailto:dot...@googlegroups.com>> wrote:
I've had a request to create a workflow tasks RSS feed.


Has anyone done this before? Is there anything built-in I can leverage? Maybe a workflow REST API?

Nathan I. Keiter | Lead Network Applications Programmer | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993<tel:(717)%20337-6993>
https://www.gettysburg.edu<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.gettysburg.edu&c=E,1,I7S7oe_jhdJ8j32XS0AfdkDeiC2-RtI-pbNA5t-bG0ItcrIa9j7DN_4yAWVp0zmiY-I-rNBaj2ipyrToDqflvyuicUq6jFy7figCRLkRdjUUpEl5&typo=1><https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.gettysburg.edu&c=E,1,8Xk2c2bDdKbVtbDZ7qCW9r3cYMR-PI4KUIlJTg7R2PP4nHSMZ0UL3GWqAVyijvScIf_n9ooli0aA-uVFybkpvlKimrUsegbut1SUc8HtLsVlhdld&typo=1><https://www.gettysburg.edu/<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.gettysburg.edu%2f&c=E,1,Q91ked8ssED4Q9Ip07vaAdCD3djCl75-nnpQC56H8QOSS7HoyZtLyX0G8l9gIKdGtz3xRvSe31_crK9HunOaOgn90gHkeK4vY24QpTHCw1ufbheFy8bAT_abkDo,&typo=1><https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.gettysburg.edu%2f&c=E,1,4hVaucCODs-KOM643YgwRxTvs40-hKYkD-JygvB-otLqvcKTk7UV8L8wsiH-iEhu8lZ32HWiTmtplR3hFrV54xymD5f7lDdHZktVpdJnPBoKTyZi2A,,&typo=1>>

--
http://dotcms.com<https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fdotcms.com&c=E,1,3jxVZrHkhFUeb-gtycYplRTT3rBcpiit8eyb-9dwmNynctXRAXZSVg0sjBhB-4wbGkoUnl9xh6dy8AfUQaA-6unF-G2EFVu5VabnpBprzw,,&typo=1><https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fdotcms.com&c=E,1,gXAzKuPF1ChW2FZ8bOK-c6-hsKpZaCmlEJV8RwA4BYSU_xwzBuh-_jslEWXwJdhQvl5AzzaS_BOLm2t17SuDE7UR1mG7b2CN8U_kSbHSdJxBR-eAUNCh&typo=1> - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+un...@googlegroups.com<mailto:dotcms%2Bunsu...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/1615562101064.14984%40gettysburg.edu<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fgroups.google.com%2fd%2fmsgid%2fdotcms%2f1615562101064.14984%2540gettysburg.edu&c=E,1,-J6AQ2BHpKbyDzT0-cLOjRuvPh9n2O_JHh71k9lI5O5nF3FUee2cxUcLg6dPYhyaWCuMvseuS3ls7Ggy_8eGqK125Bor7GWO-gukrRtlQjJ2KvxXDsBgyB6a&typo=1><https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fgroups.google.com%2fd%2fmsgid%2fdotcms%2f1615562101064.14984%2540gettysburg.edu&c=E,1,If1MUg59yjMyANuR4WfbHTFIRGjVqvYAz_8--IYqR-cBGXYu4jPd13hPrChqNuCf3ula4Zxws9kJz02EL9yurPTP1Fxo4usxuSW_-c1AhKExF8q2hg,,&typo=1>.

--
http://dotcms.com<https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fdotcms.com&c=E,1,hIfbgDEggCI_DqsOz-o3VMH4Sp9Jl2QD0D1CNdUCYAmYAcfFudrjWkXoZ3GK3EOIGGFDnGwwl6yF6l0A6TeAD1Ue8NvfChVeRuQrivl2TtkBu4Y,&typo=1><https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fdotcms.com&c=E,1,KDiaolWncXL7x9l7zUAdFXRFcAB6L5970hxtZaBjNwGt1N1qlAqBSuNXhwvlaoRGJ9AqV_E3ZnmE8Gb0CaBMYEpcYe4lbO5mMqnq65sZ&typo=1> - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+un...@googlegroups.com<mailto:dotcms+un...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CAFeiKqNBfkvO4EHWksVoOoTGP3fFb9K6kW_KcBxPpH3FGpv5Qg%40mail.gmail.com<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fgroups.google.com%2fd%2fmsgid%2fdotcms%2fCAFeiKqNBfkvO4EHWksVoOoTGP3fFb9K6kW_KcBxPpH3FGpv5Qg%2540mail.gmail.com&c=E,1,oYi67xn7oPIHg7VknVW_GEProZEYtxfNf3OeHfGyv8p3sihsyGrJOcKqS_95-TRnHUI5x38Voil_A_Ef5EdMVE9HXb4Kj96sR7F0Df1K&typo=1><https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fgroups.google.com%2fd%2fmsgid%2fdotcms%2fCAFeiKqNBfkvO4EHWksVoOoTGP3fFb9K6kW_KcBxPpH3FGpv5Qg%2540mail.gmail.com%3futm_medium%3demail%26utm_source%3dfooter&c=E,1,Fa2TtjRzZSUud1BLicW-IYp29C7f12ia0uhg__7N0CMciVSrqXZ0WmAzCppWi2nURythkSsllOIkIoCgHZebv_xEKoa0oaKSeTAmRCvAgp2SwmILBiR_&typo=1>.

--
http://dotcms.com<https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fdotcms.com&c=E,1,2BhtLqOScxrq4BmFQgTkldBrxCqi1YoqIfAQvo-pHN_iIycEFZWDcDjkFiyLgtuzfYfIwv3xzg-rRqqrxOILUKXCV64ywBE9bb4to7rqiw,,&typo=1> - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+un...@googlegroups.com<mailto:dotcms+un...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/b4418850-efe7-4cba-b38a-14ecc52bf192n%40googlegroups.com<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fgroups.google.com%2fd%2fmsgid%2fdotcms%2fb4418850-efe7-4cba-b38a-14ecc52bf192n%2540googlegroups.com%3futm_medium%3demail%26utm_source%3dfooter&c=E,1,DUQZvmIcPWUsKQMJx8yWDBucYpf6kDq2marNs5zO-LAO9sCVk2iKjSq-uVyrS3YQ0CSIX9CzPWYrMHI9QlPNEOh-jJ2FvEFI6H-NqVQ4AReERIYxcWHI-b31Mdct&typo=1>.
Reply all
Reply to author
Forward
0 new messages