workflow.Workflow_ProcedureDependency_all - V

type: V ( view ), modify_date: 2021-10-02 13:23:34

RepoObject_guid: 9EBCD983-91FA-EB11-850E-A81E8446D5B0

Description

per active Workflow all active ProcedureDependency, including redundant references

Example 1. redundant references

are to be preserved:

  • A ⇐ B

  • B ⇐ C

  • C ⇐ D

redundant:

  • A ⇐ C

  • A ⇐ D

  • B ⇐ C

Examples

Entity Diagram

entity-workflow.workflow_proceduredependency_all

Columns

Table 1. Columns of workflow.Workflow_ProcedureDependency_all - V
PK Column Name Data Type NULL? ID

uniqueidentifier

NOT NULL

uniqueidentifier

NOT NULL

int

NOT NULL

Foreign Key Diagram

entity_1_1_fk-workflow.workflow_proceduredependency_all

References

Object Reference Diagram - 1 1

entity_1_1_objectref-workflow.workflow_proceduredependency_all

Object Reference Diagram - Referenced - 30 0

entity_30_0_objectref-workflow.workflow_proceduredependency_all

Object Reference Diagram - Referencing - 0 30

entity_0_30_objectref-workflow.workflow_proceduredependency_all

Column Reference Diagram

entity_1_1_colref-workflow.workflow_proceduredependency_all

Indexes

idx_Workflow_ProcedureDependency_all__1

idx_Workflow_ProcedureDependency_all__2

idx_Workflow_ProcedureDependency_all__3

idx_Workflow_ProcedureDependency_all__4

Column Details

_

referenced_Procedure_RepoObject_guid

referenced_Procedure_RepoObject_guid

uniqueidentifier

NOT NULL

referencing_Procedure_RepoObject_guid

referencing_Procedure_RepoObject_guid

uniqueidentifier

NOT NULL

Workflow_id

Workflow_id

int

NOT NULL

Referenced Columns

sql_modules_definition

workflow.Workflow_ProcedureDependency_all - V script
/*
<<property_start>>Description
per active Workflow all active ProcedureDependency, including redundant references

.redundant references
====
are to be preserved:

* A <= B
* B <= C
* C <= D

redundant:

* A <= C
* A <= D
* B <= C
====
<<property_end>>
*/
CREATE View workflow.Workflow_ProcedureDependency_all
As
Select
    Workflow_id = T1.id
  , T5.referenced_Procedure_RepoObject_guid
  , T5.referencing_Procedure_RepoObject_guid
From
    workflow.Workflow                As T1
    Inner Join
        workflow.WorkflowStep_active As T3
            On
            T1.id                            = T3.Workflow_id

    Inner Join
        workflow.WorkflowStep_active As T4
            On
            T1.id                            = T4.Workflow_id

    Inner Join
        workflow.ProcedureDependency As T5
            On
            T3.Procedure_RepoObject_guid     = T5.referenced_Procedure_RepoObject_guid
            And T4.Procedure_RepoObject_guid = T5.referencing_Procedure_RepoObject_guid
Where
    ( T1.is_active                              = 1 )
    And ( T5.is_active                          = 1 )
    And T5.referenced_Procedure_RepoObject_guid <> T5.referencing_Procedure_RepoObject_guid