What are the ethics for defining attributes of Interface View? Should the parameters being passed during contract creation be passed on to the interface view? Are they read-only, and what happens when we archive a contract? If not, how do I update a view from within a contract instance.
module Daml.Grants.Interface.Workflow.Processes.PreAwardProcess where
-- | View for `Process`.
data View = View
with
state : PreAwardPhaseState
-- ^ Internal state of the workflow process.
generalReviewerTask : ContractId Task.I
-- ^ The task assigned to the party reviewing the grant opportunity.
technicalReviewer : ContractId Task.I
-- ^ The task assigned to the party providing the technical review of the grant opportunity.
financialReviewer : ContractId Task.I
-- ^ The task assigned to the party providing the financial review of the grant opportunity.
deriving (Eq, Show)
...
...
...
-- | An interface to implement pre-award process
interface Process where
viewtype V
...
...
...
-- | A representation of process object
template PreAwardProcess
with
processKey : ProcessKey
-- ^ Unique identifier for the process.
grantOpportunityCid : ContractId GrantOpportunity.I
-- ^ An identifier of the grant opportunity.
grantApplicationCid : ContractId GrantApplication.I
-- ^ An identifier of the grant application.
state : PreAwardPhaseState
-- ^ Internal state of the workflow process.
observers : PartiesMap
-- ^ The factory's observers
where
...
...
...