Job Submission filter (Project) RRS feed

  • Question

  • Hi im wondering if someone has a job submission filter that checks for valid project names to share with me?


    Thursday, February 2, 2012 12:45 PM

All replies

  • I think I can help you - what would be the condition for determining of a project name is valid or not?
    Sunday, February 5, 2012 6:52 AM
  • If the only thing you want to do is check for valid project names I would recommend creating and using a Job Template.
    Tuesday, February 7, 2012 12:30 AM
  •  Hi

    My thought was to use a "clusterwide" job submission filter that "checks" in a list (text file perhaps) of valid project names, i can ofcourse add in the jobtemplate but since im going to have a lot of templates and the projectnames will change often there is a risk im forgetting and to much administration.

    is this what you asked for


    Thursday, February 9, 2012 2:07 PM
  • Hi Steve,

    yes it shall only check for valid projectnames, i could use the job template but since im going to have a lot of different job templates and that the project names change very often it will be a lot of administration, so my thought was that a job submission filter should "look" in a perhaps simple textfile over valid project names.


    Thursday, February 9, 2012 2:10 PM
  • You can start with the submission filter samples found here: http://www.microsoft.com/download/en/details.aspx?id=26645

    Look for the "Submission JobSize" project and "Submission JobSize.cs" file.  For cluster-wide look in .exe tree.  For template filters look in .dll tree.

    In the job xml, the project attribute name is "Project".  The existing sample looks for "UnitType" so you can just change the string to "Project".

    Look for the line "XmlAttribute unitTypeAttr = attrCol["UnitType"];"

    Replace "UnitType" with "Project".

    Remove all the logic that delt with "UnitType".

    Add your Project filter logic.

    Mine looks like:

                    XmlAttributeCollection attrCol = job.Attributes;
                    XmlAttribute projectAttr = attrCol["Project"];
                    string projectValue = projectAttr.Value;
                    if (IsProjectNameOk(projectValue))
                        retval =  SubmissionFilterResponse.SuccessNoJobChange;
                        retval = SubmissionFilterResponse.FailJob;

    Here you must provide a bool method "IsProjectNameOk(string)" that implements loading/maintaining the authoritative list of "ok" project names... ultimately passing judgement on the given project name.

    Give that a try.


    • Edited by DarylMsft Thursday, February 9, 2012 9:27 PM + a bit of clarity
    Thursday, February 9, 2012 8:20 PM
  • Hi Daryl

    Thanks for this i will give it a try

    The problem for me is that my programing experience is low :(

    So if i could get some help through email conversation i would be very glad.

    Have a nice day

    Friday, February 10, 2012 9:02 AM
  • Hi,

    I've created an activation filter that I think will work for you, make sure you follow the instructions to get it propertly configured:



    Christian @ ScorpioTek

    • Edited by scorpiotek Tuesday, February 14, 2012 7:04 AM
    Tuesday, February 14, 2012 7:04 AM
  • Hi Christian

    Thanks i will give this a try.

    best regards


    Friday, February 17, 2012 8:45 AM