workflow.Workflow_UspList - V

type: V ( view ), modify_date: 2021-08-17 20:30:53

RepoObject_guid: BB0BC0EB-B301-EC11-8510-A81E8446D5B0

Description

Examples

Entity Diagram

entity-workflow.workflow_usplist

Columns

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

nvarchar(max)

NULL

int

NOT NULL

nvarchar(500)

NULL

Foreign Key Diagram

entity_1_1_fk-workflow.workflow_usplist

References

Object Reference Diagram - 1 1

entity_1_1_objectref-workflow.workflow_usplist

Object Reference Diagram - Referenced - 30 0

entity_30_0_objectref-workflow.workflow_usplist

Object Reference Diagram - Referencing - 0 30

entity_0_30_objectref-workflow.workflow_usplist

Column Reference Diagram

entity_1_1_colref-workflow.workflow_usplist

Indexes

idx_Workflow_UspList__1

Column Details

_

UspList

UspList

nvarchar(max)

NULL

Workflow_Name

Workflow_Name

nvarchar(500)

NULL

sql_modules_definition

workflow.Workflow_UspList - V script
CREATE View workflow.Workflow_UspList
As
Select
    ws.Workflow_id
  , Workflow_Name = Max ( w.Name )
  , UspList       = String_Agg (
                                   Cast('EXECUTE ' As NVarchar(Max)) + ro.RepoObject_fullname + ' @execution_instance_guid;'
                                 , Char ( 13 ) + Char ( 10 )
                               ) Within Group(Order By
                                                  ws.Sortorder)
From
    workflow.WorkflowStep_Sortorder As ws
    Inner Join
        workflow.Workflow           As w
            On
            ws.Workflow_id               = w.id

    Inner Join
        repo.RepoObject             As ro
            On
            ws.Procedure_RepoObject_guid = ro.RepoObject_guid
Group By
    ws.Workflow_id