cancel
Showing results for 
Search instead for 
Did you mean: 

how to star a workflow automatically?

roseta
Champ in-the-making
Champ in-the-making
I would like to perform a workflow that does the following:

When a new document is created in a folder, it asigns itself to a user, without user interaction, just by creating that docuement in that folder the workflow should start itself. How can I do it? (I'm just using xlm files to perform my workflows)

(I think that could be a very common question in your forum, but if a search for it with a few words, the words are too common for searching… and if i make a whole sentence: No suitable matches were found.) Can anyone help me please??? Thanks in advance!

Regards,
Roseta
3 REPLIES 3

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
You should create rule to execute javascript file.

javascript file
var workflow = actions.create("start-workflow");
workflow.parameters.workflowName = "jbpm$wf:review";
workflow.parameters["bpm:workflowDescription"] = "Revision de documento.";
workflow.parameters["bpm:assignee"] = "p.user";
workflow.parameters["bpm:aproveDestination"] = "THEINIT/CLIENTES/APROBADOS";
workflow.execute(document);
hopw it helps.

roseta
Champ in-the-making
Champ in-the-making
Thank you so much Savic! In fact, I guessed so… but, could you please give me some clues or any link where I can read or deduce how to create simple rules? I've searched in the wiki… Is it releated with custom actions?

savic_prvoslav
Champ on-the-rise
Champ on-the-rise