Show TOC

Background documentationModule is Created in or Deleted from Workspace Locate this document in the navigation structure

 

You can respond to the module creation or deletion events by implementing actions such as creating or deleting the module-related resources in a back-end system. To register for these events, you need to create a property com.sap.workspaces.module.metadata.extension~lifecycle in the portalapp.xml , for example:

<property name="com.sap.workspaces.module.metadata.extension~lifecycle" value="prt_service:com.yourname.portal.workspaces.modules.MyExtensionService"/>

To respond to the module creation or deletion events, implement the following functions:

Example Example

  1. public void onCreate(IModuleContext context) throws ModuleLifecycleException
    {
    // Create resources in a back-end system
    }
    
    
    public void onDelete(IModuleContext context) throws ModuleLifecycleException
    {
    // Clean up resources in a back-end system
    }
    
End of the source code.