Site owners

  • Kyle Horst
  • Romain Vialard
  • James Ferreira

Get the Books!

Page authors

  • James Ferreira
    September 25, 2011

Our friends

class Step



class Step:



MemberTypeDescription
 setTitle  Sets the step title
 getTitle String Gets the step's title
 setStatus  Sets the step status
 getStatus String Gets the step's status
 addApprover Approver Creates a workflow step
 getApprovers Approvers[] Gets the approvers in this step
 removeApprover Approver Removes approver 


 method setTitle(title)


Arguments:

NameTypeDescription
 title String The new title


Examples:

  var workflow = new Workflow();  
  workflow.createStep().setTitle('Step 1');





 method getTitle()



Return Values:

TypeDescription
 String The title of the step


Examples:

  var workflow = new Workflow();  
  workflow.createStep().setTitle('Step 1');
  var titleStep1 = workflow.getSteps[0].getTitle();




 method setStatus(status)


Arguments:

NameTypeDescription
 status String The new status



 method getStatus()



Return Values:

TypeDescription
 String The status of the step



 method addApprover()



Return Values:

TypeDescription
 Approver Object The current Approver for the step


Examples:

  var workflow = new Workflow();  
  workflow.createStep().addApprover();
  




 method getApprovers()



Return Values:

TypeDescription
 Approver Array[] An array of approvers for the step


Examples:

  var workflow = new Workflow();  
  workflow.createStep().addApprover().setName('James');
  var approver = workflow.getSteps()[0].getApprovers()[0].getName();
  //James




 method removeApprover(index)



Arguments:

NameTypeDescription
 index IntegerThe zero base index of the approver to be removed


Examples:

  var workflow = new Workflow();  
  var step1  = workflow.createStep().setName('step1');
  
  step1.addApprover().setName('James');
  step1.addApprover().setName('Sam');

  step1.removeApprover(0);
  workflow.getSteps()[0].getApprovers()[0].getName();
  //Sam



 method insertApprover(index)



Arguments:

NameTypeDescription
 index IntegerThe zero base index of the location to insert approver


Examples:

  var workflow = new Workflow();  
  var step1  = workflow.createStep().setName('step1');
  
  step1.addApprover().setName('James');
  step1.addApprover().setName('Sam');

  step1.insertApprover(1).setName('Tom');
  workflow.getSteps()[0].getApprovers()[1].getName();
  //Tom