Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: How can I send a "Publish Request" programmatically?
Hey!
I was trying to create a button that updates the content of a JournalArticle, with status = 1 (pending) and send a publication request to the administrator of the portal. I'm trying to use workflow but I don't get results :(
Can anyone helps me?
Why don't you share what you have so far? It might be something that can be spotted within the workflow.
Describe what you do, what you expect and what you observe (and where the difference is). That might make it easier to point to the problem, rather than posting a whole new solution from scratch that might (or might not) fit your environment.
Hey! I finally discovered that this line solves everything:
WorkflowHandlerRegistryUtil.startWorkflowInstance(themeDisplay.getCompanyId(), newEntry.getGroupId(), themeDisplay.getUserId(), JournalArticle.class.getName(), newEntry.getId(), newEntry, serviceContext);
But, anyways, thank you very much! I was trying to create an entry in the table WorkflowInstanceLink and I encountered some problems with Kaleo, but with this line of code all entries are generated and there is no problem :)
Powered by Liferay™