chore(workflow-types): reference node labels instead of nodes
This commit is contained in:
parent
26c5a32f58
commit
9612b7d905
@ -15,12 +15,12 @@ data WorkflowGraphNodeStatus = WGNS
|
|||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Data, Generic, Typeable)
|
deriving (Eq, Ord, Show, Read, Data, Generic, Typeable)
|
||||||
|
|
||||||
deriveJSON defaultOptions ''WorkflowGraphNodeStatus
|
|
||||||
|
|
||||||
data WorkflowGraphNode userid authdnf fileid = WGN
|
data WorkflowGraphNode userid authdnf fileid = WGN
|
||||||
{ wgnStatus :: WorkflowGraphNodeStatus
|
{ wgnStatus :: WorkflowGraphNodeStatus
|
||||||
, wgnOutgoing :: Set (WorkflowGraphEdge userid authdnf fileid)
|
, wgnOutgoing :: Set (WorkflowGraphEdge userid authdnf fileid)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type WorkflowGraphNodeLabel = CI Text
|
||||||
|
|
||||||
|
|
||||||
data WorkflowEdgePayload userid fileid (payload :: *) where
|
data WorkflowEdgePayload userid fileid (payload :: *) where
|
||||||
@ -67,14 +67,13 @@ data WorkflowPayload userid fileid = forall payload. Map WorkflowEdgePayloadLabe
|
|||||||
|
|
||||||
data WorkflowGraphEdge userid authdnf fileid = WGE
|
data WorkflowGraphEdge userid authdnf fileid = WGE
|
||||||
{ wgeActors :: Set (WorkflowRole userid authdnf)
|
{ wgeActors :: Set (WorkflowRole userid authdnf)
|
||||||
, wgeTarget :: WorkflowGraphNode userid authdnf fileid
|
, wgeTarget :: WorkflowGraphNodeLabel
|
||||||
, wgeForm :: Map WorkflowEdgePayloadLabel (NonNull (Set (WorkflowEdgePayloadSpecification fileid userid)))
|
, wgeForm :: Map WorkflowEdgePayloadLabel (NonNull (Set (WorkflowEdgePayloadSpecification fileid userid)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
data WorkflowGraph userid authdnf fileid = WG
|
data WorkflowGraph userid authdnf fileid = WorkflowGraph
|
||||||
{ wgNodes :: Set (WorkflowGraphNode userid authdnf fileid)
|
{ wgNodes :: Map WorkflowGraphNodeLabel (WorkflowGraphNode userid authdnf fileid, Set (WorkflowGraphEdge userid authdnf fileid))
|
||||||
, wgEdges :: Set (WorkflowGraphEdge userid authdnf fileid)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -84,3 +83,6 @@ data WorkflowInstanceScope term school course = WISGlobal | WISTerm term | WISSc
|
|||||||
data WorkflowInstanceScope' = WISGlobal' | WISTerm' | WISSchool' | WISCourse'
|
data WorkflowInstanceScope' = WISGlobal' | WISTerm' | WISSchool' | WISCourse'
|
||||||
deriving (Eq, Ord, Enum, Read, Show, Data, Generic, Typeable)
|
deriving (Eq, Ord, Enum, Read, Show, Data, Generic, Typeable)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
deriveJSON defaultOptions ''WorkflowGraphNodeStatus
|
||||||
|
|||||||
Reference in New Issue
Block a user