rescheduleWorkItem

Use this function to reschedule an existing work item.

The rescheduleWorkItem function (which is in the WorkItemManagementService) can be used to update the work item's schedule period and/or update the work item’s data.

For example, if customer details need to be updated. Any work item data can be changed. However, you cannot unset existing data. This function can be carried out when the work item is in any state other than Completed. The work item’s state is not changed when it is rescheduled.

The request is made up of:

  • the itemSchedule. This is the work item schedule period to be associated with the work item. If no Schedule period is specified, the item’s schedule period is left unmodified. The itemSchedule can optionally include the startDate and either the maxDuration or targetDate.
  • the itemBody. This is the work item body definition. This specifies the work item data to be changed. If no itemBody is specified, the work item data is not changed. It contains each data field (as a name/value pair) required by the data model defined in the work item's work type. The associated work type specifies each data field's type and whether it is an INPUT, OUTPUT or INOUT parameter. The itemBody must also include the parameter and either the complex value or value.

If a user is using an application to enter data in a work item form either before or at the same time a rescheduleWorkItem function is performed, how the work item data is modified depends on:

  • how you have configured your process definition in TIBCO Business Studio. The modification of work item data is configured using the Overwrite data already modified in work item check box. See TIBCO Business Studio Process Modeling Guide for more information.
  • whether the work item form is open or closed at the time the rescheduleWorkItem function is performed.

If the work item form is closed and a user has made one or more changes to one or more fields on the form:

  • If the Overwrite data already modified in work item check box is selected, when the rescheduleWorkItem function is performed, any data that has been updated by a user is overwritten with the new data from the rescheduleWorkItem function. The remaining fields rescheduled for update are also updated.
  • If the Overwrite data already modified in work item check box is not selected, any changes a user has made to a form remain, but the other fields are overwritten with the new data from the rescheduleWorkItem function.

If the work item form is open when the rescheduleWorkItem function is performed, when the user clicks Submit or Close, a dialog displays that allows them to do the following:

  • If the Overwrite data already modified in work item check box is not selected, the following operations are available.
    • Override - the user can also override any changes to the data. In this case, the changes that the user has made to the form remain and the changes that have been made by TIBCO ActiveMatrix BPM are lost.
    • Reload - reload the form with the new changes displayed. In this case, any changes that the user has made to the form are lost. The user can then decide whether to re-enter the data or submit it as it is.
    • Cancel - cancel the changes made to the work item form. In this case, all the data the user has entered is lost but the changes made by TIBCO ActiveMatrix BPM are retained.
  • If the Overwite data already modified in work item check box is selected, the Override option is not available.

If a rescheduleScript has been defined, it is run each time the rescheduleWorkItem function is called. See the TIBCO BPM Implementation Guide for more information about rescheduleScript.

This function can only be carried out by a user who has authorization for the rescheduleWorkItem system action.