+

Search Tips   |   Advanced Search

Complete activities that are not being used

Edit configuration property settings to disable the removal of inactive activities from the My Activities view, to change the amount of time an activity must be inactive before it is marked complete by the server, or to disable the warning notification that is sent to activity owners before an activity is marked complete.

When an activity is marked complete, it moves from the My Activities view to the Completed view. The default interval is 90 days. Before starting this procedure, determine the amount of time to allow an idle activity to remain in the active views before it is marked complete and moved to the Completed view.

If email notifications are enabled, Activities warns the owner of an activity that has not been modified in the specified time frame the activity will be marked complete. This allows the owner to modify the activity to keep it active and prevent it from being marked complete. We can enable and disable this email notification application. To not automatically move activities into the Completed view, we can also disable this job.

To remove an activity that is not being used:

  1. Access the Activities configuration file:


    ActivitiesConfigService.checkOutConfig("/tmp","cell_name")

    To get cell name...

  2. Display current configuration settings :

      ActivitiesConfigService.showConfig()

    From the returned list, look at the current values of the settings that begin with jobs.AutoComplete and determine which property values to change:

    jobs.AutoComplete.autoCompletionPeriod

    Define the number of days of inactivity that must pass before an activity is automatically marked complete. Specify the value in days. Default is 90.

    jobs.AutoComplete.prenotification

    Define whether or not to send an email to the activity owners to warn them the activity will be marked complete if no modifications are made to it. This property accepts the following values: true or false. Default is true. This setting requires that email notifications are enabled.

  3. To change the property values:

      ActivitiesConfigService.updateConfig(property, value)

    For example:

      ActivitiesConfigService.updateConfig("jobs.AutoComplete.autoCompletionPeriod","100")
      ActivitiesConfigService.updateConfig("jobs.AutoComplete.prenotification","false")

  4. If we decide to notify activity owners, we can change the number of days warning they are given by changing the interval at which the job runs. If the job is scheduled to run once a month, the owners get a month's notice their activity will be marked complete. If it runs weekly, they get a week's notice.

    To change the interval of the job, edit the value of the jobs.AutoComplete.interval property. Default is 0 0 23 ? * SAT, which specifies the job should run weekly at 11 PM on Saturday. For information about how to format this value, see Scheduling tasks.

    Run to edit this property:

      ActivitiesConfigService.updateConfig("jobs.AutoComplete.interval", value)

  5. To prevent the auto completion job from running altogether, we can use the following command to disable the job:

      ActivitiesConfigService.updateConfig("jobs.AutoComplete.enabled", "false")

  6. After making changes, check configuration file back in during the same wsadmin session in which they were checked out.


Example

When making configuration changes to the ActivityAutoCompleteJob scheduled job, we are modifying settings in oa-config.xml. The following XML sample of oa-config.xml file content defines a job that runs weekly (Saturdays at 11 PM) and marks complete any activities on the server that have not been modified in 100 days. Because prenotification is set to false, the activity owners will not get an email notification the activities will be marked complete. The ActivityAutoCompleteJob task sets the last updated by field in the Activities interface to Activities Administrator.
<scheduledTasks>
  <!-- cluster scoped jobs -->
  
  <!-- ActivityAutoCompleteJob - weekly on Sat at 11pm  -->
  <task 
   name="ActivityAutoCompleteJob" 
   description="Automatically mark unmodified activities as completed"
   interval="0 0 23 ? * SAT" 
   startby="" 
   enabled="false" 
   scope="cluster" 
   type="class"
   targetName="com.ibm.openactivities.jobs.AutoCompleteJobWS" 
   mbeanMethodName="" 
   serverName="unsupported" >
    <args>
      <property name="autoCompletionPeriod">100</property>
      <property name="prenotification">false</property>
    </args>
  </task>
  ...
</scheduledTasks>


Parent topic:
Manage trash


Related:

Scheduling tasks


Related:

Check out the Activities configuration files

Apply property changes in Activities

Manage the scheduler