Home

 

Import activities


Overview

Use administrative commands to import activities that you have exported.

You can only import activities that you exported from the Activities feature.

Use wsadmin


Import 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. Do one of the following:

    • To import all of the activities that you exported, use the following command to retrieve the activities that you exported and save them as a java.util.Vector variable:

        variable=ArchiveService.fetchActivities(java.lang.String export_directory)

      where export_directory is the file path, including the drive and subdirectory, on the local server where the previously exported ZIP files are located. When specifying a path separator, use the forward slash rather than backslash even on Microsoft Windows systems. For example:

        allexports=ArchiveService.fetchActivities("C:/AllExports")

    • To filter the activities that you exported into a subset based on a member...

    1. To identify a subset of activities that were created by a specific member...

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

      For example:

        jane=MemberService.fetchMemberByName("Jane Doe")

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

      Do not use these member-based commands to fetch activities that were exported from a different deployment of Lotus Connections. These commands use the member ID to find the activities, and member IDs are not persisted across different deployments. Only use these commands to collect activities when you are importing the activities to the same server from which they were exported. If you are importing the activities to a different server, use the ArchiveService.fetchActivities(directory) command instead.

        variable=ArchiveService.fetchActivitiesCreatedByMember(java.lang.string export_directory,java.util.Hashtable member)

      For example:

        janesactivities=ArchiveService.fetchActivitiesCreatedByMember( "C:/AllExports",jane)

      Alternatively, you can create the following subsets of activities:

      • To retrieve a subset of activities to which a specific member has access from the repository of exported activities and save it to a variable...

          variable=ArchiveService.fetchActivitiesByMember(java.lang.string export_directory,java.util.Hashtable member)

      • To retrieve a subset of activities that a specific member owns from the repository of exported activities and save them to a variable...

          variable=ArchiveService.fetchActivitiesByOwner(java.lang.string export_directory,java.util.Hashtable member)

  3. Optional: Only perform this step if you want to delete a subset of the activities. You might want to perform this step if an employee has left the company and you want to remove the activities that she owns from the collection before you import them.

    To delete a set of activities from the collection of exported activities...

      ArchiveService.deleteActivities(java.lang.String export_directory, java.util.Vector subset_of_activities)

    where subset_of_activities is the java.util.Vector variable you created to define a subset of activities that you retrieved from the export and that you want to permanently delete. For example, to remove Jane's activities from the collection of exported activities, you could use the following command:

      ArchiveService.deleteActivities("C:/AllExports",janesactivities)

  4. Use one of the following command to import the activities:

    For community activities, the community from which the activity was created must exist on the server to which you are importing the activities. If it does not, an error is returned when you attempt to import the activities. The associated community is identified by its communityUUID which is not persisted across different deployments, so you can only include community activities in the activities to be imported when you are importing them to the same server from which they were exported.

    • If you do not want to overwrite any of the activities currently on the server and would rather create an additional copy of an activity if you are importing one that already exists, use this command:

        ArchiveService.createActivities(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 retrieved from the export and that you want to import into the Activities feature. For example:

        ArchiveService.createActivities("C:/AllExports",allexports)

      or to import only Jane's activities:

        ArchiveService.createActivities("C:/AllExports",janesactivities)

    • Use the following command to import the activities from the export repository. If the activities being imported already exist on the Activities server, the ones on the server will be overwritten during the import.

        ArchiveService.importActivities(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 retrieved from the export and that you want to import into the Activities feature. For example:

        ArchiveService.importActivities("C:/AllExports",allexports)

      or to import only Jane's activities:

        ArchiveService.importActivities("C:/AllExports",janesactivities)

 

Results

If the import is successful, one activity is created from each ZIP file in the export repository and wsadmin returns an empty set of square brackets. If one of the activities cannot be imported, 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 import process.


Administer Activities

 

Related tasks

Start wsadmin


+

Search Tips   |   Advanced Search