Is there a way to rename a Variable or Variable Group without breaking the references it already have in Tibco Business Works 5.x. Thanks.
A way you could do this is by editing the complete source code that is in XML. After taking a proper backup.
You could identify the variable or variable group XML tags to be renamed and rename them by using an advanced text editor with Regular expressions if is the case.
Once you rename everything you would have to open TIBCO Designer and go to the root location of the project and validate All. Validate the complete project.
A manual cleanup and re-built, testing would be required.
Avoiding changes in a massive scale is advised. Less Risk.
Related
We are in the process of trying to automate our build/deploy processes with the Release Management tool for Visual Studio (formerly InCycle).
The Release Management tool includes a facility to modify settings in a web.config (or app.config). However, there are situations where I'd like to be able to do more than this.
For example, we have URL rewriter rules to automatically redirect HTTP requests to HTTPS. But this won't work (at present) on our dev workstations. So, the "base" version of the web.config doesn't include the rewriter rules -- they are inserted at build/publish time via a web.config transform.
But the Release Management "configuration variable" mechanism won't let me specify more than a single line as a replacement value.
I realize I can remove line breaks, and condense an XML fragment to a single line of text. But I'd rather not have a web.config with lines that are several thousand characters long. And I suspect our IT folks -- who after all may also need to view/edit the file -- would feel rather more strongly about this than I do ;)
In general, the web.config transform mechanism had several modes: you could change a setting but also insert or replace (or delete) an entire section / XML element. While it's nice to no longer be restricted to web.config files (out of the box), the new functionality seems to be much more limited.
Am I missing something? Has anyone else found this to be an issue? What did you do to work around it?
You can still use xml transform to achieve what you want. Make sure that your transform are applied during your build, and the resulting web.config file available in your build output folder will be containing your URL rewriter rules. RM will pick it up from there and apply any other normal token replacement.
Here is a post that help in this regards: http://incyclesoftware.zendesk.com/entries/21487316-InRelease-with-Web-Deploy
If you have multiple stages in your release path, and for example the first stage should not have your URL rewriter section, than it may be a bit harder. You will need to apply your transform as part of your deployment. Multiple components/actions will need to be used for that (xcopy component, xml transform action/component).
I can't find it now, but I know there is some command line tool you can invoke to achieve your xml transformation as part of your deployment.
Apologies for my lack of knowledge about rewriter rules but can they exist in the base version of web.config and be set up so that they don't effectively do anything and 'rewrite' to HTTP?
If that's possible then the way I would do this is to configure a web.config.release file that will create a tokenised web.config via the transformation process. However, rather than use Web One Click Publish I use the /p:UseWPP_CopyWebApplication=true /p:PipelineDependsOnBuild=false arguments in the TFS build definition to apply the transformation. This then results in a build in the drops folder that is completely unaware about any environment it will be deployed to. You then simply use an XCopy Deployer-based component in RM to deploy the website and replace all the tokenised values for that environment. See my blog post here for more details of the technique.
This is my first attempt at creating linked work items in TFS. I'm using VS2010 TFS with the Agile template out of the box. I created a Requirements type Work Item for creating a class specifying several requirements. In Test Driven Design style I created a test project with tests for the requirements.
Now I would like to link the Requirements Work Item to the source code file with the tests. When I select the All Links tab in the Work Item window and then use the Link to button the dialog it brings up won't let me specify a source file. It seems to only want to link to another Work Item. I'd like to link it to the source file so when the requirements change there will be a link to the test source file to be changed. Is there a way to do this. Thanks in advance.
Jon Newbill
The way TFS associates work items with code is at checkin. One of the reasons for this is that a source file might implement many requirements, tasks and bug fixes over time. You want to associate the changes to the file to a work item, not the file itself.
A requirement (or bug fix or task) might involve changes to multiple files so you should checkin files in logical groups. I.e. if you've changed 3 source files and a config file to fix a bug then you can check those files in separately and associate the changes to the bug work item at each checkin. You could also check in all 4 files at the same time and associate that single checkin to the work item.
If you change 3 source files and a config file to fix a bug, and you have also changed another source file to add extra functionality, you should avoid checking this file in with the others as it will be held in the same changeset and associated with the same work items as the bug fix code.
In your specific case, if the requirements change then I think you should probably create a new work item. That way you can see the code that implemented the original requirement and the changes to the file will be associated to the change in requirements.
You can associate changesets to Work Items as seen in this picture
In Visual Studio, there are formatting rules found in the options menu that specify things such as where to include line breaks, how many spaces to use when tabbing (or to use tabs instead of spaces, etc.)
Is there a way to push these rules to each programmer's machine using a domain policy or some other way?
Those aren't actually rules -- they're preferences for automatic formatting applied by the IDE as you type. You can share those preferences by exporting them from one VS instance and importing them into another, but no amount of preference application will actually verify the contents of edited files.
If you want to actually apply rules regarding code formatting, you might want to consider using a tool like StyleCop.
http://www.phphosts.org/2010/05/share-the-same-visual-studio-settings-between-team-members/
That does not necessarily ENFORCE things though. You might have to do that in a login script after you figure out where those settings go.
Our VB6 guy was part of the last RIF (Reduction in Force). The work he did has been split between me and another developer. We often are both are making changes to projects at the same time. This isn't a problem with CVS since we are working in different areas. However VB6 seems to modify the Reference section and change the paths each time either of us touches a project. Since we don't have the exact same path setup for out source trees we run into merge conflicts on the vbp file all the time.
Is there any way around this other than the obvious method of changing our setup so we have the same directory structures?
I would suggest two things:
Don't commit the .vbp unless you add a file to the project.
Mark the .vbp as read-only and check it in as such into your repo. When users check it out, it should still be read-only which will prevent changes to reference paths (and seemingly random reordering of the file) from being saved. When you have to make a change to the project--make the file read-write, save the change and then make it read-only again before committing.
Depending on your version control system, it is possible to automate this problem away. Both Subversion and Mercurial support hooks - scripts that are triggered by certain events, like check out, update, or commit. We wrote a fairly simple script that was triggered on commit: it looked to see if there was a .vbp in the commit package, and if there was, ran a "normalisation" routine that
put all the .cls/.bas/.frm files at the top of the .vbp, in alphabetic order
put the references section in alphabetic order
lower-cased the reference paths
The rest of the file is left alone, since it's only the first three sections that VB seems to delight in messing about.
Consequently, most of the time when you commit, and haven't made any substantive changes to the .vbp, the hook script restores your .vbp file to a canonical, ordered, state (like a revert), which has the effect of removing it from the commit since it's no longer changed.
In the event that you do add a new file or reference to your project, the consistent alphabetical sorting of the VBP lines means that merge conflicts are avoided since your VC merge algorithm can easily and correctly detect the changes.
We wrote our script in Javascript and execute it using Windows Script Host since, for Windows boxes at least, this removes the dependency on an interpreter like Perl/Python.
Hooking up this script to new VB projects is a 30 second job. The advantage over other manual approaches is that you don't have make any conscious effort to deal with the VBP file. Just commit it with everything else and the script takes care of the rest.
I often find myself writing small (5-20 lines) files for things like input validation, reading a URL and so on. In fact, I probably write nearly the same files over and over because I either forget that I've already implemented such functionality in another project or I don't want to have to go searching for that file.
I want to know if there is a way to simply add code to a global repository from an IDE (in my case Visual Studio) and simply extract that code into whatever project I'm working on. It should be able to:
Extract code to a new file or to the currently open file in my IDE.
w.r.t. #1 I want smart defaults based on how I added the code to the repository.
Easy to use UI.
I don't need replacement/substitution of variables.
For instance, if I right click on a file I want to add to the repository then the default extraction operation is to create a new file. If, instead, I highlight some text in the currently open file and commit that, then the default is just to paste the snippet into the currently open file.
I've tried VS's snippet manager a few times, always with disappointment and quick abandonment. My biggest complaint is its interface and complexity required to add new code to it, plus the inability to extract the code to a file versus just inside whatever I have open.
You might want to check out ReSharper's Live Templates.
I don't use them to the extent that you're obviously looking for, but you can definitely create new file-based templates. I use that all the time when I create a new unit testing fixture class - just Add New Item -> From Template -> NUnit Test Fixture, where "NUnit Test Fixture" is one of my defined file templates.
Additionally, all the templates can be assigned a shortcut sequence, so you can auto-replace a given combination of text with a code snippet.
All the template configuration is file based, so you can save them to solutions or global workspaces as well.