This macro runs the archiving function. Please refer to the GUI to use the archiving function – see here for further information.

Example parameter configuration

Parameter descriptions

(* = configuration required)

archiveCompletedOrders
If false, then an order is archived if latest operation of the order is within the archive window. Regardless of the order state.
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

archiveCustomHorizon
Specified number of months to look backward from now. Only used if archiveHorizon has a value of 100

archiveCustomInterval
Specified number of months to to use as archiveInterval. Only used if archiveInterval has a value of 100

archiveHorizon *
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:
1=HORIZON_1_DAY
2=HORIZON_5_DAYS
3=HORIZON_10_DAYS
4=HORIZON_1_MONTH
5=HORIZON_3_MONTH
6=HORIZON_6_MONTH
7=HORIZON_1_YEAR
100=HORIZON_CUSTOM

Note this parameter is ignored in case archiveIncludeDate contains a valid date value.

archiveIncludeDate
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.

archiveInterval
Only used if autoStart is set to true. Otherwise ignored.
May contain the same values only as for archiveHorizon

archiveOrders
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.

archiveProjects
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.

archiveSpecificCalendars
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)

autoStart
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.

deleteArchivedObjects
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

deleteObjectsPermanent
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.

lastArchived
Internal representation of the date or the last arching. Do not use.

lastModified
Internal representation of the date this macro was last modified. Do not use.

nextArchived
Internal representation of the date or the next archiving. Do not use.

source
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:

DISABLED
The default value – the user has not actively chosen any source
AUTOMATIC
Archiving triggered by an automatic action
MANUAL
Archiving triggered by a manual action

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment