namespace minimalSPICE {

include resources/blocks/spice_SWE1.txt;
//include resources/blocks/spice_SWE2.txt;
//include resources/blocks/spice_SWE3.txt;
//include resources/blocks/spice_SWE4.txt;
//include resources/blocks/spice_SWE5.txt;

include resources/blocks/spice_SUP2.txt;
include resources/blocks/spice_SUP8.txt;
include resources/blocks/spice_SUP9.txt;
include resources/blocks/spice_SUP10.txt;

//include resources/blocks/spice_MAN5.txt;

include resources/blocks/genproc.txt(
    processManager
);

include resources/processes/minimalSPICE_MAN3.txt;
include resources/processes/minimalSPICE_SYS1.txt;
include resources/processes/minimalSPICE_SYS2.txt;
include resources/processes/minimalSPICE_CustomerCommunication.txt;

//*****************************************************************

 namespace spice {
     activity SUP4 {
        label "Joint Review"; 
        brief "SUP.4: The purpose of the Joint review process is to maintain a common understanding with the stakeholders of the progress against the objectives of the agreement and what should be done to help ensure development of a product that satisfies the stakeholders. Joint reviews are at both project management and technical levels and are held throughout the life of the project.";
    }
}

role processManager {
    label "process manager";
    brief "The process manager is responsible to write down, version and visualize the process.";
}

role jenkinsRole {
    label "Jenkins";
    brief "Jenkins is an automation engine with an unparalleled plugin ecosystem to support all of your favorite tools in your delivery pipelines, whether your goal is continuous integration, automated testing, or continuous delivery.";
}

role projectManager {
    label "project manager";
    brief "The process manager is the overall responsible for a project";
    text md/project_manager.md;
}

role productManager {
    label "product manager";
    brief "The responsible to represent the customer inside the project.";
    text md/minimalSPICE/productManager.md;
}

role developer {
    label "Developer";
    brief "Responsible for the technical aspects of the project.";
}

process process {
    label "minimal SPICE";    
    responsible projectManager;
    create projectDocumentation;
    repository git,jenkins,forum,mantisRepository;
    subactivities
        projectManagement,
        genproc_processDescription,
        configurationManagement,
        customerCommunication,
        develop,
        requirementsManagement;
    text md/minimalSPICE/process.md,
         md/minimalSPICE/spice.md;
}

activity requirementsManagement {
    label "requirements management";
    brief "All actions which belong to the requirements.";
    subactivities 
        spice_SYS1BP1, 
        spice_SYS2BP1,
        spice_SWE1BP1;
}

extend activity spice_SYS1BP1 {
    subactivities 
        stakeholderReq_addComment, 
        stakeholderReq_schedule, 
        stakeholderReq_close;
}

activity configurationManagement {
    label "Configuration Management";
    subactivities
        continiousIntegration,
        spice_SUP8BP6;
}

activity develop {
    label "Develop";
    responsible developer;
    subactivities
        stakeholderReq_maintainScript,
        technicalReviews,
        PR_reportIssueSolved,
        CR_reportIssueSolved,
        maintainGenerateDocumentationScript;
}

activity technicalReviews {
    label "Technical reviews";
    subactivities 
        feasibility_addComment,
        PR_technicalPreview,
        CR_technicalPreview,
        systemReq_addComment;
}

repository jenkins {
    label "Jenkins";
    brief "Jenkins, as a buils server, archives the build artefacts.";
    contains
        genproc_PV_jobFolder,
        stakeholderReq_jobFolder,
        projectDocumentationFolder;
}

tool gitCM {
    label "git";
    text md/git_tagging.md;
}

repository git {
    label "git";
    contains 
        projectManagementFolder,
        processManagementFolder,
        technicalFolder,
        metaData;
}

tool mantisTool {
    label "Mantis";
    text md/mantis/mantis_tool.md,
        md/mantis/guidelines.md; 
}

tool linkTool {
    label "link tool";
    brief "This small toll can parse requirement descriptions in markdown and add backward links.";
    text md/minimalSPICE/extended_markdown.md; 
}

repository mantisRepository {
    label "Mantis database";
    contains CRfolder, PRfolder;
    text md/mantis/mantis_tool.md; 
}

folder metaData {
    label "meta data";
    brief "The git repository meta data.";
    contains tags, branches;
}

folder tags {
    label "tags";
    brief "In this folder git stores the tags (baselines).";
    contains 
        PM_baseline,
        stakeholderReq_baseline,
        systemReq_baseline,
        genproc_PV_baseline;
}

folder branches {
    label "branches";
    brief "In this folder git stores the branches (development lines).";
}

folder technicalFolder {
    label "technical";
    contains requirementsFolder;
}

folder requirementsFolder {
    label "requirements";
    contains 
        stakeholderRequirements,
        SystemRequirements;
}
        
folder CRfolder {
    label "changes requests";
    contains CR_issue;
}
        
folder PRfolder {
    label "problem reports";
    contains PR_issue;
}
        
tool forumTool {
    label "phpBB";
    brief "phpBB is a free flat-forum bulletin board software solution that can be used to stay in touch with a group of people or can power your entire website.";
}

repository forum {
    label "phpBB";
    brief "phpBB is a free flat-forum bulletin board software solution that can be used to stay in touch with a group of people or can power your entire website.";
    contains projectReviews, requirementReviews;
    text md/mantis/mantis_tool.md; 
}

folder processManagementFolder {
    label "Process management";
    brief "Contains process management specific files.";
    contains genproc_processSources;
}

tool doxygen {
    label "Doxygen";
}

activity generateDocumentation {
    label "generate documentation";
    brief "compiles a documentation view in html.";
    tool doxygen;
    transform 
        stakeholderReq_resultArtefact,
        projectPlan,
        projectDocumentationScript;
    create projectDocumentation,projectPlanViev,reqirementView;
}

activity maintainGenerateDocumentationScript { 
    label "maintain 'project documentation' script"; 
    create projectDocumentationScript; 
} 

artefact projectPlanViev {
    label "project plan view";
    brief "A generated view (human readable form) of the project plan.";
}

artefact reqirementView {
    label "requirement view";
    brief "A website that contains all requirements bidirectional linked.";
}

artefact projectDocumentation {
    label "project documentation";
    brief "A html site containing all project relevant documentation.";
    contains projectPlanViev,reqirementView;
}

artefact projectDocumentationScript {
    label "project documentation script";
    relations PM_baseline;
}

artefact projectDocumentationLog {
    label "project documentation log";
}

folder projectDocumentationFolder { 
    label "project documentation"; 
    contains  
        projectDocumentationScript, 
        projectDocumentation, 
        projectDocumentationLog; 
}

activity continiousIntegration {
    label "continious integration";
     responsible jenkinsRole;
     subactivities
        genproc_PV_run,
        stakeholderReq_run,
        generateDocumentation;
}


}