07-16-2018 07:41 AM
Hello everybody,
I'm very very very new to Alfresco!
I have been reading different post about how to do a workflow, execution script ....
With the following workflow.js I can execute the workflow correctly but when the document is approved it does not deposit it in the corresponding folder.
I have looked at the tomcat logs and I do not get an error.
Can someone tell me what I'm doing wrong?
Thank you very much!
function startWorkflow(assigneeGroup)
{
var workflow = actions.create("start-workflow");
document.addTag("Pendiente de aprobación");
workflow.parameters.workflowName = "activiti$activitiReviewPooled";
workflow.parameters["bpm:workflowDescription"] = "Ruego revisar y aprobar " + document.name;
workflow.parameters["bpm:groupAssignee"] = people.getGroup( "GROUP_Aprobadores");
var futureDate = new Date();
futureDate.setDate(futureDate.getDate() + 1);
workflow.parameters["bpm:workflowDueDate"] = futureDate;
workflow.parameters["bpm:aproveDestination"] = "/Sitios/productos/documentLibrary/Aprobados";
return workflow.execute(document);
}
function main()
{
var name = document.name;
var siteName = document.siteShortName;
if (siteName == null)
{
if (logger.isLoggingEnabled())
logger.log("Did not start workflow as the document named " + name + " is not located within a site.");
return;
}
var reviewGroup = "GROUP_site_" + siteName;
// make sure the group exists
var group = people.getGroup(reviewGroup);
if (group != null)
{
if (logger.isLoggingEnabled())
logger.log("Starting pooled review and approve workflow for document named " + name + " assigned to group " + reviewGroup);
startWorkflow(group);
if (logger.isLoggingEnabled())
logger.log("Started pooled review and approve workflow for document named " + name + " assigned to group " + reviewGroup);
}
else if (logger.isLoggingEnabled())
{
logger.log("Did not start workflow as the group " + reviewGroup + " could not be found.");
}
}
main();
10-02-2018 04:21 AM
Hi eidan,
have you found a solution for your issue ?
I've raised an issue very similar to your case in this post.
Cheers,
Enrico.
10-09-2018 07:11 PM
Hello.
Where did you get the parameter "bpm:aproveDestination"?
That one does not even exist in the out of the box content model?
Simply adding it will not make the workflow work the way you want to to work.
10-10-2018 06:06 AM
Hi Douglas,
I suppose that parameter has been copied from other examples found around Internet.
Now the point is: how do "folder move on approve" step using out-of-the-box building blocks ?
In case a customization is required, how we can manage this change within standard workflow ?
Any help will be appreciated.
Regards,
Enrico.
10-10-2018 01:01 PM
That is what I thought.
It is not going to work the way you want it to work, and there is nothing you can do within the standard workflows.
In order to achieve the result you need, you will have to create custom workflows to deal with that for you.
You can get all the information you need to develop these custom workflows in the following tutorial: https://ecmarchitect.com/alfresco-developer-series-tutorials/workflow/tutorial/tutorial.html
Explore our Alfresco products with the links below. Use labels to filter content by product module.