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 the 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 custom configuration file.
2. Locate the Activities Configuration section under CLL Configurations.
Sample configuration snippet:
<CLLConfigurations>
<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.
ManageOrganizationsImpl">
INMCL_ACTIVITY_MANAGE_ORGANIZATIONS
</Activity>
<Activity id="ManageGovernanceRules"
class="com.softwareag.centrasite.api.activity.impl.
ManageGovernanceRulesActivityImpl">
INMCL_ACTIVITY_MANAGE_GOVERNANCE_RULES
</Activity>
<Activity id="Asset Navigator"
class="com.softwareag.centrasite.api.activity.impl.
AssetNavigatorActivityImpl">
INMCL_ACTION_ASSETNAVIGATOR
</Activity>
...
</Activities>
</CLLConfigurations>
3. Append the required custom activity (for example, Create Report Templates) configuration statement.
<CLLConfigurations>
<Activities
<Activity id="Create Report Templates"
class="com.softwareag.centrasite.api.activity.impl.
CreateReportTemplatesImpl">
INMCL_ACTIVITY_CREATE_REPORT _TEMPLATES
</Activity>
</Activities>
</CLLConfigurations>
wherein,
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 Configuration section now looks similar to this.
<CLLConfigurations>
<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.
ManageOrganizationsImpl">
INMCL_ACTIVITY_MANAGE_ORGANIZATIONS
</Activity>
<Activity id="ManageGovernanceRules"
class="com.softwareag.centrasite.api.activity.impl.
ManageGovernanceRulesActivityImpl">
INMCL_ACTIVITY_MANAGE_GOVERNANCE_RULES
</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>
</CLLConfigurations>
4. Locate the Activities Configuration section under BUI Configurations.
The configuration snippet looks like this:
<UIProperties>
<Activities noOfActivitiesInMainNav="5">
<Activity refId="Create Assets" numOfProfilesPerRow="3"
token="activity:Create Assets"/>
<Activity refId="Global Reports"
token="activity:Global Reports"/>
<Activity refId="Manage Organizations"
token="activity:Manage Organizations"/>
</Activities>
</UIProperties>
5. Append the defined custom activity (for example, Create Report Templates) configuration statement.
<Activity refId="Create Report Templates"
token="customactivity:Create Report Templates"/>
wherein,
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: | Be aware that 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. |
|
Now the Activities Configuration section looks similar to this.
<UIProperties>
<Activities noOfActivitiesInMainNav="5">
<Activity refId="Create Assets" numOfProfilesPerRow="3"
token="activity:Create Assets"/>
<Activity refId="Global Reports"
token="activity:Global Reports"/>
<Activity refId="Manage Organizations"
token="activity:Manage Organizations"/>
<Activity refId="Create Report Templates"
token="customactivity:Create Report Templates"/>
</UIProperties>
6. Save and close the configuration file.
7. Restart Software AG Runtime.