cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

How to determine whether a filesystem folder is used as a sandbox (without project.pj)?

JensN.
14-Alexandrite

How to determine whether a filesystem folder is used as a sandbox (without project.pj)?

Hi all,

at the moment we're working with Integrity 10.7, but we are in the evaluation process to update to 11.0. And we are using some external tools to work with integrity, and these tools mostly are using the Java-API to Integrity.

Until now the external tools can create and use sandboxes, and for creating sandboxes they look into a choosed filesystem folder for the project.pj to determine whether this folder is already used as a sandbox. Since Integrity 10.8 the project.pj-files in the sandbox-folders are gone, and now we are searching for a new, quick solution to replace the old functionality.

Certainly we can use the API-connection to the integrity client and use the information the client is holding, but this would be much more complex than a quick look into a folder without opening a client-connection. As an idea: Is it possible to read the new database, which is holding all the sandbox information (bypassing the client)?

Thanks, Jens

7 REPLIES 7
MichaelChatel
20-Turquoise
(To:JensN.)

Can you not just reference the output or info returned by the "si sandboxes" command, as it will show you the currently registered sandboxes for that client?  Perhaps that's what you're already doing?

ex.

C:\>si sandboxes

c:\sandboxxes\project.pj -> c:/ALM/SAMPLE_DATA/project.pj (mchatel0l:7001)

The client-db for the project/sandbox registry is not readable outside Integrity.

JensN.
14-Alexandrite
(To:MichaelChatel)

Hi Michael,

thanks for your answer. For sure we can use "si sandboxes" over cli or a similar command over the API. But both ways require a connection at least to the client, maybe to the server. The old way to determine whether a filesystem folder is used as a sandbox or not was completely independent from any integrity connection, from any user context and very quick. Even if you are looking at a network share and you dont know, which different users had access to this share, you can see if a folder is used as a sandbox. And we still would like to have such a quick, independent way to look at this... 

kind regards, Jens

kthierer
12-Amethyst
(To:JensN.)

A pragmatic approch that comes to my mind would be

if the sandbox creator was doing something like:

N:\my_sandbox>si sandboxinfo > .si_sb_info

N:\my_sandbox>si projectinfo > .si_pj_info

This would even provide readable context information but its dependent on user discipline of course.

As for wishful thinking it would be nice if such tasks could be automated

by some kind of client side trigger mechanism.

(maybe 11.0 supports such a thing ? )

regards

Jürgen

I like this approach. Michael, what Jens is trying to explain is that he looks at the ".pj" file in any pre-10.9 version and knows that the folder is part of a sandbox.

As of 10.9, there are no pj files, so no way of knowing outside of the client simply by looking at the files in a folder.

I was considering simply adding a dummy file to every root of a potential sandbox in the project, but that is very ugly. Finding a way to automate creating a marker file in the root (or even all folders) after sandbox creation is better. Using custom actions relies on users doing it manually, so I'd look for a more automated solution. Is there some post-sandbox creation event that could be used for a client-side trigger?

JensN.
14-Alexandrite
(To:LLawton)

Putting an extra file into the sandbox-root (in the filesystem) is the only way i see at the moment. Even if we would use the si sandbox or si sandboxinfo commands, we would always be chained to the one clientside database, which is reachable in one user context. But what if this computer is used by more than one user? How can i look at all user profiles (in Windows) without always changing the user context? This isn't usable in any way...

 

kind regards, Jens

kthierer
12-Amethyst
(To:JensN.)

There once was a discussion of a coming import/export functionality of sandboxes.

https://community.ptc.com/sejnu66972/board/message?board.id=Integrity&message.id=405#M405

 

Anyhow, it seems that you don't mind the existence of a member of the same name in every subproject nor that that file/member really contains sandbox information.

 

I would be curious if it is possible to enforce such a thing with 11.0 by server side triggers on projects and subprojects.

 

Eg: if any project or subproject is beeing checkpointed,configured,created check for the existence of project.info

and (generate and) add it.

 

Juergen

JensN.
14-Alexandrite
(To:kthierer)

Hi,

 

sorry for the late answer, i was on vacation.

Today i've had a look into the admin guide and it seems that there isn't any sandbox-related si-command or event that can be used as a trigger event. Not on server side and also not on client side.

 

We also asked the people at PTC support, how we can simulate the old way to create *.pj files. They also didn't have another answer as "No". Interesting: PTC "still uses virtual representations of such .pj files" (quoted from their answer) in their application.

 

So the question is still the same: How can i determine whether a specific filesystem folder is used as sandbox without using the client, because this doesn't give the complete answer?

 

And: does a client "knows" whether a directory is already a sandbox, if it isn't created with this client?  In other words: Is it possible to "destroy" a sandbox at a network share, created and owned by user A from machine 1, by creating a sandbox by user B in the same directory with another client?

 

cheers, Jens

 

Announcements


Top Tags