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