cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow initiation

peadair
Champ in-the-making
Champ in-the-making
Hi,
    I am new to Alfresco ( < 2 weeks ) and am hoping I can get some tips. I want to initiate a workflow on creation of a document - i.e. the workflow selection window will be bypassed - instead the workflow associated with the item ( in our case a custom data list ) will be launched in a start state.

   Any tips or pointers to related material is much appreciated.

Thanks,
Peter.
1 REPLY 1

mitpatoliya
Star Collaborator
Star Collaborator
Hi peter,

To achieve this you have to create a script which will initiate the workflow.
And then on the space you can create a rule defining whenever any document come inside the space execute your created script.
Which in turn initiate the workflow.

http://wiki.alfresco.com/wiki/Actions_and_Rules
http://wiki.alfresco.com/wiki/WorkflowAdministration

Script for workflow initiation
var workflow = actions.create("start-workflow");
workflow.parameters.workflowName = "jbpm$wf:review";
workflow.parameters["bpm:assignee"] = person;
workflow.execute(document);