Effectivity
Effectivity in ShareAspace is a concept to specify when a relationship is valid.
A relationship that has an effectivity is said to be effectivity controlled
which means that it is only valid between two points in time.
Each effectivity controlled relationship in the ShareAspace model has a:
StartDate
, the point in time where the relationship starts to be validEndDate
, the point in time where the relationship ends being validRole
, the type of effectivity, usuallyActual
but sometimesPlanned
If the start date is null it means that the relationship is valid from the start of time and subsequently if the end date is null it means that the relationship is valid to the end of time.
Uniqueness
The effectivity is a part of the uniqueness of the relationship. If two relationships have the same uniqueness but the effectivity time span is different, i.e. not overlapping at all, then those relationships are defined as unique. On the other hand, if you have two relationships that have the same uniqueness and with two different effectivity but one of the relationships' effectivity start or end is between the other relationships' effectivity start and end then the relationships is not defined as unique since the effectivity span overlaps.
Information filter
The information filter is an application object that contains values controlling how data is read from and written to ShareAspace. Effectivity is a section in the information filter that can be configured to create a specific behavior.
Read more about the information filter.
Read data
Let us demonstrate how it works with an example. If there is an object From
that
has a Relation
to the object To
like this:
In this example From
and To
could be PartViewDefinition
and Relation
could be
NextAssemblyUsage
to build a structure. It can also be that From
is an object that can
assign property values and thus Relation
would be PropertyValueAssignment
and To
would be PropertyValue
.
Effectivity filter in explicit mode
If the filter is set with date 11:00
and role Actual
the result will look like this:
If the filter is set with date 13:00
and role Actual
the result will look like this:
If the filter is set with date 14:00
and role Actual
the result will look like this:
If the filter is set with date 14:00
and role Planned
the result will look like this:
Disabled effectivity filter
When the effectivity filter is disabled everything will be returned regardless of what start, end and role are set for the effectivities on the relation.
Effectivity filter in live mode
In live mode the date part of the effectivity filter is ignored and instead the current time will be used e.g. if the time is 16:00 when navigating this data the result will look like this:
Create Data
When creating data only, the effectivity mode will have an impact, the date and role in the effectivity filter are not used and if the effectivity filter is disabled it will not make any difference. The date and role of the effectivity filter are only used when reading data, not when creating.
Live creation
When the effectivity filter is in live mode the provided effectivity data on the relation has no impact.
Lets say that the current time is 12:00
Then, regardless of how the effectivity filter is configured (except that it is in
Live
mode) e.g. if it is enabled or disabled, if it has Actual
or Planned
role.
Like any of the below examples:
In Live
mode the created effectivity data will have the role as defined by the SoftType configuration and the
start date set to current time, in this case 12:00
, like the result below:
Note
When creating data in Live
mode it is possible to override the automatically set start date. This is done by providing the required start date in the request payload.
Explicit creation
When the effectivity filter is in explicit mode it will be the provided effectivity
data that will be used on the relation, regardless of the effectivity filter
settings (except if it is in Explicit
mode). Furthermore, the current time does not affect
the created effectivity.
If the effectivity data is missing on the relation that is being created like below:
The result will be a start date equal to null
and the role will be Actual
like
below:
Remove data
When removing an effectivity controlled entity the end date will be set. In Live
mode the end date will be the current time and in Explicit
mode the
end date will be what end date is provided in the effectivity of the relation.