This macro runs the archiving function. Please refer to the GUI to use the archiving function – see here for further information.
Example parameter configuration
(* = configuration required)
If false, then an order is archived if latest operation of the order is within the archive window. .
If true, then only orders with a state of Complete is considered. I.e. even though all operations are ready for archiving, the order is still not archived unless the order state is Complete
Specified number of months to look backward from now. Only used if archiveHorizon has a value of 100
Specified number of months to to use as archiveInterval. Only used if archiveInterval has a value of 100
How far back from time now to look when searching for orders to archive. I.e. if the horizon is 5 days, then only orders with an end date more than 5 days from now are considered for the archive. You may only specify the following values:
Note this parameter is ignored in case archiveIncludeDate contains a valid date value.
If blank then the archiveHorizon value is used to determine how far back in time to look. During archiving only orders with an operation end date older than this date is considered for archiving. Valid value for this parameter is the number of milliseconds since the standard base time known as “the epoch”, namely January 1, 1970, 00:00:00 GMT.
This parameter is only for testing and should not be used normally from within the macro. So typically leave this value blank.
Only used if autoStart is set to true. Otherwise ignored.
May contain the same values only as for archiveHorizon
if true, then production orders are archived if:
- all operations in the order ends before the include date and,
- any operation in any other order, that is grouped with or is linked as an sub order to, one of the operations in the order, ends before the include date. If just one if these criteria’s fails, none of the operations in the order is archived.
Operations is archived if the order for the operations is archived. Note: all operations or none, is archived within an order!
Note: the operation state itself is not relevant when deciding if an order is eligible for archiving.
Note that if this value is false, then it is likely that nothing will be archived. I.e. then archiving of projects relies on some other action (manual, scripted etc.) is carrying out the removal of production orders.
If true, then projects are archived when all orders in the project has been archived or has been archived previously. Note that an empty project is also eligible for archiving.
If true, then specific calendar exceptions are archived when both of these rules are true:
- the resoruce specific exception has an end date earlier or older than the include date.
- the end date of the exception is before the start date of the earliest operation on the resource (i.e. never remove specific exceptions which could affect the duration of any remaining operations)
If this value is set to true, then first time this macro runs it will activate automatic archiving using the specified archiveInterval value. Typically leave this value to false on macro lines.
After an archiving, the archived data is removed from the plan immediately. Otherwise the user need to log out/log in before the data is removed. The normal action is to enable this flag
When true, data that found to be archived is removed permanently (no archive is created). Can be used to carry out a permanent clean up of data in the plan. In any other cases you would set this flag to false.
Internal representation of the date or the last arching. Do not use.
Internal representation of the date this macro was last modified. Do not use.
Internal representation of the date or the next archiving. Do not use.
Information about if this is a manual or automatically executed run. Will be set as an attribute of each archive created for informational purpose. Possible values are:
- The default value – the user has not actively chosen any source
- Archiving triggered by an automatic action
- Archiving triggered by a manual action