tg icon indicating copy to clipboard operation
tg copied to clipboard

Activatable Entity: planning for (auto)deactivation

Open 01es opened this issue 8 years ago • 0 comments

Description

If an activatable entity has active dependencies then it cannot be deactivated. This is the essential nature of activatable entities. However, only active entity values can be used for assignments.

There are situations where it is required to prevent new assignments of activatable entity values while they are still active. This would correspond to "phasing out" or "deprecation" of such active values.

For example, a work activity type may become deprecated and should not be used for creation of new work activities. But there could still be some active work activities with that type, which would prevent its immediate deactivation. As long as that type remains active it could still be used, even inadvertently, when creating new work activities.

What would be great is if an active activatable entity could be marked as deprecated (false by default). Such values should not be permitted to be used for assignment under the same rules as inactive values. And, once their refCount reaches zero (refCount == 0), such value would automatically deactivate (i.e. get their property active set to false). Subsequently, if the value gets activated again (manually or as part of some business process) then deprecated should be reset to false. Of course, if deprecated gets assigned false while refCount == 0 then deactivation should occur immediately.

Expected outcome

Support for planning value deactivation.

A good existing use case for this feature is Supplier that might have active PurchaseOrders, but should not be used for any new purchase orders.

01es avatar Jul 12 '17 00:07 01es