APL - PCC BatchData Support (4.3)
The BatchData APL functions are used for managing the work orders and work logs used in the Usage Management Workflow Templates.
The BatchData Support functions include:
pccBatchDataBeginWorkorders
This function enables a list with work orders to be created for a session context. When this function has been called, the session context field in the UDR can be populated with the list of work orders.
void pccBatchDataBeginWorkorders( long txnId )
Parameters
Parameter | Description |
---|---|
| The transaction ID of the session context for which you want to create a list of work orders |
Example
pccBatchDataBeginWorkorders(cycle.TxnId);
will allow the session context field in the cycle UDR with the stated transaction ID to be populated with a list of work orders.
pccBatchDataAddWorkorder
This function adds a work order to a session context. In the real-time template, this function is used for adding work orders that have been validated successfully to the session context, for example.
void pccBatchDataAddWorkorder( long txnId, Workorder data )
Parameters
Parameter | Description |
---|---|
| The transaction ID of the session context in which a work order should be added. |
| The work order to add. |
Example
pccBatchDataAddWorkorder(txnId, wo);
will add the wo work order for the session context with the transaction ID determined by the txnID variable.
pccBatchDataBeginWorklogs
This function enables a list with work logs to be created for a session context. When this function has been called, the session context field in the UDR can be populated with the list of work logs.
void pccBatchDataBeginWorklog ( long txnId )
Parameters
Parameter | Description |
---|---|
| The transaction ID of the session context for which you want to create a list of work logs. |
Example
pccBatchDataBeginWorklogs(cycle.TxnId);
will create a list of work logs for the session context with the transaction ID given in the TxnId field in the cycle UDR.
pccBatchDataAddWorklog
This function adds a work log to a session context.
void pccBatchDataAddWorklog( long txnId, Worklog data )
Parameters
Parameter | Description |
---|---|
| The transaction ID of the session context for which you want to add a work log. |
| The work logs you want to add. |
Example
pccBatchDataAddWorklog(txnId, wl);
will add the wl work order for the session context with the transaction ID determined by the txnID variable.
pccBatchDataAddWorklogs
This function adds a list of work logs to a session context. In the real-time template, this function is used for adding work logs for successfully updated work orders to the session context, for example.
void pccBatchDataAddWorklogs( long txnId, List<Worklog> data )
Parameters
Parameter | Description |
---|---|
| The transaction ID of the session context for which you want to add a list of work logs. |
| The list of work logs you want to add. |
Example
pccBatchDataAddWorklogs(txnId, logs);
will add the logs list with work orders for the session context with the transaction ID determined by the txnID variable.
pccBatchDataSuspendWorklogs
This function will suspend the work logs for a session context, this may be useful in case of an abnormal stop, for example.
void pccBatchDataSuspendWorklogs( long txnId )
Parameters
Parameter | Description |
---|---|
| The transaction ID of the session context for which to suspend work logs. |
Example
pccBatchDataSuspendWorklogs((long) mapGet(sc, S_TXNID));
will suspend the work logs for the session context with the transaction ID returned by the mapGet
function.
pccBatchDataResumeWorklogs
Resumes the work logs for a session context. This function is used after the pccBatchDataSupsendWorklogs
function has been called.
void pccBatchDataResumeWorklogs( long txnId )
Parameters
Parameter | Description |
---|---|
| The transaction ID of the session context for which to resume work logs. |
Example
pccBatchDataResumeWorklogs(cycle.TxnId);
will resume the work logs for the session contexts with the transaction ID given in the TxnId field in the cycle UDR.
pccBatchDataGetWorkorders
This function retrieves a list of work orders for a certain session context. In the real-time workflow template, this is used for retrieving the list of work orders to compare with the list of work logs, for example.
list<Workorder> pccBatchDataGetWorkorders( long txnId )
Parameters
Parameter | Description |
---|---|
| The transaction ID of the session context for which to retrieve a list with work orders. |
Returns: | A list with work logs. |
Example
list<Workorder> orders = pccBatchDataGetWorkorders(cycle.TxnId);
will return a list named orders containing the work orders for the session context with the transaction ID given in the TxnId field in the cycle UDR.
pccBatchDataWorklogs
This functions returns a list with work logs for a certain session context. In the real-time workflow template, this is used for retrieving the list of work logs to compare with the list of work orders, for example.
list<Worklog> pccBatchDataGetWorklogs( long txnId )
Parameters
Parameter | Description |
---|---|
| The transaction ID of the session context for which to retrieve a list with work logs. |
Returns: | A list with work logs. |
Example
list<Worklog> logs = pccBatchDataGetWorklogs(cycle.TxnId);
will return a list named logs containing the work logs for the session context with the transaction ID given in the TxnId field in the cycle UDR.
pccBatchDataRemove
This function removes the batch data for a session context. In the real-time workflow template, this function is used for removing all work orders and work logs that have been successfully validated, updated and compared.
void pccBatchDataRemove( long >txnId )
Parameters
Parameter | Description |
---|---|
| The transaction ID of the session context for which you want to remove the batch |
Example
pccBatchDataRemove((long) mapGet(sc, S_TXNID));
will remove the batch data for the session context with the transaction ID returned by the mapGet
function.