Friday, 10 February 2017

Create Custom Workflow in ATG BCC

•    in ACC of BCC server, go to Workflow >> Publishing
•    Open common folderthat containd default workflow in it. Using UX of acc clock on new and create a new work flow as per your requirement and save it
•    You can find default workflow at below path
•    <<ATG_ROOT>>\Publishing\base\config\atg\registry\data\epubworkflows\Common.
•    After creating the work flow you have to register its ID with BCC UI. For this you have to overwrite “workflowActivitie.xml” and “merchandising.xml”. If you are using ATG 11.2 you have to use “contentmgmt.xml” instead of “merchandising.xml”
•    workflowActive.xml will have a default behavior explained in <<ATG_ROOT>>\DCS-UI\Versioned\config\config.jar
•    Also you can get default behavior of merchandising.xml in <<ATG_ROOT >>\DCS-UI\config\config.jar
•    contentmgmt.xml is defined under <<ATG_ROOT >>\ContentMgmt-UI\config\config.jar

•    To overwrite above mentioned two xml files create folder structure in config dir if folder structure is not there and create files with names specified.
        1.    /atg/commerce/web/workflowActivities.xml

        2.    /atg/remote/controlcenter/service/merchandising.xml

                            OR
            /atg/remote/controlcenter/service/contentmgmt.xml
          
•    Sample for the two xmls look like below.

workflowActivities.xml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE workflow-activities
        PUBLIC "-//Art Technology Group, Inc.//DTD General SQL Adapter//EN"
        "http://www.atg.com/dtds/activitymanager/activitymanager_workflows_1.0.dtd">

<workflow-activities>
<activity>
    <id>merchandising.myWorkflowManageCommerceAssets</id>
    <workflow-name>/Common/myWorkflow.wdl</workflow-name>
    <acl>Profile$role$epubAdmin:read;Profile$role$epubSuperAdmin:read;Profile$role$epubManager:read;Profile$accessRight$sitecatalogread:read;Profile$accessRight$sitecatalogfull:read;Profile$accessRight$mediaread:read;Profile$accessRight$mediafull:read;Profile$accessRight$storecontentread:read;Profile$accessRight$storecontentfull:read;Profile$accessRight$pricelistsread:read;Profile$accessRight$pricelistsfull:read;Profile$accessRight$storesread:read;Profile$accessRight$storesfull:read;Profile$accessRight$seotagsread:read;Profile$accessRight$seotagsfull:read;Profile$accessRight$promotionsread:read;Profile$accessRight$promotionsuser:read;Profile$accessRight$promotionsfull:read</acl>

    <resource-bundle>atg.remote.commerce.Resources</resource-bundle>
    <display-name-resource><<<<your key to displayname in resource bundle>>>>></display-name-resource>
    <description-resource><<<<your key to description in resource bundle>>>>></description-resource>
    
    <display-name-resource-2><<<<your key to displayname in resource bundle>>>>></display-name-resource-2>
    <description-resource-2><<<<your key to description in resource bundle>>>>></description-resource-2>
    <destination-page-2>
      <url>/ControlCenter/index.html</url>
      <activity-id>merchandising.browseCommerceAssets</activity-id>
      <clear-context>true</clear-context>
    </destination-page-2>
    
  </activity>


merchandising.xml


<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE applications
        PUBLIC "-//Art Technology Group, Inc.//DTD BCC Application Configuration //EN"
        "http://www.atg.com/dtds/application-configuration/application-configuration_1.0.dtd">

<applications>

  <application id="<<<<Same id as of activities.xml in my case it is merchandising.myWorkflowManageCommerceAssets>>>>">
    <resource-bundle>
      atg.remote.commerce.Resources
    </resource-bundle>
    <display-name-resource>
      <<your key to displayname>>
    </display-name-resource>
    <class-name>
      <<path of assetmanager of DividedApplicationInitializer depending on your req>>
    </class-name>
    <acl>
      Profile$role$epubAdmin:read;Profile$role$epubSuperAdmin:read;Profile$role$epubManager:read;Profile$accessRight$sitecatalogread:read;Profile$accessRight$sitecatalogfull:read;Profile$accessRight$mediaread:read;Profile$accessRight$mediafull:read;Profile$accessRight$storecontentread:read;Profile$accessRight$storecontentfull:read;Profile$accessRight$storesread:read;Profile$accessRight$storesfull:read;Profile$accessRight$promotionsread:read;Profile$accessRight$promotionsuser:read;Profile$accessRight$promotionsfull:read
    </acl>
    <initializer>
      <</atg/remote/commerce/service/MerchandisingAssetManagerInitializer or /atg/remote/commerce/service/DividedApplicationInitializer >>
    </initializer>
    <configuration>
      /atg/remote/commerce/assetmanager/MerchandisingConfiguration
    </configuration>
    <property name="flexApplicationId" value="merchandising.flex.manageCommerceAssets"/>
    <sort-priority>
      10
    </sort-priority>
    <category>
      /Common/myWorkflow.wdl
    </category>
  </application>
</applications>


NOTE: contentmgmt.xml sample is identical to merchandising.xml.

2 comments:

Anonymous said...

Hi,
I have created my new workflow, but now there are 4 options( 2 options under commerce Merchandising,1 under site administration, 1 under content administration) for creating project. Among these 3 options are to create project with the new workflow and one old option to create project with common workflow. Can you please tell me why i am seeing 3 additional options for creating projects. Also 2 options under commerce merchandising are not working, its throwing error application id not found even after creating workflowActivities.xml and contentmgmt.xmls in the place.

Anonymous said...

This is very helpful. This helps us in ATG migration from 10.X to 11.X

Post a Comment

 
;