cancel
Showing results for 
Search instead for 
Did you mean: 

Advanced Workflow initiated via a Rule

nowhere
Champ in-the-making
Champ in-the-making
Hi all,
I have a very stupid question…can I initiate an advanced workflow by a rule in web gui?
I have read there is a "start-workflow" action, but I found pour documentation about it. Can someone tell me where read more?
Thanks!
14 REPLIES 14

riogrande
Champ in-the-making
Champ in-the-making
Who could I miss that!  Smiley Surprisedops:
Thanks Smiley Wink

nowhere
Champ in-the-making
Champ in-the-making
Sorry…I'm on late…but I found script solution as Cytrix suuggested Smiley Happy

var workflow = actions.create("start-workflow");
workflow.parameters.workflowName = "jbpm$alwf:my_workflow";
workflow.execute(document);

nicolasraoul
Star Contributor
Star Contributor
The technique to initiate an Advanced Workflow via a Rule is documented on the Wiki: http://wiki.alfresco.com/wiki/WorkflowAdministration#Step_7:_Integration_with_Rules_.28Optional.29

Hope this helps,
Nicolas Raoul
http://nicolas-raoul.blogspot.com

harishns
Champ in-the-making
Champ in-the-making
Hi,
I need little change in Advanced Work flow

First let me write my requirement
1. user will send document(the change is document is a folder not a file) to multiple users for review.
2.the reviewers will get the notification with document link.
3. the reviewers approve/reject the document with their comments
4. the approved folder will move to approved space and rejected folder will move to draft space for next iteration.

I am able to start jbpm workflow as soon one folder is created, after user have as approved , I am able to move that folder to a desired destination.

Right now the reviewers are static users name specified in the javascript

I want know how can I assign reviewers dynamically

here is my javascript for assigning and starting of the jbpm workflow via rule using execute script option

var workflow = actions.create("start-workflow");
workflow.parameters.workflowName = "jbpm$wfSmiley Tonguearallelreview";
workflow.parameters.requiredApprovePercent = 20;
workflow.parameters["bpm:workflowDescription"] = "Please review and approve: " + document.name;
workflow.parameters["bpm:assignees"] = people.getPerson("nithin");
var futureDate = new Date();
futureDate.setDate(futureDate.getDate() + 7);
workflow.parameters["bpm:workflowDueDate"] = futureDate;
workflow.execute(document);

I think I need to add wizard kind of action for this rule. when I try to get actions definitions for "Start Advanced Workflow" in the web-client-config-actions.xml, I didn't find any definition for this action.

I am using existing process definition (parallelreview_processdefinition.xml, parallelreview_group_processdefinition.xml)

So Please help me
Thanks

harishns
Champ in-the-making
Champ in-the-making
I got one more link with similar question and didn't find any example to create wizard for space.

http://forums.alfresco.com/en/viewtopic.php?f=34&t=10441&st=0&sk=t&sd=a

I am not able to understand the end to end steps to create wizard to a space.

if anyone have example of how to create a wizard to a space to get the users dynamically and execute the scripts, please let me know.


Thanks