refactor(workflow): roles as initiators; fix instance scope type

This commit is contained in:
Sarah Vaupel 2020-04-01 13:03:14 +02:00 committed by Gregor Kleen
parent b19c1b31b7
commit 50b3fb8dcf
2 changed files with 11 additions and 11 deletions

View File

@ -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

View File

@ -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