cancel
Showing results for 
Search instead for 
Did you mean: 

The workflow doesn' t start

frank83
Champ in-the-making
Champ in-the-making
Hi I have a problem; i would start a Reject & Approve workflow only adding a content in a space. So I have used this code taken in wiki:

var workflow = actions.create("start-workflow"); 

workflow.parameters.workflowName = "jbpm$wf:review";

workflow.parameters["bpm:workflowDescription"] = "The attached documents have been uploaded . Please review within 3 days.";

workflow.parameters["bpm:assignee"] = "admin";

var futureDate = new Date();

futureDate.setDate(futureDate.getDate() + 3);

workflow.parameters["bpm:workflowDueDate"] = futureDate;

workflow.execute(document);

I saved it in DataDictionary/Scripts, then  the rule "Execute script" and so after creating the content in the space, the workflow doesn' start. Why?
I have to install something? An answer please.Sorry the inexperience.
Thanks
13 REPLIES 13

fbehfar
Champ on-the-rise
Champ on-the-rise
Hi Frank,
I don't know what do you mean!
when you create a rule on a space, it works for all of the documents on the particular space, so it will work for every content on that space.

but I think the following link will help you if you wanna attach a file in an email.
http://forums.alfresco.com/viewtopic.php?t=10386

as I have understood from this link,
http://issues.alfresco.com/browse/AWC-1523
it's not easy to start only one workflow on multiple content, or I don't know how, if you found tell me too

hope I got you right and hope it helps,

FSB

frank83
Champ in-the-making
Champ in-the-making
Hi FSB, I installed Alfresco 2.9 with your link, so i' ll try with an e-mail with multiple attachments.
Do you know if there is possible to remove write permission to users in their owner spaces?
I need of a rule(or the admin manually) to this .
For example a user, after having added a specific content in his space,
he will haven' t write permissions in his space.  Thanks again.

Frank

fbehfar
Champ on-the-rise
Champ on-the-rise
hi,
you can do it with the help of the javaScripts. actaully I haven't done such a thing, but I think this link will help you.
http://wiki.alfresco.com/wiki/JavaScript_API#Permission_and_Security_API
I think it would be the same as creating a rule on a space and execute a query. by the way I'm not sure, I'm a beginner too.

could you solve your previous problem, by defining a rule which runs a advanced workflow?

hope it helps
FSB

frank83
Champ in-the-making
Champ in-the-making
With the automatic workflow I can't attach more contents than one, then i have always the same problem about the execution of the script when i add the content that should start the rule.
So i try with the rule(Send e-mail to a specific user)…
Thanks again

Frank