prt_api_move_item_to_detain

Name

prt_api_move_item_to_detain

Purpose

Move item to detainment region

Description

This routine provides a mechanism for moving an Item from the Tracking Region where it currently resides to the detainment region of that region. This function checks that a detainment region exists for the source region and then calls prt_api_move_item to actually complete the work.

Syntax

int prt_api_move_item_to_detain ( src_reg_id, src_reg_loc,
                        item_id, reference_id, item_type_id,
                        comment, user_or_svc_id, retstat)
char        src_reg_id[PRT_REGION_ID_LEN + 1];
COR_I2      src_reg_loc;
char        item_id[PRT_ITEM_ID_LEN + 1];
char        reference_id[PRT_ITEM_ID_LEN + 1];
char        item_type_id[PRT_ITEM_TYPE_ID_LEN + 1];
char        comment[SC_DESCRIPTION_LEN + 1];
char        user_or_svc_id[SERVICE_ID_LEN + 1];
COR_STATUS  *retstat;

Data Structures

See Static Information Requirements

Arguments

Argument Description
Serialized Items Only
item_id Unique identifier of a Serialized Item (optional if reference_id is specified).
reference_id Secondary identifier of a Serialized Item (optional if item_id is specified).
Both Serialized and Non-Serialized Items
src_reg_id Source region id; region the item is moving out of (required).
src_reg_loc Source region location; sequence number of the item in the source tracking region. Specified as FIRST (EXIT), LAST (ENTRY), or a number from 1 to n, where n is the number of items in the queue. required for non-serialized items, optional for serialized items).
item_type_id Item type identifier (required for non-serialized items, optional for serialized items).
Comment Comment to be recorded in PRT history log file (optional).
user_or_svc_id User or service identifier. This is used for logging purposes and is optional. If this pointer is NULL, the host process id is used. (optional)
Output
*retstat Pointer to COR_STATUS structure

Return Value

Either COR_SUCCESS or COR_FAILURE.

If the function returns COR_FAILURE additional error information can be found in the COR_STATUS structure.

Error Codes

PRTC_NON_SER_ID Non-serialized item has item or ref. id (Failure)
PRTC_SER_NO_ID Serialized item missing both item & ref. id (Failure)
PRTC_UNKNOWN_REGION Unknown REGION specified (Failure)
PRTC_BAD_REG_LOC_SPEC Bad region location specified (Failure)
PRTC_ITEM_STAMP_TOO_NEW An affected item has changed since the last display (Failure)
PRTC_ADD_LOC_TOO_BIG Cannot add item to unoccupied location- inserting (Warning)
PRTC_ADD_MULTIPLE_SERIAL Cannot have two serialized items at one location (Warning)
PRTC_REGION_NOT_LOCKED Lockable region %s not locked; cannot perform operation (Warning)
PRTI_ITEM_TYPE_NULL Item type identifier NULL (Warning)
PRTI_ITEM_TYPE_NDEF Item type identifier not valid (Warning)
PRTI_NON_SER_ID Non-serialized item has item id or reference id (Warning)
PRTI_SER_NO_ID Serialized item missing both item id and reference id (Warning)
PRTI_REG_ID_NULL Region identifier NULL (Warning)
PRTI_REG_ID_NDEF Region identifier not valid (Warning)
PRTI_INVALID_REG_LOC Invalid region location (Warning)
PRTI_ITEM_TYPE_NULL Item type identifier NULL (Warning)
PRTI_INVALID_DEST Destination region is invalid for item of this type (Warning)
PRTI_MF_INIT_ERR Error initializing segment (Failure)
PRTI_CRESEG_ERR Error creating segment (Failure)

Plus all error codes returnable by prt_api_send_cmd.