Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Pedro Bezunartea López
temporarily disable workflow notifications. Massive content update
September 27, 2012 3:23 AM
Answer

Pedro Bezunartea López

Rank: Junior Member

Posts: 38

Join Date: July 10, 2005

Recent Posts

Hi,

I'm using lr-CE-6.1 for, among other things, content management. I need to update a lot of content at once and I'd like to temporarily disable email workflow notifications. Is it possible? I'd like to keep the history of the changes on the content, but this is not necessary, disabling notifications is.

The only solution I've come up with so far is: disable the workflow altogether for the content; apply the changes, and enabling it again after the update. But the history of the changes would be lost, wouldn't it?

TIA,

Pedro.
Jose Jimenez
RE: temporarily disable workflow notifications. Massive content update
September 27, 2012 3:22 PM
Answer

Jose Jimenez

LIFERAY STAFF

Rank: Regular Member

Posts: 151

Join Date: August 22, 2012

Recent Posts

Hi Pedro,

Take a look into the portal.properties and look for the string "email notification settings", you can disable differents notifications types with a portal-ext.properties, in particular journal related notifications.

Kind regards!
Pedro Bezunartea López
RE: temporarily disable workflow notifications. Massive content update
September 28, 2012 1:21 AM
Answer

Pedro Bezunartea López

Rank: Junior Member

Posts: 38

Join Date: July 10, 2005

Recent Posts

Jose A. Jiménez:

Take a look into the portal.properties and look for the string "email notification settings", you can disable differents notifications types with a portal-ext.properties, in particular journal related notifications.


Thank you Jose!

I probably wasn't clear enough with the requirements... Changing the portal-ext.properties implies restarting the service, doesn't it? The thing is, this is a corporate hosted site, and it's not possible to do this on demand. I probably need a control-panel setting that can be changed on the fly, while the system is running.

Kind regards,

Pedro.
Jose Jimenez
RE: temporarily disable workflow notifications. Massive content update
September 28, 2012 2:56 AM
Answer

Jose Jimenez

LIFERAY STAFF

Rank: Regular Member

Posts: 151

Join Date: August 22, 2012

Recent Posts

Hi again,
You can modify this configuration from Control Panel -> Web Content -> Configuration (icon on the top-right)
Regards,
Pedro Bezunartea López
RE: temporarily disable workflow notifications. Massive content update
October 2, 2012 1:32 AM
Answer

Pedro Bezunartea López

Rank: Junior Member

Posts: 38

Join Date: July 10, 2005

Recent Posts

Thanks Jose!

Pedro.
Ram A
RE: temporarily disable workflow notifications. Massive content update
February 8, 2013 1:12 AM
Answer

Ram A

Rank: Junior Member

Posts: 76

Join Date: January 16, 2013

Recent Posts

Jose Jiménez:
Hi Pedro,

Take a look into the portal.properties and look for the string "email notification settings", you can disable differents notifications types with a portal-ext.properties, in particular journal related notifications.

Kind regards!



Hi Jose,

I am using liferay 6.0.6.

When i created/updated a webcontent,it is trying to send a mail notification the people who are having Admin rights in the portal.
Can you please help me how to disable the sending of email notification when content is created in journal articles.

Which property i have to add portal-ext.properties file to stop the sending mail notoifications?


Thanks in advance
Ram
Siby Mathew
RE: temporarily disable workflow notifications. Massive content update
February 11, 2013 5:01 AM
Answer

Siby Mathew

Rank: Expert

Posts: 267

Join Date: March 4, 2011

Recent Posts

Hi Ram,
If you have the portal source, open portal.properties.
There are many properties in the email notification settings for the journal section. Try to override some of these.
It starts from this property : "journal.email.article.added.enabled"

HTH

Thanks,
Siby
Ram A
RE: temporarily disable workflow notifications. Massive content update
February 11, 2013 6:14 AM
Answer

Ram A

Rank: Junior Member

Posts: 76

Join Date: January 16, 2013

Recent Posts

Siby Mathew:
Hi Ram,
If you have the portal source, open portal.properties.
There are many properties in the email notification settings for the journal section. Try to override some of these.
It starts from this property : "journal.email.article.added.enabled"

HTH

Thanks,
Siby


Thanks Suby for the reply.
Can we put this property in portal-ext.properties file.Because i am not able find the portal.properties file in my source except under kaleo-web\WEB-INF\.


Thanks in advance
Ram A
Siby Mathew
RE: temporarily disable workflow notifications. Massive content update
February 11, 2013 6:28 AM
Answer

Siby Mathew

Rank: Expert

Posts: 267

Join Date: March 4, 2011

Recent Posts

Hi Ram,
I am talking about the liferay source code.
Liferay source code has a portal.properties with 100s of properties. We are overriding this using our own portal-ext.properties.
You can create a portal-ext.properties with the properties you want to override and keep it in the same level as deploy folder.

Thanks,
Siby
Ram A
RE: temporarily disable workflow notifications. Massive content update
February 13, 2013 3:19 AM
Answer

Ram A

Rank: Junior Member

Posts: 76

Join Date: January 16, 2013

Recent Posts

Siby Mathew:
Hi Ram,
I am talking about the liferay source code.
Liferay source code has a portal.properties with 100s of properties. We are overriding this using our own portal-ext.properties.
You can create a portal-ext.properties with the properties you want to override and keep it in the same level as deploy folder.

Thanks,
Siby


Hi Siby ,

Thanks for reply.
i added the below properties in portal-ext.properties file.

pop.server.notifications.enabled=false
journal.email.article.added.enabled=false
journal.email.article.approval.granted.enabled=false
journal.email.article.approval.requested.enabled=false
journal.email.article.updated.enabled=false


But still it is trying to send a mail after content is created and as server is not configured it is giving the below error.
Failed to connect to a valid mail server. Please make sure one is properly configured. Could not connect to SMTP host: localhost, port: 25
The code for our custom portlet is given below.

public void create(ActionRequest actionRequest, ActionResponse actionResponse){

try{
String title = actionRequest.getParameter("title");
String description = actionRequest.getParameter("description");
String content = actionRequest.getParameter("content");
String approve = actionRequest.getParameter("approve");
//aprove is fixed to 'true'
if(approve != null && approve.equals("true")){
JournalArticle journal = createJournal(actionRequest, title, description, content, "general", Boolean.TRUE);
try{
String id = actionRequest.getWindowID();
ThemeDisplay themeDisplay= (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
Layout layout = themeDisplay.getLayout();
List<FixedContent> value = new FixedContentController().getFixedDocsByPortletCodeAndContent(actionRequest.getWindowID(), 1);
new FixedContentController().deleteContent(value);
new FixedContentController().addFixedContent(id, 1, 0, Long.valueOf(journal.getId()).intValue() , layout.getPlid());
//if already existed delete that one and created new one
}catch (Exception e) {
sLog.error("failed to create document,",e);
}

}else{
createJournal(actionRequest, title, description, content, "general", Boolean.FALSE);
}
}catch (Exception e) {
sLog.error("failed to create document,",e);
}


CretaeJournal method is as follows.


public JournalArticle createJournal(PortletRequest request, String title,
String description, String content, String type, Boolean AUTOAPPROVE)
throws PortalException, SystemException,
UnsupportedEncodingException {

ThemeDisplay themeDisplay = (ThemeDisplay) request
.getAttribute(WebKeys.THEME_DISPLAY);
long groupId = themeDisplay.getLayout().getGroupId();


Long userID = new Long(0);
userID = PortalUtil.getUser(request).getUserId();

DateTime dateTime = new DateTime();

ServiceContext serviceContext = ServiceContextFactory.getInstance(JournalArticle.class.getName(), request);

if (!AUTOAPPROVE) {
serviceContext.setWorkflowAction(WorkflowConstants.STATUS_PENDING);
}
sLog.info("after auto approve");
System.out.println("after auto approve");
String[] types = JournalArticleConstants.TYPES;
Boolean found = Boolean.FALSE;

for (String choice : types) {
if (choice.equals(type.toLowerCase())) {
found = Boolean.TRUE;
type = choice;
}
}
if (found == Boolean.FALSE) {
type = "general";
}

JournalArticle journalArticle = JournalArticleLocalServiceUtil
.addArticle(userID, groupId, "", true, 1.0, title, description,
content, type, "", "", dateTime.getMonthOfYear() - 1,
dateTime.getDayOfMonth(), dateTime.getYear(), dateTime
.getHourOfDay(), dateTime.getMinuteOfHour(), 0,
0, 0, 0, 0, true, dateTime.getMonthOfYear() - 1,
dateTime.getDayOfMonth(), dateTime.getYear(), dateTime
.getHourOfDay(), dateTime.getMinuteOfHour(),
false, true, false, "", null, null, URLEncoder.encode(
UUID.randomUUID().toString(), "UTF-8"),
serviceContext);

if (AUTOAPPROVE) {
ServiceContext approveContext = ServiceContextFactory.getInstance(
JournalArticle.class.getName(), request);
approveContext.setWorkflowAction(WorkflowConstants.ACTION_PUBLISH);
JournalArticleLocalServiceUtil.updateStatus(
journalArticle.getUserId(), journalArticle,
WorkflowConstants.STATUS_APPROVED,
URLEncoder.encode(UUID.randomUUID().toString(), "UTF-8"),
approveContext);
}

return journalArticle;
}

I have to stop the sending of mail notification .If we configure the mail server it will send mail . as i don't need that one i have to stop this mail sending .

Can anybody help me please.

Thanks in advance
Ram A
gnp present
RE: temporarily disable workflow notifications. Massive content update
February 11, 2015 2:36 AM
Answer

gnp present

Rank: Junior Member

Posts: 37

Join Date: June 8, 2010

Recent Posts

Hi Sir

how can disable emails from "Liferay Portal Workflow Notifications” from no-reply@liferay.com ? or how change the names ("Liferay portal “ and no-"reply@liferay.com” adress) ?

i use Liferay 6.2 GA3