refactor(workflow): roles as initiators; fix instance scope type
This commit is contained in:
parent
b19c1b31b7
commit
50b3fb8dcf
@ -1,14 +1,14 @@
|
||||
WorkflowDefinition
|
||||
graph WorkflowGraph
|
||||
initiator WorkflowInitiator
|
||||
initiator (WorkflowRole UserId AuthDNF)
|
||||
|
||||
WorkflowInitiator
|
||||
-- TODO descriptor of a "role" that can initiate an instance of a workflow in a specified scope
|
||||
|
||||
WorkflowInstance
|
||||
definition WorkflowDefinition
|
||||
initiator UserId
|
||||
initiator (WorkflowRole UserId AuthDNF)
|
||||
|
||||
Flow
|
||||
Workflow
|
||||
instance WorkflowInstance
|
||||
|
||||
initiator UserId
|
||||
|
||||
@ -40,15 +40,15 @@ data WorkflowGraph = WG
|
||||
deriving (Eq, Ord, Show, Read, Data, Generic, Typeable)
|
||||
deriveJSON defaultOptions ''WorkflowGraph
|
||||
|
||||
|
||||
{-
|
||||
data WorkflowInstanceScope = WISGlobal
|
||||
| WISTerm TermId
|
||||
| WISSchool SchoolId
|
||||
| WISCourse CourseId
|
||||
data WorkflowInstanceScope term school course = WISGlobal
|
||||
| WISTerm term
|
||||
| WISSchool school
|
||||
| WISCourse course
|
||||
deriving (Eq, Ord, Show, Read, Data, Generic, Typeable)
|
||||
|
||||
deriveJSON defaultOptions
|
||||
{ constructorTagModifier = camelToPathPiece' 3
|
||||
} ''WorkflowInstanceScope
|
||||
-}
|
||||
|
||||
data WorkflowRole user authdnf = WorkflowRoleUser user
|
||||
| WorkflowRoleAuthorized authdnf
|
||||
|
||||
Loading…
Reference in New Issue
Block a user