Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

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

  • pccBatchDataAddWorkorder

  • pccBatchDataBeginWorklogs

  • pccBatchDataAddWorklog

  • pccBatchDataAddWorklogs

  • pccBatchDataSuspendWorklogs

  • pccBatchDataResumeWorklogs

  • pccBatchDataGetWorkorders

  • pccBatchDataGetWorklogs

  • pccBatchDataRemove

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 work orders.

void pccBatchDataBeginWorkorders( long txnId )

Parameters

ParameterDescription

txnId

The transaction ID of the session context for which you want 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

ParameterDescription

txnId

The transaction ID of the session context in which a work order should be added.

data

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 work logs.

void pccBatchDataBeginWorklog ( long txnId )

Parameters

ParameterDescription

txnId

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

ParameterDescription

txnId

The transaction ID of the session context for which you want to add a work log.

data

The work log 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

ParameterDescription

txnId

The transaction ID of the session context for which you want to add a list of work logs.

data

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

ParameterDescription

txnID

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 functions is used after the pccBatchDataSupsendWorklogs function has been called.

void pccBatchDataResumeWorklogs( long txnId )

Parameters

ParameterDescription

txnID

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 with 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

ParameterDescription

txnId

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

ParameterDescription

txnId

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

ParameterDescription

txnId

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.


  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.