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();
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.
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.
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.
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
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.