Stateflows, states and endresults on cases

Stateflows for cases

Each datanode have a Stateflow that defines which states can be used and in which order.

The “stateflowNamespace” property on the datanode determines, which stateflow applies to that specific datanode.

This topic focuses exclusively on stateFlowNamespaces that applies to case datanodes.

:information_source: You might get an understanding of the users experience of stateflows when working with cases by examining this graphical representation of case stateflows. This might also help you better understand the terms used in this topic.

stateflowNamespaces, November 2023

As per November 2023 new stateflowNamespaces where implementet. A major difference between the previous stateflowNamespaces and then new ones, is the deprication of the stateReasonNamespace property.

In order to determine the actuel result of a case having reached its “PostProcessing” or “Completed” stateCategory, “endResultOutcomes” has been introduced instead.

:exclamation: The new stateNamespaces will co-exist with the old stateNamespace for a considerable period of time on older cases!

Partial conversion of stateflowNamespaces, November 2023

During the first week of november 2023 old stateflows have been converted to new stateflows on sales and rental cases, meeting these criterias:

  • the case is created within the last four months and its state has not yet been changed
  • the case is currently for sale
  • the case has been sold within the last three weeks

Already existing sales cases and rental cases, not meeting the criterias above, will by default be using old stateflows. Users can however invoke a stateflow conversion by handling the case in the C&B Classic client.

Old stateflownamespaces are described in the topic “Stateflow, State and Reason on Datanodes

Sales cases

There are five different kinds of sales cases, each having its own namespace.

:information_source: Though the stateflow contents are the same across sales case types, there is a stateflowNamespace for each case namespace.

Case and Stateflow namespaces

Case namespace
case type displayname

Corresponding stateflowNamespace*
dk.realequity.case.home.sale
Ejerboligsalg
dk.realequity.stateflow.case.home.sale
dk.realequity.case.cooperativehousing.sale
Andelsboligsalg
dk.realequity.stateflow.case.cooperativehousing.sale
dk.realequity.case.home.agricultural.sale
Boliglandbrugssalg
dk.realequity.stateflow.case.home.agricultural.sale
dk.realequity.case.agricultural.sale
Landbrugssalg
dk.realequity.stateflow.case.agricultural.sale
dk.realequity.case.commercial.sale
Erhvervssalg
dk.realequity.stateflow.case.commercial.sale

* = Older sales cases may stil have other stateflowNamespace.

State and stateCategory namespaces




displayName

stateNamespace:
dk.realequity.
state.
endResultOutcome-
Namespace:
dk.realequity.
endresult.final.
stateCategory
namespace:
dk.realequity.
statecategory.
Kladde draft - PreProcessing
Salgsvurdering valuation.sale - PreProcessing
Formidlingsaftale indgået accepted - InitPreProcessing
Sat i bero onhold - InitPreProcessing
Salgsaktiv active - InProgress
Købsaftale indgået agreement-signed - InitPostProcessing
Handlen er endelig postprocessing-yes-deal yesdeal PostProcessing
Afsluttes uden handel postprocessing-no-deal nodeal PostProcessing
Afsluttet


completed


nocommissioning
nodeal (inherited)
yesdeal (inherited)
Completed


Mapping of Classic ‘Sagstatus’ to RealEquity stateNamespaces

Click here to expand mapping table


Classic - sagstatus

stateNamespace:
dk.realequity.state.
endResultOutcome-
Namespace:
dk.realequity.endresult.final.
V= Blank draft -
G = Salgsvurdering valuation.sale -
O = Lukket uden formidlingsaftale completed nocommissioning
U = Formidlingsaftale indgået accepted -
A = Salgsaktiv active -
Z = Sat i bero onhold -
H = Lukket uden handel postprocessing-no-deal nodeal
N = Købsaftale underskrevet agreement-signed -
S = Handlen er endelig postprocessing-yes-deal yesdeal
X = Afsluttet completed -

Rental cases

The stateflows for rental cases differs from the stateflows for sales cases only by the use of different wording targeting the rental situation rather than the sales situation.

There are two different kinds of sales cases, each having its own namespace.

:information_source: Though the stateflow contents are the same across rental case types, there is a stateflowNamespace for each case namespace.

Case and Stateflow namespaces

Case namespace
case type displayname

Corresponding stateflowNamespace*
dk.realequity.case.home.sale
Boligudlejning
dk.realequity.stateflow.case.home.rental
dk.realequity.case.commercial.rental
Erhvervsudlejning
dk.realequity.stateflow.case.commercial.rental

* = Older rental cases may stil have other stateflowNamespace.

State and stateCategory namespaces




displayName

stateNamespace:
dk.realequity.
state.
endResultOutcome-
Namespace:
dk.realequity.
endresult.final.
stateCategory
namespace:
dk.realequity.
statecategory.
Kladde draft - PreProcessing
Lejevurdering valuation.rental - PreProcessing
Formidlingsaftale indgået accepted - InitPreProcessing
Sat i bero onhold - InitPreProcessing
Udlejningsaktiv active.rental - InProgress
Udlejningsaftale indgået agreement-signed.rental - InitPostProcessing
Udlejningen er endelig postprocessing-yes-deal.rental yesdeal PostProcessing
Afsluttes uden udlejning postprocessing-no-deal.rental nodeal PostProcessing
Afsluttet


completed


nocommissioning
nodeal (inherited)
yesdeal (inherited)
Completed


Mapping of Classic ‘Sagstatus’ to RealEquity stateNamespaces

Click here to expand mapping table


Classic - sagstatus

stateNamespace:
dk.realequity.state.
endResultOutcome-
Namespace:
dk.realequity.endresult.final.
V= Blank draft -
G = Salgsvurdering valuation.rental -
O = Lukket uden formidlingsaftale completed nocommissioning
U = Formidlingsaftale indgået accepted -
A = Salgsaktiv active.rental -
Z = Sat i bero onhold -
H = Lukket uden handel postprocessing-no-deal.rental nodeal
N = Købsaftale underskrevet agreement-signed.rental -
S = Handlen er endelig postprocessing-yes-deal.rental yesdeal
X = Afsluttet completed -

Rectification cases

Case and Stateflow namespace

Case namespace
case type displayname

Corresponding stateflowNamespace*
dk.realequity.case.rectification
Køberberigtigelse
dk.realequity.stateflow.case.rectification

* = Older rectification cases may stil have other stateflowNamespace.

State and stateCategory namespaces




displayName

stateNamespace:
dk.realequity.
state.
endResultOutcome-
Namespace:
dk.realequity.endresult.
rectification.final.
stateCategory
namespace:
dk.realequity.
statecategory.
Kladde draft - PreProcessing
Aftaleindgåelse dk.realequity.state.negotiation - PreProcessing
Berigtigelse dk.realequity.state.active.rectification - InProgress
Efterbehandling dk.realequity.state.postprocessing yesdeal PostProcessing
Afsluttet

completed

nocommissioning
yesdeal (inherited)
Completed

Mapping of Classic ‘Sagstatus’ to RealEquity stateNamespaces

Click here to expand mapping table


Classic - sagstatus

stateNamespace:
dk.realequity.state.
endResultOutcome-
Namespace:
dk.realequity.endresult.
rectification.final.
V = Blank draft -
B = Berigtigelse igangsat dk.realequity.state.active.rectification -
C = Berigtigelse annulleret completed nodeal
D = Berigtigelse gennemført completed yesdeal
X = Afsluttet completed -

Valuation cases

There are five different kinds of valuation cases, each having its own namespace.

:information_source: Though the stateflow contents are the same across valuation case types, there is a stateflowNamespace for each case namespace.

Case and Stateflow namespace

Case namespace
case type displayname

Corresponding stateflowNamespace*
dk.realequity.case.home.valuation
Betalt vurdering - Ejerbolig
dk.realequity.stateflow.case.home.valuation
dk.realequity.case.agricultural.valuation
Betalt vurdering - Landbrug
dk.realequity.stateflow.case.agricultural.valuation
dk.realequity.case.commercial.valuation
Betalt vurdering - Erhverv
dk.realequity.stateflow.case.commercial.valuation
dk.realequity.case.cooperativehousing.valuation
Betalt vurdering - Andelsbolig
dk.realequity.stateflow.case.cooperativehousing.
valuation
dk.realequity.case.home.agricultural.valuation
Betalt vurdering - Boliglandbrug
dk.realequity.stateflow.case.home.agricultural.
valuation

State and stateCategory namespaces




displayName

stateNamespace:
dk.realequity.
state.
endResultOutcome-
Namespace:
dk.realequity.endresult.
valuation.final.
stateCategory
namespace:
dk.realequity.
statecategory.
Kladde draft - PreProcessing
Aftaleindgåelse negotiation - PreProcessing
Vurdering active.valuation - InProgress
Efterbehandling postprocessing yesdeal PostProcessing
Afsluttet

completed

nocommissioning
yesdeal (inherited)
Completed

Mapping of Classic ‘Sagstatus’ to RealEquity stateNamespaces

Click here to expand mapping table


Classic - sagstatus

stateNamespace:
dk.realequity.state.
endResultOutcome-
Namespace:
dk.realequity.endresult.
valuation.final.
V = Blank draft -
W = Vurdering igangsat dk.realequity.state.active.valuation -
Y = Vurdering annulleret completed nodeal
F = Vurdering gennemført completed yesdeal
X = Afsluttet completed -

endResultOutcomes

The endResultOutcomes list helps you determine the end result of a case when it has reached the stateCategories “PostProcessing” or “Completed”.

EndresultOutcomes are exposed in the response from the /changed/datanodes/V2 endpoint and in the response from the specialized endpoint /datanodes/{{caseId}}/state

The contents of the endResultOutcomes differs slighty depending on which request you perform to get the information.

EndresultOutcomes examples

Using the /changed/datanodes/V2 endpoint, you’ll get the endResultOutcomes list presented like this:

"endResultOutcomes": [{
        "namespace": "dk.realequity.endresult.final.yesdeal",
        "executedAt": "2023-11-03T16:45:34.67552+00:00",
        "questionnaireData": null,
        "note": null
    }

Using the /datanodes/{{caseId}}/state endpoint, you’ll get the endResultOutcomes list presented like this:

"endResultOutcomes": [{
        "endResultNamespace": "dk.realequity.endresult.final",
        "dataNodeId": "5b50cbf7-b7ea-4a3d-bb0c-5d27d36b550c",
        "dataNodeVersion": 1,
        "endResultOutcomeNamespace": "dk.realequity.endresult.final.yesdeal",
        "executedAt": "2023-11-03T16:45:34.67552+00:00",
        "questionnaireData": null,
        "note": null
    }

If and endresult have not yet been reached the endResultOutcomes list will be empty.

"endResultOutcomes": []

The endResultOutcomes list will also be empty, if the case is using an older stateflowNamespace. If thats the situation, you’ll have to observe the stateReasonNamespace value and consult the topic “Stateflow, State and Reason on Datanodes

1 Like