//  $0 - process responsible

namespace genproc {

    namespace PV { 
        include resources/blocks/baseline.txt(processManager,processSources,gitCM,"process management",spice_SUP8BP6); 

        include resources/blocks/jenkinsJob.txt (
            "create process view",
            processSources,
            "process view",
            genproc,
            genproc_PV_baseline
        );
    }
    
    extend activity PV_run {
        brief "This activity creates a human readable process description (this website).";
    }
    
    extend artefact PV_resultArtefact {
        brief "A human readable process description (a website).";
    }
    
    tool genproc {
        brief "A command line tool that compiles process sources into a human readable form (a website).";
    }
    
    artefact configurationItems {
        label "configuration items";
        brief "Here all configuration items are described.";
    }

    extend activity spice_SUP8BP2 {
        create genproc_configurationItems;
    }

    artefact configurationManagementPlan {
        label "Configuration management plan";
        brief "08-04 Configuration management plan";
        text md/spice/ConfigurationManagementPlan.md;
    }

    extend activity spice_SUP8BP1 {
        create genproc_configurationManagementPlan;
    }

    artefact problemManagementPlan {
        label "Problem management plan";
        brief "08-27 Problem management plan";
        text md/spice/ProblemManagementPlan.md;
    }

    extend activity spice_SUP9BP1 {
        create genproc_problemManagementPlan;
    }

    artefact changeManagementPlan {
        label "Change management plan";
        brief "08-28 Change management plan";
        text md/spice/ChangeManagementPlan.md;
    }

    extend activity spice_SUP10BP1 {
        create genproc_changeManagementPlan;
    }

    activity processDescription {
      label "create process description";
      brief "This activity describes the need of a detailed, revisioned and reviewed process description.";
      responsible $0;
      create processSources;
      subactivities
        genproc_PV_doBaseline,
        PV_maintainScript,
        spice_SUP9BP1,
        spice_SUP10BP1,
        spice_SUP8BP1,
        spice_SUP8BP2;
    }
    
    artefact processSources {
        label "Process sources";
        brief "A definition of all process steps in a special DSL.";
        contains 
            changeManagementPlan,
            problemManagementPlan,
            configurationManagementPlan,
            configurationItems;
    }
}