• Aucun résultat trouvé

STEP 4: PROJECT SPECIFICITIES 93 2 Activities Definition

PRM In Action

7.5. STEP 4: PROJECT SPECIFICITIES 93 2 Activities Definition

In the scope of the scenario, only one additional Activity has to be defined. This Activity has to handle the Courses as well as the Lessons related to these Courses. The Course Management Activity enables allowed Actors to propose Courses and Lessons, evaluate them and then approve them before mak-ing them available to the public. Lessons and Courses can be replaced or removed. They can also be activated or deactivated if it is needed to hide a Course or a Lesson to the public. This Activity also pro-vides different operations for searching for Courses and Lessons. Table7.3lists the different operations provided by this Activity.

Name Description

propose(Course):void Proposes a Course

propose(Lesson, Course):void Proposes a Lesson for a Course getProposedCourses():PCourse Returns proposed Courses

approveCourse(Course):void Approves a proposed Course and registers it rejectCourse(Course):void Rejects a proposed Course

getProposedLessons(Course):PLesson Returns proposed Lessons for a Course approveLesson(Lesson):void Approves a proposed Lesson and registers it rejectLesson(Lesson):void Rejects a proposed Lesson

courses():PCourse returns registered and active Courses

lessons(Course):PLesson returns registered and active Lessons for a Course evaluate(Course):Boolean Returns the evaluation for a Course

evaluate(Lesson):Boolean Returns the evaluation for a Lesson

activate(Course):void Activates a Course

deactivate(Course):void Deactivates a Course

activate(Lesson):void Activates a Lesson

deactivate(Lesson):void Deactivates a Lesson

remove(Course):void Removes a Course

replaceCourse(Course, Course):void Replaces a Course with a modified one replaceLesson(Course, Lesson, Lesson):void Replaces a Course Lesson with a newer one remove(Lesson, Course):void Removes a Lesson for a Course

findCourse(Directory):PArtifact Searches for Course Artifacts findLesson(Directory):PArtifact Searches for Lessons Artifacts

findLesson(Course, Directory):PArtifact Searches for Lessons Artifacts in the scope of a Course exists(Course):Boolean Checks if a Course exists

exists(Lesson, Course):Boolean Checks if a Course exists

Table 7.3: Operations of the Course Management Activity.

7.5.3 Registration

Once all these new Artifacts types and Activities are created, John can register them using the following calls related to the processesπartifactDeclaration andπactivityDeclaration. EachI R represents an integrity rule bound to the ArtifactType or to the Activity being created.

ArtifactActivity.registerArtifactType(DirectoryCourseType, DirectoryValuation,PI R, OC) ArtifactActivity.registerArtifactType(DirectoryLessonType, DirectoryValuation,PI R, OC) ActivityActivity.declareActivity("‘CourseActivity"’,P(λ,PI R))>CA

ActivityActivity.bindActivity(CA, OC)

94 CHAPTER 7. PRM IN ACTION 7.5.4 Specific Processes

The following processes are made from the operations listed in Table 7.3. These processes allow the creation, evaluation, modification, and usage of Courses and Lessons.

Course Proposition. The creation of a Course has to undergo a given number of steps. The first one of these steps is the proposition of a Course. When proposing a Course a evaluation request is raised.

πcourseProposition = CourseActivity.propose(course);

EventActivity.raise(CourseEvaluationRequest));

Course Evaluation. The Course evaluation process is triggered by the raise of aCourseEvaluationRequest

Event. Depending on the result of the evaluation of the Course, the Course is activated and aPositiveCourseEvaluation event is raised or the Course is deactivated and aCourseModificationRequestEvent is raised.

πcourseEvaluation = EventActivity.observe(CourseEvaluationRequest);

CourseActivity.evaluate(course)?

(CourseActivity.activate(course);

EventActivity.raise(PositiveCourseEvaluation)): (CourseActivity.deactivate(course);

EventActivity.raise(CourseModificationRequest));

Course Approval. The Course Approval process is triggered by the observation of aPositiveCourseEvaluation. When this Event is received, the Course correctness is verified, however it is still not provided by the

Project. To make a Course available through the Activity, it must be approved after having been evalu-ated.

πcourseApproval = EventActivity.observe(PositiveCourseEvaluation);

(CourseActivity.approveCourse(course)||CourseActivity.rejectCourse(course));

Course Modification. If a Course is not considered complete enough for being distributed, or if errors have been detected, aCourseModificationRequest Event is raised. When observed, a Course replace-ment must be then provided, then the replacereplace-ment must be evaluated.

πcourseModification = EventActivity.observe(CourseModificationRequest);

CourseActivity.replaceCourse(course,course);

EventActivity.raise(CourseEvaluationRequest);

Lesson Proposition. As for Courses, Lessons can be proposed through the Course Management Ac-tivity. The proposition triggers the evaluation of the Lesson being proposed.

πlessonProposition = CourseActivity.propose(Lesson,Course);

EventActivity.raise(LessonEvaluationRequest);

Lesson Approval. Once a Lesson is considered as correct, it can be approved or rejected depending on how it integrates with other Courses.

πlessonApproval = EventActivity.observe(PositiveLessonEvaluation);

(CourseActivity.approveLesson(lesson,course)||

CourseActivity.rejectLesson(lesson,course));

7.5. STEP 4: PROJECT SPECIFICITIES 95 Lesson evaluation. Again, as for Courses, the evaluation of a Lesson is triggered by a proposition. The evaluation can be positive or negative. If positive, the Lesson is activated, and aPositiveLessonEvaluation Event is raised. If not, the Lesson is deactivated, and modifications are requested through the raise of a LessonModificationRequest

πlessonEvaluation = EventActivity.observe(LessonEvaluationRequest);

CourseActivity.evaluate(lesson)?

(CourseActivity.activate(lesson);

EventActivity.raise(PositiveLessonEvaluation)): (CourseActivity.deactivate(lesson);

EventActivity.raise(lessonModificationRequest));

Lesson Modification. This process waits forLessonModificationRequestEvents then replaces a Les-son with a modified version of it, which is supposed to be correct. Once the replacement is done, a evaluation of the new Lesson is requested by raising aLessonEvaluationRequest.

πlessonModification = EventActivity.observe(LessonModificationRequest);

CourseActivity.replace(course,lesson,lesson);

EventActivity.raise(LessonEvaluationRequest);

Course Check. The check process triggers the evaluation of a Lesson or the evaluation of a Course.

After the check theCourse Approval orLesson ApprovalProcesses are run, which allows to take a decision about the approval or rejection of the Course or Lesson.

πcheckCourse = (EventActivity.raise(courseEvaluationRequest)||

EventActivity.raise(LessonEvaluationRequest));

Course Visibility. This process takes care of making Courses and Lessons visible to the Project’s Community.

πvisibilityCourse = (CourseActivity.activate(course)||

CourseActivity.deactivate(course)||

CourseActivity.activate(lesson)||

CourseActivity.deactivate(lesson));

Courses and Lessons search. There are multiple means to find a Course or a Lesson. This Process lists them.

πsearchCourse = (courses()||

CourseActivity.lessons(Course)||

CourseActivity.findCourse(Directory)||

CourseActivity.findLesson(Directory)||

CourseActivity.findLesson(Course,Directory));

7.5.5 Specific Roles

Course Creator. The Course Creator Role is responsible for proposing Courses and Lessons. It is also the Creator who has to modify the proposed Courses if any problem occurs. Thus the processes part of this Role are the following:πcoursePropositioncourseModificationlessonPropositionandπLessonmodification.

96 CHAPTER 7. PRM IN ACTION Course Manager. While the Creator who proposes and corrects Courses and Lessons, the Course Manager decides whether a Course or a Lesson is worth being proposed by the project. He also decides if a Course or a Lesson needs to be checked and be made invisible for any reason. The processes he undertakes areπcourseApprovallessonApprovalcheckCourse andπvisibilityCourse.

Course Evaluator. The Course Evaluator Role is responsible for evaluating Courses and Lessons every time the Course Manager requests it, or when a Course Creator proposes a new Course or Lesson.

This involves two different Processes:πcourseEvaluation andπlessonEvaluation.

Course User. Finally, the last Role defined by the Project team is Course User. As its name highlights it, this Role has access to the Courses and Lessons proposed by the Project. The related Process is:

πsearchCourse.

7.5.6 Specific Tasks attribution

The specific Roles defined in previous section have been dispatched as follows between the different participants to the Project.

RoleActivity.assignRole("‘Course Creator"’,Alex, OC);

RoleActivity.assignRole("‘Course Creator"’,Shelly, OC);

RoleActivity.assignRole("‘Course Manager"’,John, OC);

RoleActivity.assignRole("‘Course Evaluator"’,Alice, OC);

Course Creator. Alex and Shelly are chosen as Course and Lesson Creators for the Project. Their Task will be to propose courses and modify them if needed.

Course Manager. John receives the Role of Program Manager, thus he becomes responsible for the final choice of proposed Courses and Lessons. He can also switch the visibility of a Course or of a Lesson if needed.

Course Evaluator. Alice is chosen as the evaluator of the project. She will have to evaluate proposed Courses and Lessons and ask for modifications if needed.

Course User. Any registered Actor registered with the Project as a Contributor gets this role and thus can search for Courses and Lessons. This allows anyone to retrieve the content proposed by the project