![]() The Task Model |
![]() DEVELOPER |
![]() |
A Task is a new construct in PROIV. It is a unit of work requested by a third-party application, and consists of a collection of PROIV functions linked together in the usual way. Think of a Task as a set of operations performed on a single object. Contrast that with a PROIV function, which can be thought of as a definition of a sequence of actions which can be used to perform the same operation on a series of objects.
Entering invoice data via an invoice screen is an example of a function: it is a repeated process executed against a set of invoices. The model for tasks would be that of an object (a specific invoice) which can have several operations performed against it. Each one of those operations (for example, creation, modification, approval, and payment) would be a Task, each one executed against a specific invoice.
The implementation is simple. When a Task is executed, a chain of linked functions is executed until one of three normal events is triggered:
The Task exit function is executed.
An error is encountered.
A function is linked to, either outside the list of Task member functions, or is on the list of proscribed functions for the Task. The programmer sets up these lists when a Task is defined.
At that point, PROIV returns control to the third party application.
Topic ID: 540162