title Scenario 4. Case in which the scheduled dataset collector becomes the issuer of the activity instance

participant Dataset Manager
participant Scheduler
participant Assignee
participant Worklist
participant Publisher

note over Worklist:**activity-instance** topic is a channel that publishes messages related to changes in an activity instance.

Dataset Manager-->Publisher:Subscribe **activity-instance** topic
Assignee-->Publisher:Subscribe **activity-instance** topic
Dataset Manager->Scheduler:Register the scenario in the schedule
Dataset Manager<-Scheduler:schedule ontime
Dataset Manager->Worklist:Issue new activity
Dataset Manager<-Worklist:Returns activity-instance-id
Worklist->Publisher:Dispatches that a new activity instance has been posted
Publisher-->Assignee:Notifies the assignee that a new activity instance has been assigned
Assignee->Worklist:Execute the activity-instance
Worklist->Dataset Manager:Save the datasample
Worklist->Publisher:Dispatch the result (activity-instance id, output result)
Publisher-->Dataset Manager:Notify the result (activity-instance id, output result)
Publisher-->Assignee:Notify the result (activity-instance id, output result)
