Cancel Activity Actions

The set_property method supports canceling a pending activity with the cancel_activity action. If the activity is non-scheduled, it is moved to the current resource’s day and then canceled. Note that the message should contain the word "action" in the subject, and the name of the action (cancel_activity or unschedule_activity) should be stored in the message body. Also note that the cancel_activity action does not support the notdone and deleted actions depending on the activity and route status. After processing, the message is assigned one of the following statuses and its corresponding description.

Status ‘Delivered’

Status Description
Status delivered
Description
Notes The action is performed successfully.

Status ‘Failed’

Status Description
Status failed
Description INVALID_RESOURCE_TYPE
Notes This action is not supported for this type of resource. For example, the resource or its type is reconfigured, and activities can no longer be assigned to it.

Status ‘Failed’

Status Description
Status failed
Description NO_PERMISSION
Notes This user has no access to the specified resource or activity.

Status ‘Failed’

Status Description
Status failed
Description RESOURCE_NOT_FOUND
Notes The system is unable to find the resource the message refers to.

Status ‘Failed’

Status Description
Status failed
Description ACTIVITY_NOT_FOUND
Notes The system is unable to find the activity the message refers to.

Status ‘Failed’

Status Description
Status failed
Description INACTIVE_RESOURCE
Notes The resource is inactive.

Status ‘Failed’

Status Description
Status failed
Description NON_WORKING_DAY
Notes The resource has a non-working day. For example, this error can appear for a not-scheduled activity that cannot be moved to the resource’s current day because it is a non-working day for that resource.

Status ‘Failed’

Status Description
Status failed
Description ACTION_ON_PAST
Notes The activity is located in the route for a day in the past that cannot be changed.

Status ‘Failed’

Status Description
Status failed
Description MISCONFIGURED_CALENDAR
Notes The system is unable to determine if the resource is working because its calendar is not configured. For example, this error can appear for a not-scheduled activity.

Status ‘Failed’

Status Description
Status failed
Description MISCONFIGURED_TIME_ZONE
Notes The system is unable to determine a current time for the resource because its time zone is not configured. For example, this error can appear for a not-scheduled activity.

Status ‘Failed’

Status Description
Status failed
Description INVALID_ACTIVITY_STATUS
Notes This action is not supported for an activity with such status. Only pending activities can be canceled.

Status ‘Failed’

Status Description
Status failed
Description NON_MOVABLE_ACTIVITY
Notes This type of activity cannot be moved to another resource or a day. For example, this error can appear for a not-scheduled activity.

Status ‘Failed’

Status Description
Status failed
Description RESCHEDULE_IS_NOT_ALLOWED
Notes This type of activities cannot be rescheduled to another day. For example, this error can appear for a not-scheduled activity.

Status ‘Failed’

Status Description
Status failed
Description NOT_SCHEDULED_IS_NOT_ALLOWED
Notes This type of activities cannot be not-scheduled. For example, this error can appear for a not-scheduled activity.

Status ‘Failed’

Status Description
Status failed
Description DEACTIVATED_ROUTE
Notes The route is deactivated. For example, this error can appear for a not-scheduled activity if it cannot be moved to the resource’s route for the current day because this route is deactivated.