Fetch a list of activities
List the activities that we can manipulate programmatically. We can retrieve a list of all activities or filter the list by viewing activities associated with a specific member.
To run administrative commands, use the wsadmin client and check out the Activities configuration file.
To check out configuration file, use execfile("activitiesAdmin.py"). If the command writes or reads information to or from a file with a local file path, pick the node where the file is stored.
For more information about using wsadmin.sh, see Start the wsadmin client .
- Runs to get a list of activities and entries.
- ActivityService.fetchActivities()
- List all of the activities created by the users except those activities in the trash.
- ActivityService.fetchDeletedActivities()
- List deleted activities. Deleted activities were moved to the Trash view, but are not permanently deleted yet. After the Trash view is purged, these activities are permanently deleted.
- ActivityService.fetchCompletedActivities()
- List activities marked Completed.
- ActivityService.fetchActivitiesByDate(java.lang.String dateType, java.lang.String beginTime,
- java.lang.String endTime, java.lang.String lastUUID)
- List activities created or modified within a specified date range, including those activities in the Trash. This command does not return activity templates created during the specified date range.
- dateType: Date field of interest. Options are created and modified.
- beginTime: Start of date range.
- endTime: End of date range.
- lastUUID: Unique ID of the last activity that is retrieved from a previous call of this command. Specify empty double quotation marks if you expect less than 50 activities in the response, or if we are running this command for the first time.
Dates are specified in the yyyy.mm.dd format.
For example, the following command gets the first set of 50 activities created from 1 March 2008 through 31 March 2008:
ActivityService.fetchActivitiesByDate("created","2008.03.01","2008.03.31","")
- ActivityService.fetchActivityById(java.lang.String uuid)
- List an activity with a specified universal identifier.
We 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")
- Return a list of activities that are filtered by member.
- Retrieve member information for the user whose activities we are interested in using MemberService.fetchMemberByName.
variable=MemberService.fetchMemberByName(java.lang.String member)
For example:
jane=MemberService.fetchMemberByName("Jane Fairfax")
- Filter the activity list.
- ActivityService.fetchActivitiesCreatedByMember(java.util.Hashtable member)
- List activities created by the member.
For example:
ActivityService.fetchActivitiesCreatedByMember(jane)
- ActivityService.fetchActivitiesByMember(java.util.Hashtable member)
- List activities to which the member has access.
- ActivityService.fetchActivitiesByOwner(java.util.Hashtable member)
- List activities which the member owns.
Results from fetchActivitiesByMember() and fetchActivitiesByOwner() do not include community activities.
What to do next
For information about how filter the list of results into a smaller subset, see Narrowing down results.
Parent topic:
Run Activities administrative commands
Related: