Creating a simple view mapping in BCC


Creating a simple view mapping in BCC(With one tab on right panel of BCC)


To create simple view mapping, please follow the below steps. Providing the add-items, as these can be executed in Dyn/admin, ViewMapping repository (/atg/web/viewmapping/ViewMappingRepository).

Step 1: Create "Attribute" for resource bundle ( Not required, if your RDF doesn't contain Resource-Bundle)
<add-item item-descriptor="attributeValue" id="MYAvRESBnd">
  <set-property name="value"><![CDATA[/my/Resources]]></set-property>
</add-item>


Step 2: Create "Attribute" for Category name used in RDF.
<add-item item-descriptor="attributeValue" id="MYAvAddressGenCat">
  <set-property name="value"><![CDATA[BasicInfo]]></set-property>

</add-item>

from RDF: category-resource="BasicInfo"

Step 3: Create itemViewMapping for Tab.
<add-item item-descriptor="itemViewMapping" id="MYIvmAddressGeneral">
  <set-property name="name"><![CDATA[AssetManager Address general itemViewMapping]]></set-property>
  <set-property name="displayName"><![CDATA[Address Details]]></set-property>
  <set-property name="view"><![CDATA[AmIvDef]]></set-property>
  <set-property name="attributeValues"><![CDATA[includedCategories=MYAvAddressGenCat,resourceBundle=MYAvRESBnd]]></set-property>

</add-item>

Step 4: Create itemMapping for item-desctiptor of RDF.
<add-item item-descriptor="itemMapping" id="MYImAddress">
  <set-property name="name"><![CDATA[AssetManager]]></set-property>
  <set-property name="description"><![CDATA[AssetManager Address itemMapping]]></set-property>
  <set-property name="mode"><![CDATA[AmMmDef]]></set-property>
  <set-property name="itemPath"><![CDATA[/my/Address]]></set-property>
  <set-property name="itemName"><![CDATA[address]]></set-property>
  <set-property name="formHandler"><![CDATA[AmFhDef]]></set-property>
  <set-property name="viewMappings"><![CDATA[MYIvmAddressGeneral]]></set-property>

</add-item>

Right Panel of Asset Editor


Showing "Import" and "Export" options for Site-Admin UI

Showing "Import" and "Export" options for Site-Admin UI

To enable the Import Button & Export Option in Site-Admin UI, please follow below mentioned steps.This can help you to import the xls and export the xls for Site-Assets.

Step 1: Override the taskConfiguration file.
Path: /config/atg/remote/multisite/assetmanager/taskConfiguration.xml

<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE task-configuration
        PUBLIC "-//Art Technology Group, Inc.//DTD Asset Manager Task Configuration//EN"
        "http://www.atg.com/dtds/task-configuration/task-configuration_2.0.dtd">

<task-configuration>
 <task id="siteadmin.manageSiteAssets" inherit-from="siteadmin.browseSiteAssets">
    <activity-id>
      siteadmin.manageSiteAssets
    </activity-id>
      <!-- Enabling the Import Button -->
    <property name="showImportButton" value="true"/>
 </task>
</task-configuration>





Site-Admin UI with "Import" Enabled



Step 2: Override the SiteAdminToolbar with following content.
Path: /config/atg/remote/multisite/toolbar/SiteAdminToolbar.xml

<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE browse-hierarchy
  PUBLIC "-//Art Technology Group, Inc.//DTD Asset Manager Browse Hierarchy//EN"
  'http://www.atg.com/dtds/toolbar/toolbar_1.0.dtd'>

<toolbar
    resource-formatter="/atg/remote/multisite/ResourceFormatter">
      
 <operation-menu id="siteOperationMenu">
    <toolbar-scope asset-area="siteadmin" pane-id="browse"/>
    <operation-menu-item id="export" />
  </operation-menu>

  <operation id="export"        label-resource="toolbar.action.label.export"
                                event="AssetManager.export"
                                active-for-selected-item-count="ONE-OR-MORE"
                                shortcut-resource-bundle="ATGResources"
                                shortcut-resource-key="operation.export.shortcut"
                                shortcut-modifiers="CTRL"/>
</toolbar>


Export XLS for Site Assets



Accelerating the deployments in BCC

Clean up the Publishing DB using following scripts to accelerate deployments in BCC.




DELETE FROM das_deployment;
DELETE FROM das_depl_depldat;
DELETE FROM das_depl_options;
DELETE FROM das_depl_repmaps;
DELETE FROM das_depl_item_ref;
DELETE FROM das_depl_progress;
DELETE FROM das_thread_batch;
DELETE FROM das_deploy_data;
DELETE FROM das_dd_markers;
DELETE FROM das_deploy_mark;
DELETE FROM das_rep_mark;
DELETE FROM das_file_mark;
DELETE FROM das_dep_fail_info;
COMMIT;

Retaining Project to previous stage in BCC

Retaining Project to previous stage in BCC




a.       If BCC instance is killed while deployment to staging is in progress, use the following queries to get project back to "Author" State.

-- remove asset locks on the project. if any
delete from avm_asset_lock where workspace_id =
(select id from avm_devline where name =
(select workspace from epub_project where project_id = '<Your Project ID>'));

-- change states. Locked to false a
nd editable to true
--   locked to 0 and editable to 1

update epub_project
set locked=0
where project_id = '<Your Project ID>';

update epub_project
set editable=1
where project_id = '<Your Project ID>';

-- change states. Locked to false and editable to true
--   locked to 0 and editable to 1
update avm_workspace
set locked=0
where ws_id =
(select id from avm_devline where name =
(select workspace from epub_project where project_id = '<Your Project ID>'));

update avm_workspace
set editable=1
where ws_id =
(select id from avm_devline where name =
(select workspace from epub_project where project_id = '<Your Project ID>'));

-- finally change state to author which is 3 for all workflows
update epub_ind_workflow
set state=3
where process_id =
(select process_id from epub_process where project='<Your Project ID>');
commit;

 
Clear the following Cache
/atg/epub/PublishingRepository/
/atg/epub/version/VersionManagerRepository/

If BCC instance is killed while deployment to Production is in progress, use the following queries to get project back to previous state, so that you can redeploy.

--If project with workflow editCommerceAssets.wdl
--stuck while deploying to production

update epub_ind_workflow
set state=11
where process_id =
(select process_id from epub_process where project = '<Your Project ID>');
commit;

-- For projects which are created by auto import workflow

-- If project with /Commerce/autoImportAssets.wdl workflow
-- stuck while production

update epub_ind_workflow
set state=10
where process_id =
(select process_id from epub_process where project = '<Your Project ID>');
commit;


Clear Cache of following
/atg/epub/PublishingRepository/

 


Completely delete project from versioned DB

Completely delete project from versioned DB


Find out the Project Id using the following query.

select project_id from epub_project where display_name='<Your Project Name>';

Execute the following queries using the project id.

-- Removing locks of the project if any
delete from avm_asset_lock where workspace_id in
(select id from avm_devline where name in
(select workspace from epub_project where project_id = '<Your Project ID>'));

-- delete history of the project
delete from EPUB_PR_HISTORY where project_id in
(select project_id from epub_project where project_id = '<Your Project ID>');

-- delete the project
delete from epub_project where project_id = '<Your Project ID>';

-- delete history of the process
delete from EPUB_PROC_HISTORY where process_id in
(select process_id from epub_process where project = '<Your Project ID>');

-- delete task information of process
delete from EPUB_PROC_TASKINFO where id in
(select process_id from epub_process where project = '<Your Project ID>');

-- delete states of project (if any)
delete from EPUB_WORKFLOW_STRS where id in
(select ID from EPUB_IND_WORKFLOW where process_id in
(select process_id from epub_process where project = '<Your Project ID>'));

delete  from EPUB_IND_WORKFLOW where process_id in
(select process_id from epub_process where project = '<Your Project ID>');

-- finally delete the process
delete from epub_process where project = '<Your Project ID>';

commit;