Fórum

Document and Media Workflow

Rajkumar Jeganathan, modificado 9 Anos atrás.

Document and Media Workflow

New Member Postagens: 4 Data de Entrada: 11/08/14 Postagens Recentes
Hi Liferay users,

I am a newbie to liferay. My requirement is to upload documents in document and media with multi-approver workflow. I succeeded in uploading and updating documents using DLAppLocalServiceUtil but when I create a workflow in GUI and upload the documents programmatically I am getting stackoverflow exception. So I guess workflow has to be created programmatically. Anyone please help me in creating workflow for document and media programmatically. Or if there is any workaround please help me with it. i am badly need of help emoticon. Thanks in advance.
thumbnail
Jignesh Vachhani, modificado 9 Anos atrás.

RE: Document and Media Workflow

Liferay Master Postagens: 803 Data de Entrada: 10/03/08 Postagens Recentes
Hi Raj

Best way to implement workflow in DL is, use kaleo workflow web plugin to easily integrate. You can download it from market place and can deploy and follow steps mentioned in wiki article.
Rajkumar Jeganathan, modificado 9 Anos atrás.

RE: Document and Media Workflow

New Member Postagens: 4 Data de Entrada: 11/08/14 Postagens Recentes
First thanks for the response. And yup I used Kaleo workflow but when I enabled workflow in GUI and upload the file programmatically, it throws stackoverflow error. I have a workaround like if I use
serviceContext.setWorkflowAction(WorkflowConstants.ACTION_SAVE_DRAFT); then I can upload file without stackoverflow error but still I can upload file as a draft. By this I was forced to edit everytime and publish again to start the workflow in document and media. I tried with serviceContext.setWorkflowAction(WorkflowConstants.ACTION_PUBLISH); and serviceContext.setWorkflowAction(WorkflowConstants.STATUS_PENDING); but still i get stackoverflow error.

Is there any way to start the document and media workflow while uploading file?
Rajkumar Jeganathan, modificado 9 Anos atrás.

RE: Document and Media Workflow

New Member Postagens: 4 Data de Entrada: 11/08/14 Postagens Recentes
Now I got pending status somehow by using
Map<String, Serializable> workflowContext = new HashMap<String, Serializable>();
workflowContext.put("event",DLSyncConstants.EVENT_CHECK_IN);

DLFileEntry dlentry = DLFileEntryLocalServiceUtil.updateStatus(userId, fileEntry.getFileVersion().getFileVersionId(), WorkflowConstants.ACTION_PUBLISH, workflowContext, serviceContext);


But still I need to Edit -> Save and Checkin to start the workflow.


Can someone help me?