Database.repository.workflow.configure

New in package 169

Summary

workflow.configure sets the workflow configuration for the parent repository's entities.
Wraps common low-level workflow functionality into a unified interface, including:

  • Applying templates if the projectType field has changed
  • Applying flags to the entity workflow
  • Transferring relevant fields to the workflow plan start/finish dates and recalculating the schedule
  • Copying information about the workflow such as the template name onto the entity.

Usage

Argument Type Usage
options Object An optional object describing the workflow configuration to be set

Options

*All properties are optional

Property Type Usage Default Value
projectType Object Configures the relationship between entity workflow template and entity field values  
schedulePlan Object
Function returns Object
Configures relationship between entity workflow schedule start/finish and entity field values
flags Object
Function returns Object
Configures relationship between entity workflow flags and entity field values
customCallback Function Function called after applying projectType configuration
autoFinish Boolean
Function returns Boolean
Determines whether entity workflow schedule should automatically finish if possible
autoStart Boolean
Function returns Boolean
Determines whether entity workflow schedule should automatically start when ready
bypassApplyConfiguration Boolean
Function returns Boolean
When true, disables all application of workflow configuration
shouldApplyOnSaveObject Boolean
Function returns Boolean
When true, applies workflow configuration on entity save
discriminators Array
Function returns Array
If object has any fields specified attempt to find project type with corresponding fields/values

projectType
Property Type Usage Default Value
projectTypeField
Required
String
Function returns String
Field name from which to pull the Project Type  
workflowTemplateField String
Function returns String
Field name which stores the template ID
roles Array of Strings
Function returns Array of Strings
Role names to migrate after application of template

schedulePlan
Property Type Usage Default Value
startField String
Function returns String
Name of field on entity from which to pull the schedule's new start date  
finishField String
Function returns String
Name of field on entity from which to pull the schedule's new finish date  
predecessors Boolean
Function returns Boolean
Whether reschedule should include predecessors
successors Boolean
Function returns Boolean
Whether reschedule should include successors

flags

Object with keys of form:


Applies the flags to entity workflow on every entity workflow change and on entity save.

Example Usage(s)

Default Configuration
Project Type Configuration
Schedule Plan Configuration
Flags Configuration
Holistic Configuration

Additional Notes

Properties exposed on `Entity Type` prototype upon execution of Database.repository( `Entity Type` ).workflow.configure()

Method Usage
applyWorkflowConfiguration() Applies the workflow configuration for that entity.
Example
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.