cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow parameters

agz
Champ on-the-rise
Champ on-the-rise
Hi all,
I need to start a workflow whit a script executed when a document is putted into folder.
Hi have some problems with the parameter settings of workflow (document in this example is "static"):

var workflow = actions.create("start-workflow");
var document = space.childByNamePath("Document.doc");
workflow.parameters.workflowName = "activiti$activitiParallelReview";

var l=document.assocs["drp:Revisori"].length;
for(i=0; i<l; i++)
{
  var user=document.assocs["drp:Revisori"][i].properties.userName;
  workflow.parameters["bpm:assignees"]=document.assocs["drp:Revisori"];
}
workflow.parameters.requiredApprovationPercent=100;
workflow.parameters["bpm:approveDestination"] = "/Siti/drp/documentLibrary/Approvati";
workflow.execute(document);

1. I set
workflow.parameters.requiredApprovationPercent=100;
but when the wf start I have
"Required Approval percent: 50" 
WHY?  :!:  Is the workflow.parameters.requiredApprovationPercent wrong parameter?

2. How I can activate email notification for workflow via script? Exist a parameter to set?

3. How can I attach to workflow the document uploaded in folder?

4. there is a place where I can find specifications of workflow parameters???

If someone want to help me I am very grateful!!  :roll:
1 REPLY 1

mitpatoliya
Star Collaborator
Star Collaborator
did you checked with the workflowmodel that property which you are referring is same as which you are setting.
I think it is fetching the default value from the workflow model.
Name of property in the model and in parameter should match exactly.