Description
The WorkflowItem object represents an item (AKA "activity", "task") of the workflow and schedule.
Created by
The WorkflowItem object is created by Workflow.addItem
WorkflowItem (activity) Properties
Properties present in both workflow templates and project workflows
Property | Type | Comments |
---|---|---|
id | string | Code of the activity. Used to specify predecessors. Also can be used to find the activity in the workflow. |
name | string | Activity Name. Appears everywhere in user interface |
predecessors | Array | Array of strings - codes of predecessor activities |
predecessors_str | string | Semicolon-separated list of codes of predecessor activities |
is_enabled | boolean | True if item is enabled |
duration | string | Duration. Used to calculate Projections and to recalculate Plan |
duration_minutes | integer | Duration in minutes, mapped to duration. 168.0.10643 - Root returns total duration calculated by longest enabled path. |
is_milestone | boolean | True if item is a milestone |
is_auto_finish_on_children | boolean | Set to True to automatically finish the item upon completion of all its children items |
roles | Array | List of role names. Read-only for root. Read-Write for items. |
roles_str | string | Semicolon-separated list of role names. Read-only for root. Read-Write for items. |
assignments | Array | List of assignments, each is an object with fields {{ role_name, resource_type, resource_id, resource_desc }} |
is_approval | boolean | True if item is an approval |
Properties present only in project workflows
Property | Type | Comments |
---|---|---|
current_round | Integer | Read-only. Current round of the item |
status_num (same as "Status_Code" on Job Object) |
Integer | Read-only. Numeric status of the activity in its current round. Values are:
|
status_str | string | Read-only. Character string describing status of the activity in its current round. Values are as per the comment above. |
is_active | boolean | Read-only. True if item is active at the moment (i.e. has been activated and has not been finished) |
has_started | boolean | Read-only. True if item has been started in its current round, it may be active or finished at the moment |
has_finished | boolean | Read-only. True if item is completed (finished or cancelled or skipped) in its current round |
plan_start | Date | Planned start date (with time-of-day part), defined by user |
plan_start_date | XDate | Date part of the activity plan_start |
plan_start_time | XTime | Time-of-day part of the activity plan_start |
plan_finish | Date | Planned finish date (with time-of-day part), defined by user. Same as "Due" |
plan_finish_date | XDate | Date part of the activity plan_finish |
plan_finish_time | XTime | Time-of-day part of the activity plan_finish |
start | Date | Actual or Projected start date (with time-of-day part) of the current round of the activity Mutable when Actual; Read-only when Projected. |
start_date | XDate | Date part of the activity start |
start_time | XTime | Time-of-day part of the activity start |
finish | Date | Actual or Projected finish date (with time-of-day part) of the current round of the activity Mutable when Actual; Read-only when Projected. |
finish_date | XDate | Date part of the activity finish |
finish_time | XTime | Time-of-day part of the activity finish |
Workflow Item (activity) Methods
Property | Parameters | Comments | New in |
---|---|---|---|
actions.activate() | Activates activity (only allowed when activity is not activate) | ||
actions.start() | Starts activity (only allowed when activity is activated but not yet started) | ||
actions.finish() | Finish activity (only allowed when activity is started) | ||
actions.cancel() | Cancel activity | ||
actions.execute( code ) | see Custom Actions | ||
reassignRole( role, resources[] ) | Replace resources assigned to a role | ||
reassignRoles( {{ role: resources[] }} ) | Replace resources assigned to roles | ||
reassignAll( assignments[] ) | Replace all assignments | ||
reschedule( options ) | { start: ..., finish: ..., duration: ..., successors: bool, predecessors: bool } | ||
plan_distance_minutes( otherItem ) | Returns int of minutes between this and other item | 168.0.10595 |