Custom scheduleActivationWorkflow issue | Community
Skip to main content
Level 2
November 15, 2023
Solved

Custom scheduleActivationWorkflow issue

  • November 15, 2023
  • 1 reply
  • 764 views

Hi All,

We have created custom scheduleActivationWorkflow by copying the existing scheduleActivationWorkflow.

We customized the manage publication wizard to show our workflow when we schedue activation.

This workflow works fine, we are able to schedule the activation time.

Issue - It is not showing the below message when a page is subjected to our custom scheduled activation workflow.

OOTB Workflow:

Custom Workflow

This is not showing the Publication Pending message, but the functionality works fine.

@Vijayalakshmi_S  @arunpatidar @Suraj_Kamdi 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by aanchal-sikka

Hello @vanitha_duraisamy 

 

Please refer to /libs/cq/gui/components/coral/admin/page/columnpreview/columnpreview.jsp

This file returns the html which renders the information about the page.

 

List<Workflow> scheduledWorkflows = PublicationStatusUtils.getScheduledWorkflows(workflowStatus); if (scheduledWorkflows.size() > 0) { List<PublicationStatusUtils.ScheduledStatus> scheduledStatusPublish = PublicationStatusUtils.getScheduledStatus(scheduledWorkflows, resourceResolver, AGENT_ID_PUBLISH); if (scheduledStatusPublish.size() > 0) { %><coral-columnview-preview-label>&nbsp;</coral-columnview-preview-label><% %><coral-columnview-preview-value><br><% for (PublicationStatusUtils.ScheduledStatus sInfo : scheduledStatusPublish) { %><%= xssAPI.encodeForHTML(i18n.get(sInfo.isPublishPending() ? "Publication Pending":"Un-publication Pending")) %><br><% %><%= i18n.get("Version") %>: <%= xssAPI.encodeForHTML(sInfo.getVersion()) %><br><% OffsetDateTime odt = sInfo.getOffsetDateTime(); if (odt != null) { %><%= i18n.get("Scheduled") %>: <foundation-time value="<%= xssAPI.encodeForHTMLAttr(odt.toString()) %>" format="short" type="datetime"></foundation-time><br><% } %>(<%= xssAPI.encodeForHTML(sInfo.getAuthorizableName()) %>)<br><% } %></coral-columnview-preview-value><% } }

 You would need to explore "PublicationStatusUtils.getScheduledWorkflows" API or customize the JSP to get the desired results

1 reply

aanchal-sikka
Community Advisor
aanchal-sikkaCommunity AdvisorAccepted solution
Community Advisor
November 15, 2023

Hello @vanitha_duraisamy 

 

Please refer to /libs/cq/gui/components/coral/admin/page/columnpreview/columnpreview.jsp

This file returns the html which renders the information about the page.

 

List<Workflow> scheduledWorkflows = PublicationStatusUtils.getScheduledWorkflows(workflowStatus); if (scheduledWorkflows.size() > 0) { List<PublicationStatusUtils.ScheduledStatus> scheduledStatusPublish = PublicationStatusUtils.getScheduledStatus(scheduledWorkflows, resourceResolver, AGENT_ID_PUBLISH); if (scheduledStatusPublish.size() > 0) { %><coral-columnview-preview-label>&nbsp;</coral-columnview-preview-label><% %><coral-columnview-preview-value><br><% for (PublicationStatusUtils.ScheduledStatus sInfo : scheduledStatusPublish) { %><%= xssAPI.encodeForHTML(i18n.get(sInfo.isPublishPending() ? "Publication Pending":"Un-publication Pending")) %><br><% %><%= i18n.get("Version") %>: <%= xssAPI.encodeForHTML(sInfo.getVersion()) %><br><% OffsetDateTime odt = sInfo.getOffsetDateTime(); if (odt != null) { %><%= i18n.get("Scheduled") %>: <foundation-time value="<%= xssAPI.encodeForHTMLAttr(odt.toString()) %>" format="short" type="datetime"></foundation-time><br><% } %>(<%= xssAPI.encodeForHTML(sInfo.getAuthorizableName()) %>)<br><% } %></coral-columnview-preview-value><% } }

 You would need to explore "PublicationStatusUtils.getScheduledWorkflows" API or customize the JSP to get the desired results

Aanchal Sikka
Level 2
November 16, 2023

Hi @aanchal-sikka

I don't find this package in uber jar 6.5

com.adobe.cq.ui.commons.admin.views.PublicationStatusUtils

It is there for 6.3 uber jar versions only.

https://jar-download.com/artifacts/com.adobe.aem/uber-jar/6.3.3/source-code/com/adobe/cq/ui/commons/admin/views/PublicationStatusUtils.java

So I couldn't extend this class in our site.