Software AG Products 10.7 | CentraSite for Developers | Customizing CentraSite | Customization of CentraSite Business UI | Customizing CentraSite Content Page | Extending Activity Menu | Enable Activity through Configuration
 
Enable Activity through Configuration
After you define a custom activity as an extension you have to enable the activity configuration so as to display the activity in CentraSite Business UI.
Important:
The activity configuration parameters initially defined in the configuration file are editable and cannot be protected.
*To enable the custom activity configuration
1. Open the customization file, centrasite.xml, in a rich text editor.
You can find the centrasite.xml file on <CentraSiteInstall_Directory>\cast\cswebapps\BusinessUI\custom\conf.
2. Locate Activities Configuration under <CLL Configurations>.
The Activities snippet looks like this:
<Activities>
<Activity id="Create Assets"
class="com.softwareag.centrasite.api.
activity.impl.CreateAssetActivityImpl">
INMCL_ACTIVITY_CREATE_ASSET
</Activity>
<Activity id="Global Reports"
class="com.softwareag.centrasite.api.
activity.impl.GlobalReportActivityImpl">
INMCL_ACTIVITY_GLOBAL_REPORTS
</Activity>
<Activity id="Manage Organizations"
class="com.softwareag.centrasite.api.
activity.impl.ManageOrganizationsActivityImpl">
INMCL_ACTIVITY_MANAGE_ORGANIZATIONS
</Activity>
<Activity id="ManageGovernanceRules"
class="com.softwareag.centrasite.api.
activity.impl.ManageGovernanceRulesActivityImpl">
INMCL_ACTIVITY_MANAGE_GOVERNANCE_RULES
</Activity>
<Activity id="ManageTaxonomies"
class="com.softwareag.centrasite.api.
activity.impl.ManageTaxonomiesActivityImpl">
INMCL_ACTIVITY_MANAGE_TAXONOMIES
</Activity>
<Activity id="Asset Navigator"
class="com.softwareag.centrasite.api.
activity.impl.AssetNavigatorActivityImpl">
INMCL_ACTION_ASSETNAVIGATOR
</Activity>
</Activities>
3. Append the property configuration statement for custom activity. For example, Create Report Templates.
<Activities>
<Activity id="Create Report Templates"
class="com.softwareag.centrasite.api.
activity.impl.CreateReportTemplatesImpl">
INMCL_ACTIVITY_CREATE_REPORT _TEMPLATES
</Activity>
</Activities>
The input parameters are:
Parameter
Denotes
id
A unique identifier for the activity, in this example for Create Report Templates. It uniquely distinguishes an activity in the CentraSite registry. If you wish to reset the activity at a later stage, you identify the activity using this id.
class
The implementation class of com.softwareag.centrasite.api.activity.Activity interface.
INMCL_ACTIVITY
The i18n string to display the activity in CentraSite Business UI.
If you want to specify a localized name, type the message ID starting with a prefix INMCL (in this example, INMCL_ACTIVITY_CREATE_REPORT_TEMPLATES). The activity internally identifies the message ID and displays the localized name, if available in the message database. Else, if you specify a name without INMBU prefix, the activity will simply display a plain text name.
The Activities snippet now looks similar to this.
<Activities>
<Activity id="Create Assets"
class="com.softwareag.centrasite.api.
activity.impl.CreateAssetActivityImpl">
INMCL_ACTIVITY_CREATE_ASSET
</Activity>
<Activity id="Global Reports"
class="com.softwareag.centrasite.api.
activity.impl.GlobalReportActivityImpl">
INMCL_ACTIVITY_GLOBAL_REPORTS
</Activity>
<Activity id="Manage Organizations"
class="com.softwareag.centrasite.api.
activity.impl.ManageOrganizationsActivityImpl">
INMCL_ACTIVITY_MANAGE_ORGANIZATIONS
</Activity>
<Activity id="ManageGovernanceRules"
class="com.softwareag.centrasite.api.
activity.impl.ManageGovernanceRulesActivityImpl">
INMCL_ACTIVITY_MANAGE_GOVERNANCE_RULES
</Activity>
<Activity id="ManageTaxonomies"
class="com.softwareag.centrasite.api.
activity.impl.ManageTaxonomiesActivityImpl">
INMCL_ACTIVITY_MANAGE_TAXONOMIES
</Activity>
<Activity id="Asset Navigator"
class="com.softwareag.centrasite.api.
activity.impl.AssetNavigatorActivityImpl">
INMCL_ACTION_ASSETNAVIGATOR
</Activity>
<Activity id="Create Report Templates"
class="com.softwareag.centrasite.api.
activity.impl.CreateReportTemplatesImpl">
INMCL_ACTIVITY_CREATE_REPORT _TEMPLATES
</Activity>

</Activities>
4. Locate Activities Configuration under <UIProperties>.
The configuration snippet looks like this:
<Activities noOfActivitiesInMainNav="5">
<Activity id="CreateAssetBui" refId="Create Assets" numOfProfilesPerRow="3"
token="activity:Create_Assets" />
<Activity id="GlobalReportsBui" refId="Global Reports"
token="activity:Global_Reports" />
<Activity id="ManageOrganizationBui" refId="Manage Organizations"
token="activity:Manage_Organizations" />
<Activity id="ManageGovernaceRulesBui" refId="ManageGovernanceRules"
token="activity:governance_rules" />
<Activity id="ManageTaxonomiesBui" refId="ManageTaxonomies"
token="activity:manage_taxonomies" />
<Activity id="Asset Navigator" refId="Asset Navigator"
token="activity:Asset_Navigator" />
</Activities>
5. Append the defined custom activity (for example, Create Report Templates) configuration statement.
<Activity id="Create Report Templates"
token="customactivity:Create Report Templates"/>
The input parameters are:
Parameter
Denotes
refId
Refers to an unique identifier id for the activity, as defined in the CLL Configurations.
token
The place tokenizer of the activity that helps in rendering the activity as a deep link URL.
Important:
For rendering any custom activity, the place tokenizer should contain the customactivity: prefix. Thus for example, a custom activity Create Report Templates would have the place tokenizer read as customactivity:Create Report Templates.
The Activities now looks similar to this.
<Activities noOfActivitiesInMainNav="5">
<Activity id="CreateAssetBui" refId="Create Assets" numOfProfilesPerRow="3"
token="activity:Create_Assets" />
<Activity id="GlobalReportsBui" refId="Global Reports"
token="activity:Global_Reports" />
<Activity id="ManageOrganizationBui" refId="Manage Organizations"
token="activity:Manage_Organizations" />
<Activity id="ManageGovernaceRulesBui" refId="ManageGovernanceRules"
token="activity:governance_rules" />
<Activity id="ManageTaxonomiesBui" refId="ManageTaxonomies"
token="activity:manage_taxonomies" />
<Activity id="Asset Navigator" refId="Asset Navigator"
token="activity:Asset_Navigator" />
<Activity id="Create Report Templates" refId="Create Report Templates"
token="customactivity:Create_Report_Templates"/>

</Activities>
6. Save and close the configuration file.
7. Restart Software AG Runtime.