When you are no longer using a business process or content derived from it, you should delete the associated content. ATG 2007.3 provides two API methods in the atg.markers.bp.BusinessProcessManager
class for business process content deletion. The BusinessProcessManager
has access to both the individual RepositoryItems
involved in the business process as well as the governing business process itself so you can delete business process content from both contexts:
removeBusinessProcessStage
deletes business process content from a particularRepositoryItem
deleteBusinessProcessMarkers
deletes content provided by a given business process
Both methods take arguments
(pBusinessProcessName, pBusinessProcessStage)
where pBusinessProcessName
is the name of a business process and pBusinessProcessStage
is a business process stage. See atg.markers.bp.BusinessProcessManager
in the ATG API Reference for more information.
RepositoryItem-Based Deletion
To delete business process content from a specific RepositoryItem
, use removeBusinessProcessStage
. For example, the following call would remove content provided to a RepositoryItem
by StageA
of a business process called MyBusinessProcess
:
removeBusinessProcessStage("MyBusinessProcess","StageA")
It’s also possible to remove content provided by all stages of MyBusinessProcess
from a particular RepositoryItem
using this call:
removeBusinessProcessStage("MyBusinessProcess",
"MarkerConstants.ANY_VALUE")
Business Process-Based Deletion
Alternatively, you can approach business process content deletion from the perspective of the business process. You can delete content associated with stages from a given business process on every affected RepositoryItem
. The BusinessProcessManager
refers to the BusinessProcessConfiguration.markedItemType
property to assist in deleting business process content using this method.
Eliminate content added by a particular stage, such as StageB
of MyBusinessProcess
, from all RepositoryItems
, as follows:
deleteBusinessProcessMarkers("MyBusinessProcess","StageB")
To delete content supplied by all stages of MyBusinessProcess
from all RepositoryItems
, use this code:
deleteBusinessProcessMarkers("MyBusinessProcess",
"MarkerConstants.ANY_VALUE")