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)
|
||||
|
||||
deriveJSON defaultOptions ''WorkflowGraphNodeStatus
|
||||
|
||||
data WorkflowGraphNode userid authdnf fileid = WGN
|
||||
{ wgnStatus :: WorkflowGraphNodeStatus
|
||||
, wgnOutgoing :: Set (WorkflowGraphEdge userid authdnf fileid)
|
||||
}
|
||||
{ wgnStatus :: WorkflowGraphNodeStatus
|
||||
, wgnOutgoing :: Set (WorkflowGraphEdge userid authdnf fileid)
|
||||
}
|
||||
|
||||
type WorkflowGraphNodeLabel = CI Text
|
||||
|
||||
|
||||
data WorkflowEdgePayload userid fileid (payload :: *) where
|
||||
@ -67,14 +67,13 @@ data WorkflowPayload userid fileid = forall payload. Map WorkflowEdgePayloadLabe
|
||||
|
||||
data WorkflowGraphEdge userid authdnf fileid = WGE
|
||||
{ wgeActors :: Set (WorkflowRole userid authdnf)
|
||||
, wgeTarget :: WorkflowGraphNode userid authdnf fileid
|
||||
, wgeTarget :: WorkflowGraphNodeLabel
|
||||
, wgeForm :: Map WorkflowEdgePayloadLabel (NonNull (Set (WorkflowEdgePayloadSpecification fileid userid)))
|
||||
}
|
||||
|
||||
|
||||
data WorkflowGraph userid authdnf fileid = WG
|
||||
{ wgNodes :: Set (WorkflowGraphNode userid authdnf fileid)
|
||||
, wgEdges :: Set (WorkflowGraphEdge userid authdnf fileid)
|
||||
data WorkflowGraph userid authdnf fileid = WorkflowGraph
|
||||
{ wgNodes :: Map WorkflowGraphNodeLabel (WorkflowGraphNode userid authdnf fileid, Set (WorkflowGraphEdge userid authdnf fileid))
|
||||
}
|
||||
|
||||
|
||||
@ -84,3 +83,6 @@ data WorkflowInstanceScope term school course = WISGlobal | WISTerm term | WISSc
|
||||
data WorkflowInstanceScope' = WISGlobal' | WISTerm' | WISSchool' | WISCourse'
|
||||
deriving (Eq, Ord, Enum, Read, Show, Data, Generic, Typeable)
|
||||
|
||||
|
||||
|
||||
deriveJSON defaultOptions ''WorkflowGraphNodeStatus
|
||||
|
||||
Loading…
Reference in New Issue
Block a user