11-16-2016 02:35 AM
I am a newcomer in alfrsco, I have the following questions in the process of use
I want to customize a process, when a file into the folder, start the approval process, when all the approval process through after into the folder, rejected not into this folder
11-16-2016 03:57 AM
Please refer to rule and actions http://docs.alfresco.com/5.1/references/rule-actions.html
11-16-2016 05:04 AM
HI
I know this rule, but this rule is too simple, I hope the file into the formulation for examination and approval of personnel, cannot be read without approval document, only approved documents folder
11-16-2016 05:44 AM
you can run your customized JavaScript action or java action in your rule
11-16-2016 09:16 PM
thks
now I can run JS by executing script,but sendEMailNotifications not work Dynamic start-up process is mail function can be used
var workflow = actions.create("start-workflow");
workflow.parameters.workflowName = "activiti$activitiReview";
workflow.parameters["bpm:workflowDescription"] = "Please assign approver for "+ document.name;
workflow.parameters['bpm:assignee']=people.getPerson("username");
workflow.parameters["sendEMailNotifications"] = true;
workflow.execute(document);
Data dictionary already have a start - polled - review - workflow. Js
I put the rule set to execute the script but he won't do anything,
function startWorkflow(assigneeGroup)
{
var workflow = actions.create("start-workflow");
workflow.parameters.workflowName = "activiti$activitiReviewPooled";
workflow.parameters["bpm:workflowDescription"] = "Please review " + document.name;
workflow.parameters["bpm:groupAssignee"] = assigneeGroup;
var futureDate = new Date();
futureDate.setDate(futureDate.getDate() + 7);
workflow.parameters["bpm:workflowDueDate"] = futureDate;
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();
11-17-2016 02:03 AM
try bpm:sendEMailNotifications
11-17-2016 08:55 PM
Still can't receive email notification ,Because I can't write a script, can you help me to write a script, meet after entering folder to start the approval process can enter the folder, because I now use the JS file regardless of process or refusing to file into the folder
11-17-2016 10:31 PM
In order to send email notifications,you also need to configure SMTP properties.
Please refer to https://community.alfresco.com/docs/DOC-4799-outbound-e-mail-configuration
11-21-2016 08:49 PM
I have already configure SMTP properties,I can receive the mail by starting the task process,but Perform the following JS file cannot be received mail
var workflow = actions.create("start-workflow");
workflow.parameters.workflowName = "activiti$activitiReview";
workflow.parameters["bpm:workflowDescription"] = "Please assign approver for "+ document.name;
workflow.parameters['bpm:assignee']=people.getPerson("username");
workflow.parameters["bpm:sendEMailNotifications"] = true;
workflow.execute(document);
11-22-2016 10:47 AM
start-workflow action will not send email,parameter bpm:sendEMailNotifications = true is useless in start-workflow action ,it is only used when a task is created.
You can try to execute an mail action in your javascript code
var mail = actions.create('mail');
mail.parameters.to = '';
mail.parameters.subject = 'Hello from JavaScript'
mail.execute(document);
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.