Deadlock

Written by

in

Description

It address the situations where the EA process can not continue because it got into a stalemate. So no other elements can be further executed.

Context

Derived from: “Deadlock” BPM anti-pattern

Cause

A single responsibility has been split up among a large number of classes. This can happen after overzealous reduction of Multifaceted Abstraction. All was well as long as the structure stayed small. But with new components being added, making changes has become harder and harder.

Consequences

No further elements can be executed.

Detection

search for a business or an application flows that reach an ‘or’ Junction and then split at least by two outgoing paths, which are later joined by an ‘and’ Junction.

Solution

Move existing behaviors into a single component. If there’s no component appropriate for this, create a new one. If moving code to the same element leaves the original one almost empty, try to get rid of these now-redundant components.

Example

When “Business Process 1” reaches the OR Junction, the execution of one of the two process flows is sufficient. However, it later becomes essential for both “Business Process 3” and “Business Process 4” to reach the AND Junction. Otherwise, the process will not execute further and can not proceed to “Business Process 5,” resulting in a Deadlock EA Smell.

Cypher query

MATCH (startNode:Junction {type: 'or'}) <br /> MATCH (endNode:Junction {type: 'and'}) <br /> CALL apoc.path.expandConfig(startNode,{relationshipFilter: "TriggeringRelationship>|FlowRelationship>|AssociationRelationship>", <br /> minLevel: $minLevel, <br /> maxLevel: $maxLevel, <br /> terminatorNodes:[endNode] <br /> }) <br /> YIELD path AS p <br /> RETURN p

Cypher count query

MATCH (startNode:Junction {type: 'or'}) MATCH (endNode:Junction {type: 'and'}) CALL apoc.path.expandConfig(startNode,{relationshipFilter: "TriggeringRelationship>|FlowRelationship>|AssociationRelationship>", minLevel: 1, maxLevel: 10, terminatorNodes:[endNode] }) YIELD path AS p RETURN count (distinct startNode)

Diagram

Diagram for Deadlock

Tags

soa

Query parameters

[
    {
        "name": "minLevel",
        "type": "number",
        "default": 1,
        "description": "The minimum length of the path for detection."
    },
    {
        "name": "maxLevel",
        "type": "number",
        "default": 10,
        "description": "The maximum length of the path for detection."
    }
]

Related smells

    All smells