Showing posts with label Useful Tips. Show all posts
Showing posts with label Useful Tips. Show all posts

Purging Service in BCC


PurgingService is service which is used to purge older versions of assets in Publishing Schema. This component is available in Publishing.base module.


Question: I am using this service for first time. Are there any prerequisites?
Answer: Yes, following are the prerequisites that needs to followed.

1. Delete all "Author" state projects which are not in use for week or month.
2. Close all the projects which are waiting for acceptance.
3. Halt the BCC deployments if any.
4. Do not Create any project till the Purging service is complete. Accessing BCC is not advisable during purging. 
5. Increase the DB Transaction time out to MAX for PUB JVM.
6. Last, Take a back up of File system and Publishing DB.



Question: Okies, I have achieved above prerequisites. How should I proceed further?
Answer: Access the Dyn/admin of BCC and search for component "PurgingService". Entire Purging service is divided into following sections.

1. Generating Report

Generate Report stating how many assets are going to be purged. Provide Days prior to which assets needs to purged.


2. Submit Purge

Once report is generated, you can submit the for purging or cancel.



































Final result will be shown once the purge is complete.























Question: I am done with purging. Are there any post requisites?
Answer: Yes, Indexes in Publishing DB will be disturbed. Please rebuild indexes in Publishing DB.


Question: Cool. Are there any good to know information about Purging Service?
Answer: If you are planning to Purge assets older than 7 days, you can break it into small parts.
1. First purge assets older than 100 days.
2. Next purge assets older than 50 days.
3. And Lastly purge assets older than 7 days.

Before Running Purging Service in Production, it's good to be tried out in replica of Production first.

How to delete project from Front end of BCC

Deleting project from Front End of BCC

Note: This shall delete project along with project's associated process, assets, history.

To delete projects from front end of BCC, perform following steps.

1. Include the following jsp in custom BCC module's war.

File Name: delete-process.jsp

<%@ taglib uri="/dspTaglib" prefix="dsp" %>
<dsp:page>
<%@page import = "atg.epub.project.*" %>
<%@page import = "atg.dtm.*" %>
<%@page import = "atg.nucleus.*" %>
<%@page import = "javax.transaction.*" %>
<link href="style.css" type="text/css" rel="stylesheet"/>

<div style = "padding: 5px;">

<% boolean rollback = true;

TransactionManager tm=(TransactionManager)Nucleus.getGlobalNucleus().resolveName("/atg/dynamo/transaction/TransactionManager");
TransactionDemarcation td= new TransactionDemarcation();
        try {
            td.begin(tm);
            atg.deployment.server.SecurityManager.becomeTheSuperDood();
            ProcessHome processHome = ((ProcessHome) ProjectConstants.getPersistentHomes().getProcessHome());
            String processId = request.getParameter("process_id");
            if (processId == null) {
            out.println("TRYING HYPNOSIS TO GUESS PROCESS ID..... FAILED. Try explicitly specifying a process_id request parameter. ");
            return;
            }
            atg.epub.project.Process process =processHome.findById(processId);
            if (process == null) {
            out.println("wrong process_id parameter; not such process");
            return;
            }
            Project project = process.getProject();
            if (project == null) {
            process.delete();
            rollback = false;
            out.println("Process was found but there was no project associated with it. Process was deleted successfully.");
            return;
            }
            project.delete("publishing");
            out.println("Process with id " + processId + " was found and deleted successfully.");
            %>
            <br/> <input type = "button"
            onclick = "window.close()"
            value = "Cancel/Close"
            style = "font-size: 10px; background-color: #C3593C; color: white;"/> <% rollback = false;
        } catch (Throwable t) {
            t.printStackTrace(System.out);
            out.println(t);
        } finally {
            atg.deployment.server.SecurityManager.becomeNOTTheSuperDood();
        try {
        if (td != null) td.end(rollback);
        } catch (TransactionDemarcationException e) {
        e.printStackTrace();
        }
        }
%>
</div>
</dsp:page>


2. Identify the process id from DB using the following query.


select process_id from epub_process where display_name='name_of_project';



3. Hit the delete process URL, and pass the process id through request header.

<BCC_URL_Including_HTTP_PORT>/<context-root>/delete-process.jsp?process_id=<process_id>

ex: http://localhost:7005/mybcc/delete-process.jsp?process_id=prc162001




4. Following message confirms that the entire project is deleted.



Resetting admin password for dyn/admin

Resetting "admin" password for dyn/admin

Password after resetting: "admin123"

update das_account set password='c1f59dd0bb1078b65a6c7f19f312e83ef6823716da2ba864507f1bb2eb393799' where account_name='admin';
commit;


OR

Delete the admin row and reinsert.

delete from  das_account where account_name='admin';
Insert into das_account (ACCOUNT_NAME,TYPE,FIRST_NAME,LAST_NAME,PASSWORD,DESCRIPTION,
LASTPWDUPDATE) values ('admin',1,'Andy','Administrator',
'c1f59dd0bb1078b65a6c7f19f312e83ef6823716da2ba864507f1bb2eb393799',null,to_date(
'07-NOV-12','DD-MON-RR'));
commit;

ATG 10.1 BCC Localization

ATG 10.1 BCC Localization

ATG 10.1 BCC comes up with following 9 supporting languages.

  • Spanish (International Sort)
  • French (France)
  • German (Germany)
  • Italian (Italy)
  • Chinese (Simplified)
  • Dutch (Netherlands)
  • Portuguese (Brazil)
  • Swedish
  • Japanese
To view BCC in different languages, Create a user and assign locale to user.
1. Login to BCC, and open "Internal Users" under "Personalization".

2. Click on "+" to add new user.


3. Fill minimal following information under each tabs.

General: Login name, Password, Locale

Under Locale, provide the language that you prefer to use.

 
 Orgs & Roles : Assign "100001-member", "EPub-Admin" and "EPub-Super-Admin" to make new user as Admin.
Create user.

4. Log out and Login using newly created user.

Below example is of user with Spanish (Spain) as locale.

Spanish Home Page

Merchandising HomePage


Additional Info: ATG 10.0.3 supports following languages.

  • English (United States) (en_US)
  • French (France) (fr_FR)
  • Japanese (Japan) (ja_JP)
  • German (Germany) (de_DE)