If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Remove Run "All at once" option from jobs

Started by mpflug, 02 Jul 2010 08:15:41 AM

Previous topic - Next topic

mpflug

Does anyone know of a way to remove the run all at once option from cognos jobs?  I have users who like to overload my stack and block out other users by running 20-30 reports all at once.  I'd like to force them to run reports serially.

CognosPaul

Shouldn't be too difficult. Which version are you running?


CognosPaul

#3
The file that has the templates for that page is:
..\c8\templates\ps\logicsheets\presentation\dialog\ui-templates.xsl
Open that file with notepad++ (or another XML editor of your choosing).

Search for the string "IDS_PROP_JOB_PARALLEL" It should be on or around row 2052.
You should see the following code:
<dp:section1>
<utml:input type="radio" value="parallel" onclick="document.pform.m_jo_continueOnError.disabled=true;"/>
</dp:section1>
<dp:section2>
<dp:text>
<xts:string id="IDS_PROP_JOB_PARALLEL"/>
</dp:text>
</dp:section2>


You have two choices here. You can either delete or wrap it in the black list code so you can control who sees it. I would recommend wrapping it in the black list code so you can choose that only administrators can use it:

<out:if test=" not(contains($ui_black_list, ' RUN_JOBS_PARALLEL ')) ">
<dp:section1>
<utml:input type="radio" value="parallel" onclick="document.pform.m_jo_continueOnError.disabled=true;"/>
</dp:section1>
<dp:section2>
<dp:text>
<xts:string id="IDS_PROP_JOB_PARALLEL"/>
</dp:text>
</dp:section2>
</out:if>


You'll need to be my guinea pig on this. I can't restart the service here to test this modification.

mpflug

#4
Am I supposed to define ui_black_list somewhere?  As is it doesn't seem to have any effect.  I also tried removing the option all together and that didn't have any effect either.  I'm restarting after each change - is there a way i can be assured that the xsl is getting applied?  Any idea which xml file(s) this is being applied to?

tupac_rd

Paul is the expert, but did you also include 'RUN_JOBS_PARALLEL' in the system.xml file, just like you would do for other UIs you would be hiding.

mpflug

No - i didnt modify system.xml any for this because i didnt see any ui objects that were relevent.  can you elaborate a little on what you think should be added?

BTW - i just did a search over my entire cognos directory for "logicsheets/presentation/controls/ui-templates.xsl" and it didnt come back with anything.  Is it possible that file isnt being applied anywhere?


CognosPaul

It is entirely possible that modifications to that file won't have any effect. Cognos has a very nasty habit of duplicating (or triplicating or more) templates, and finding the right one can be a time consuming chore. It is also possible that the template in question is being stored in one of the JAR files. Some of the JAR files are archives of the XSL files. Cognos will use those before using any of the unarchived files, meaning you'd have to remove that JAR from the directory. Finding the correct JAR is even more of a chore than the correct xsl file.

The black list code
<out:if test=" not(contains($ui_black_list, ' RUN_JOBS_PARALLEL ')) ">
</out:if>
is Cognos proprietary. It would allow you to enter the parameter into the systems.xml so only specific groups could see it. It's a way of adding elements to the Elements you can hide document. Look at the Add or Hide User Interface Elements Based on Groups and Roles for details on using the black list.

As I said, I wasn't able to test it today. I'm hoping that I'll have some more spare time next week to research this.

mpflug

Ok, here's the secret.  Make the changes to ui-templates.xsl then delete portal.jar.  On restart Cognos will read in the files off the system rather than the precompiled xts files in the jar.

Thanks for the help!

mvjcognos

while creating job itself u will get the option of all at once and run sequentially u can select any one option u want..............

mpflug

I have a follow up to this.  I now want the default for "Continue on Error" to be checked, not unchecked.  This looks like the important part of the file to edit (line 2066 of ui-templates.xsl).  I've tried numerous combinations and can't get the box to be checked by default - anyone tried this before?


<dp:section1>
  <utml:input type="checkbox" value="true" name="m_ jo_continueOnError">
    <out:if test="(not(key('env-param','m_p_s equencing')) and /root/cm:queryResponse/cm:queryReply[2]/cm:jobDefinition/cm:sequencing!='sequential') or key('env-param','m_p_sequencing')!='sequential'">
      <out:attribute name="disabled">true</out:attribute>
    </out:if>
  </utml:input>
</dp:section1>


CognosPaul

Try doing:

<dp:section1>
  <utml:input type="checkbox" value="true" name="m_ jo_continueOnError" checked="checked" >
    <out:if test="(not(key('env-param','m_p_s equencing')) and /root/cm:queryResponse/cm:queryReply[2]/cm:jobDefinition/cm:sequencing!='sequential') or key('env-param','m_p_sequencing')!='sequential'">
      <out:attribute name="disabled">true</out:attribute>
    </out:if>
  </utml:input>
</dp:section1>