# You can read as well as I can, or maybe not

Occasionally, somebody will ask for help on a distribution list, and it turns into a really annoying case of hand-holding.

From: X

I'm using the XYZ toolset to do some document management, and I want the server to run a script whenever somebody tries to modify the master template, so it can run validations before accepting the update, such as verifying that the person making the change has received the proper approvals. Is that possible?

It turns out that this is something the XYZ toolset already knows how to do.

From: Raymond

You can create a conditions configuration file which adds a condition that validates that the request satisfies whatever conditions you require.

From: X

Yes, that is what I am looking for. Where can I find information on how to write the validation script and how to implement it on the server?

From: Raymond

On http://xyztoolset/, go to Server setup, then Conditions.

Another colleague with a lot of experience with the XYZ toolset stepped in with some more useful advice:

From: A

Instead of developing scripts from scratch, you may want to start with the pre-written scripts that come with the XYZ toolset add-on pack. There are already modules for things like scanning the Description field for approval IDs. Note also that you may want to include some way of changing the rules dynamically as your processes change (for example, maybe one of the approvers goes on vacation and delegates approval authority to somebody else, or maybe your project goes into a "no approval necessary" phase) rather than just hard-coding the rules.

From: X

That's a good idea. Is there a way to easily disable a validation script?

From: Raymond

Um, you can just build this into your validation script.

if (File.Exists(@"\\project\admin\no_validation")) {
return Validation.Passed;
}


From: A

Or you can have a magic word in the Description that disables validation. Features like this and the one Raymond describes are available in the add-on pack. Look in the Sentinel and Description­Match modules.

From: X

I'm having trouble getting this working. The documentation says I should do something like

<condition file="$\path\to\file.ext" action="C:\path\to\validate.xyz" />  If I use a shared network path for my validation script, I get "access denied". <condition file="$\Nosebleed\MasterTemplate.xml"
action="\\project\admin\validate.xyz" />


If I use an internal path:

<condition file="$\Nosebleed\MasterTemplate.xml" action="$\Scripts\validate.xyz" >


I get "file not found". I added \$\Scripts\validate.xyz to the document repository, so the server should be able to see it. Am I missing something obvious here?

(I like how this person just made up a feature, in this case, using a repository path as an action rather than a physical file path.)

From: Raymond

My psychic powers tell me that the account under which the server is running does not have access to \\project\admin\validate.xyz. And adding the validation script to the document repository allows the server to access it only if the server has an active (and up-to-date) workspace joined to the repository. Sure the server has a copy of validate.xyz, but that copy is in the repository database. (Adding a file to the repository is more than just a "copy" operation.)

I would not be surprised if having the server also maintain a live workspace in itself is not a recommended practice.

From: X

I agree with your assessment of the "access denied" issue, but I really don't want the validate.xyz script to reside on an external share. Where is the best place to put the script? On the server or a share?

From: Raymond

The documentation for the XYZ add-on pack recommends putting the scripts on the server, accessible via a share.

From: X

But that's what I did, and the result was "access denied."

From: Raymond

No, that's not what you did. The recommendation is to put the scripts on the server (C:\Scripts\validate.xyz) and then share out your scripts (net share Scripts=C:\Scripts) so administrators can update them remotely.

From: X

I read the XYZ Toolkit documentation for conditions, and it says "Get an IT-managed share created." I suppose I need to contact the IT department to have that done. Correct?

At this point, I got tired of hand-holding.

From: Raymond

You can read just as well as I can.

Privately, I sent a message to A:

From: Raymond
To: A

You can read just as well as I can.

Actually, that statement is a lie.

My colleague "A" replied, "Yes, I thought that to myself when you used that line last week, too!"

Comments (14)
1. It is absolutely assured that X has no access to this blog, right? ;)

2. Joshua says:

We call that making up a feature thing "magical thinking" and it's doubly annoying when we catch our own support reps at it.

3. Jack B Nimble says:

@Allgaeuer – Even if X can read, they are too lazy to do so.

4. dirk gently says:

@Allgaeuer, doesn't matter, he can't read anyway.

@Raymond: "whet"?

5. floyd says:

.f

6. Remind me not to try and get Raymond to do my job for me…

7. Joshua says:

Man and I always thought it was "wet" appetite, which referred to saliva.

8. Mark Ransom says:

That was an awful lot of setup for such a short punch line.

9. Avi says:

@Daniel

Forgive Timothy.  He reads as well as Raymond.

10. Timothy says:

Can you blame an end user for trying to maximize support options?  Why be a dick about it?  At my company you'd get fired for that.  You never indicated to the customer that they might be going over the line.  You just got frustrated and lashed out.  Sorry, you are an ***.

11. Daniel says:

Hey, it was a colleague, not a customer. Who's an *** here?

12. foo says:

An internal end user who annoys you like that is just a ***. Sorry to state the fact…. (star star star starts with c and ends with tee).

13. voo says:

Even if it was an actual customer that wouldn't change the fact that they were a lazy ass. It just means that you can't actually tell them.. one reason why you generally don't let the engineers talk directly to customers, most of them are horribly bad at being polite to lazy idiots.

14. benjamin says:

Raymond, I am in awe of your ability to put people in their place. I can only hope to one day be seen as such a wizard that I can do it and not get fired :)

Comments are closed.

Skip to main content