Focal Point
[SOLVED] How to change multiple files in WF8 Content folder?

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3587005376

November 12, 2014, 10:23 AM
J.Hines
[SOLVED] How to change multiple files in WF8 Content folder?
I have about 100 files in one of my Content (MRE) (WFC/Repository) folders (what's the best way to refer to this area?), and I need to change something in each one of them to make them WF8 compatible. Specifically, I was doing an INCLUDE in each file that looked like:
 -INCLUDE app/whatever.fex 

and now I have to take off the "app/" to make it work.

For files in the reporting server, this kind of thing is easy, as I just bring them down to my local machine, fire up Sublime Text, and do a find/replace in all files, save them, and put them back on the server and I'm done in two minutes.

Is there any way to do a similar thing with WFC/Repository "files" since they're not actually files, or am I stuck modifying them individually in App Studio?

This message has been edited. Last edited by: J.Hines,



Prod: 8.2.0.4 OS:Windows 10 Output:AHTML, Excel 2007+

The life of a designer is a life of fight against the ugliness.
November 12, 2014, 10:30 AM
njsden
I haven't attempted this myself (yet Smiler ) but have you tried exporting your folder using Change Management in RAW format? you could in theory modify your files with your favourite editor and then use Change Management to import them back.

Hopefully you have some sort of "sandbox" environment to play with this so you won't break anything important in case something fails.

In order to export in RAW format, you'll need to go to WebFOCUS Administration Console / Configuration / Application Settings / Change Management and set IBI_CM_Format_Raw to "true". Otherwise, you'll end up with a whole bunch of XML files with base64-encoded content, which is okay for images and other binary files for not for you .fex procedures!

Please let us know it this works for you ... I may finally gain enough confidence to try it myself Big Grin



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
November 12, 2014, 10:59 AM
J.Hines
Ooo, fascinating. I'm giving this a shot right now. I toggled that setting, created an export scenario, and exported it, but I'm not seeing the folder I should. Here's the help text from the admin console:
quote:
The exported original files are saved in a folder called root_content in the export location specified by the IBI_Export_Directory setting.


However, though the export gets created, I'm not seeing a directory called root_content, just the regular root directory.

Do you think I need to restart anything for the setting to take effect?



Prod: 8.2.0.4 OS:Windows 10 Output:AHTML, Excel 2007+

The life of a designer is a life of fight against the ugliness.
November 12, 2014, 11:13 AM
Francis Mariani
Look for the Change Management Export folder in the default path - Drive:\WebFOCUS80\cm\export


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
November 12, 2014, 01:09 PM
J.Hines
@Francis: I did, and I see the package there right after I export it, so the export is working, but it just appears that the IBI_CM_Format_Raw setting isn't doing anything because "root" is the only directory in the export folder, while the help text indicates there should be a second folder called "root_content"



Prod: 8.2.0.4 OS:Windows 10 Output:AHTML, Excel 2007+

The life of a designer is a life of fight against the ugliness.
November 12, 2014, 01:16 PM
MattC
What you could do is copy everything from your content folder in DS to your local desktop, make the change you need, then delete everything in your content folder and then copy it back in.


I would test it out before you start deleting of course.

If I move code or html in the content area from one SiteMinder protected environment to another I have to take my above approach, but usually it's a couple of programs and when I copy them in I end up renaming them to the original and changing the original to a _bckp.


WebFOCUS 8.1.05
November 12, 2014, 01:27 PM
J.Hines
*FACEPALM*

I forgot about Dev Studio for a bit, but yes, I can use that whenever I need to copy files straight out. I'm surprised that it works with Content stuff since they're not real files, but it does work, thank you. Why the newer, better App Studio doesn't allow drag-and-drop I can't figure out, but there you have it.



Prod: 8.2.0.4 OS:Windows 10 Output:AHTML, Excel 2007+

The life of a designer is a life of fight against the ugliness.
November 12, 2014, 01:30 PM
Francis Mariani
IBI_CM_Format_Raw set to “True”.

I tested this in v8.0.08 and it worked - I have root and root_content sub-folders for my package folder.

In v8.0.07, maybe it doesn't work.

In v8.0.08, it creates the root_content sub-folder and can be used for reading only.

In v8.0.09, I've heard you can make changes to the contents of the root_content sub-folder and then copy the package to the other environment for impost and the changed files will be imported.

Some version post v8.0.09, I was warned that the package will be zipped and digitally signed - so no changes.

Overall I think the Change Management tool is rudimentary and will most likely never really be improved.

When in the export phase, in the file selection screen you cannot see the attributes of the files, Date Modified, User ID, etc. - this information is invaluable in selecting files to export.

Also, I cannot believe you cannot save the package to the desktop, so that moving the file to another server is under your control.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
November 12, 2014, 01:44 PM
Francis Mariani
If you set a Windows program as your text editor for .fex and .HTML files, from Dev Studio and App Studio you can (one at a time) right-click the files and select edit in external editor. Once you have all the files open in the text editor, you can make global changes and save the files. Normally, they get saved back to Dev Studio or App Studio, but once in a while, there's a hiccup with App Studio and the file isn't updated.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
November 12, 2014, 11:57 PM
njsden
quote:
Why the newer, better App Studio doesn't allow drag-and-drop I can't figure out, but there you have it.


Newer: yes. Better: hmmm, I have serious doubts about it.

Being unable to drag-and-drop content or have more than one window/tab open concurrently on the screen to compare or move content around are annoying limitations, and the fact that you can't edit HTML files with the tool (unless you use an external editor) is not something you'd expect from a Development tool. Yes, I understand that they want tight control over HTML Composer pages created by the tool as it's possible to break their delicate internal metadata, but what about HTML pages *not* created with Composer or created in a previous version such as WF77?

I'll stick to Developer Studio 8 for as long as it is available, thank you very much.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
November 13, 2014, 09:43 AM
Francis Mariani
So, you set up your favourite external text editor to edit htm files.

Now, every time you log in to Windows and start Internet Explorer, you will be confronted by this:



You have to remember why you get this message, and select "No, never ask again (until the next time I log in)".


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
September 25, 2015, 10:31 AM
J.Hines
@njsden, @Francis,
Just to update, I tried the export in an 8.1.0.4 environment, with the RAW option, and I do get a root_content folder.

I was able to open that up, and using Sublime Text make my change to all the files at once, save them all at once, and then just moved the package from cm/export to cm/import, and it imported fine, with my changes.

Thanks again!



Prod: 8.2.0.4 OS:Windows 10 Output:AHTML, Excel 2007+

The life of a designer is a life of fight against the ugliness.
September 25, 2015, 04:07 PM
Francis Mariani
That's great news!


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
September 26, 2015, 12:21 AM
njsden
That's very interesting. I always thought that even in the presence of "root_content", the import utility always looked for the base64-encoded "root" stuff to import.

Thanks a lot for sharing.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
June 13, 2016, 09:11 AM
Mike in DeLand
quote:
Originally posted by J.Hines:
@njsden, @Francis,
Just to update, I tried the export in an 8.1.0.4 environment, with the RAW option, and I do get a root_content folder.

I was able to open that up, and using Sublime Text make my change to all the files at once, save them all at once, and then just moved the package from cm/export to cm/import, and it imported fine, with my changes.

Thanks again!


Hey, where exactly do you to the export/import? I need to do something similar, and I don't see "export" anywhere. Is it in App Studio or on the console?


Webfocus 8
Windows, Linux
June 13, 2016, 10:19 AM
Francis Mariani
Mike, Change Management is a Resource Tree option. You need to access the Change Management link that's on the 'default' B.I. Portal page, or on one of your custom B. I. Portal pages if you selected it as an option.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
June 13, 2016, 10:35 AM
Mike in DeLand
Found it, thanks! My resource tree was long enough that the Change Management fell of the bottom. Same as at home - I can never find anything if it's under something or behind something else. Luckily, I keep my beer on a shelf all by itself in the fridge.


Webfocus 8
Windows, Linux
June 13, 2016, 11:14 AM
Francis Mariani
In my WF 8.0.08 world, there's a yuge problem with the Resource Tree - if a folder's content list is quite long, I have to click on an item four or five above the item I'm interested in.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server