Get a list of activities 

Use administrative commands to retrieve lists of activities that you can subsequently manipulate programmatically.


Before starting

To run administrative commands, use the wsadmin client. See Starting the wsadmin client for details.


Procedure

  1. Start the Activities Jython script interpreter.

    1. Access the Activities configuration file:

        execfile("activitiesAdmin.py")

        If prompted to specify a service to connect to, type 1 to pick the first node in the list. Most commands can run on any node. If the command writes or reads information to or from a file using a local file path, pick the node where the file is stored.

  2. Get a list of the activities and entries using one of the following commands:

    • To get a list of all the activities created by your users except those in the trash:

        ActivityService.fetchActivities()

    • To get a list of deleted activities, which are activities that have been moved to the Trash view, but have not been permanently deleted yet. They are not permanently deleted until the Trash view is purged.

        ActivityService.fetchDeletedActivities()

    • To get a list of activities that have been marked Completed:

        ActivityService.fetchCompletedActivities()

    • To get a list of activities that were created or modified within a specified date range:

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

        Note: 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 get an activity with a specified universal identifier:

        ActivityService.fetchActivityById(java.lang.String uuid)

    • You can find the universal identifier of an activity by using other fetch commands. The hash table of an activity includes an activityID, such as activityId=3F9G09219392F4733F40F82A4E8D5F000083. For example:

        ActivityService.fetchActivityById("3F9G09219392F4733F40F82A4E8D5F000083")

    • To get a list of activities filtered by member...

    1. Retrieve information about the member by whom you want to filter the activities and save it to a variable using the following command:

        variable=MemberService.fetchMemberByName(java.lang.String member)

        For example:

        jane=MemberService.fetchMemberByName("Jane Fairfax")

    2. You filter the activities using this member information in the following ways:

      • To get a list of activities that were created by the member:

          ActivityService.fetchActivitiesCreatedByMember(java.util.Hashtable member)

      • For example:

          ActivityService.fetchActivitiesCreatedByMember(jane)

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

          ActivityService.fetchActivitiesByMember(java.util.Hashtable member)

      • To get a list of standard activities of which the member is the owner:

          ActivityService.fetchActivitiesByOwner(java.util.Hashtable member)

        Note: fetchActivitiesByMember() and fetchActivitiesByOwner() only return standard activities; they do not return community activities.

  3. See Narrowing down results for information on how filter the list of results into a smaller subset.


Parent topic

Running Activities administrative commands


Related tasks


Starting the wsadmin client
Narrowing down results
Manage member access to activities
Export activities

Related reference
Activities administrative commands


   

 

});

+

Search Tips   |   Advanced Search