Home

 

Export activities


Overview

Use administrative commands to export activities.

To transfer standard activity content from one system to another, you can export the activities to an external and then import them to the new system. This does not apply to community activities. You can only import community activities to the same deployment from which they were exported.

Use wsadmin

The data associated with the Activities feature is stored in more than one place...


Export activities

  1. Start the Activities Jython script interpreter.

    1. Access the Activities configuration file:

      If prompted to specify which server to connect to, type 1.

      The information about which server to connect to is only used by wsadmin when you are running administrative commands to collect statistics.

  2. Use one of the following commands to get a list of activities that you want to export:

    • To get a list of all the activities from the Activities server and save them as a java.util.Vector variable that you can pass to the export command...

        variable=ActivityService.fetchActivities()

      For example:

        allexports=ActivityService.fetchActivities()

    • To filter the activities to export to a subset of activities created within a specific time period...

        variable=ActivityService.fetchActivitiesByDate(java.lang.String dateType, java.lang.String beginTime, java.lang.String endTime, java.lang.String lastUUID)

      For example, to get all of the activities created in September...

        sept=ActivityService.fetchActivitiesByDate("created", "2008.09.01", "2008.09.30", "")

      This command does not return activity templates that were created during the specified date range, but does include in the activities that it returns any activities present in the Trash view that were created during the specified date range.

    • To filter the activities that you want to export to a subset based on their members...

      1. Identify the member of interest and save the member information to a variable...

          variable=MemberService.fetchMemberByName(java.util.Hashtable member)

        For example:

          john=MemberService.fetchMemberByName("John Smith")

      2. To retrieve a subset of activities that were created by the member and save it to variable...

          variable=ActivityService.fetchActivitiesCreatedByMember(java.util.Hashtable member)

        For example:

          johnsactivities=ActivityService.fetchActivitiesCreatedByMember(john)

        Alternatively, you can create the following subsets of activities:

        • To get a list of all the activities to which the member has access:

            variable=ActivityService.fetchActivitiesByMember(java.util.Hashtable member)

        • To get a list of all the activities that the member owns:

            variable=ActivityService.fetchActivitiesByOwner(java.util.Hashtable member)

    • To get a list of community activities to export...

      1. Search by name for the community that owns the activities that you want to export...

          ActivitiesMemberService.fetchCommunitiesByName(java.lang.String name)

        For example:

          communities=ActivitiesMemberService.fetchCommunitiesByName("sales")

      2. From the list of communities returned, find the community of interest and make a note of its unique ID.

      3. Pass that unique ID into the following command to write the activities associated with the community to a java.util.Vector variable that you can later pass to the export command:

          ActivityService.fetchActivitiesByCommunityExId(java.lang.String communityUuid)

        For example:

          communityActivitiesToExport=ActivityService.fetchActivitiesBy CommunityExId("f29b4e8e-6fad-44f4-9fca-58c46f29c38d")

    • Use the following command to export the activities:

        ArchiveService.exportActivities(java.lang.String export_directory, java.util.Vector activities)

      where activities is the java.util.Vector variable you created to define the activities that you want to export. For example:

        ArchiveService.exportActivities("c:/ActivitiesExports",allexports)

      or to export only John's activities:

        ArchiveService.exportActivities("c:/ActivitiesExports",johnsactivities)

      or to export only the activities created in September:

        ArchiveService.exportActivities("c:/ActivitiesExports",sept)

      or to export the community activities:

        ArchiveService.exportActivities("c:/ActivitiesExports",communityActivitiesTo Export)

 

Results

If the export is successful, one ZIP file is created in the export repository for each activity being exported, and wsadmin returns an empty set of square brackets. If one of the activities cannot be exported, information about it is returned to wsadmin's command line. Refer to the SystemOut.log file to find log messages that are written to it from the export process.

 

Related tasks

Start wsadmin
Administer Activities
Get a list of activities
Activities administrative commands

+

Search Tips   |   Advanced Search