| Contents (hide) 1 Research 1.1 Query 1.2 Verify-Approve 1.3 Notification 1.4 Update-Approve (Synchronous) 1.5 Update-Approve (Asynchronous) 2 Prosero (implementation) |
Templates
A template is a specific instance of the Receive-Process-Reply building-block.There is no concrete distinction between a template and building-block.
Research
Query
Description
A query is received. The query does not require the update of the local state, except possibly for logging the fact that it was received and responded to.
- Receive query
- Process query
- Respond with answer
Possible exceptions
- respond failure
- process time-out
- unauthorized query
Possible parameters
- security
- authentication
- synchronous/asynchronous
Possible variations
- Binding query, where the response is binding to the agent. May require non-repudiation and more involved logging.
- Asynchronous.
Compensation routines
- Undo logging – can also be noop.
Examples of concrete processes covered by this pattern
- inventory check
- delivery time check
- RFQ when item is in catalog
Ronen's note
The reply to a query in general should have a time period validity – for example, inventory check = product is available until a certain time; get price of product = price is guaranteed until a certain time. A token mechanism can associate reply to query with further action based on this reply – and repudiation can be associated with the token.
The reply to a query in general should have a time period validity – for example, inventory check = product is available until a certain time; get price of product = price is guaranteed until a certain time. A token mechanism can associate reply to query with further action based on this reply – and repudiation can be associated with the token.
Verify-Approve
Description
This pattern covers the case where we receive a document that contains data that we need to approve. We check it against our records and if it matches our records we send a confirmation and we update our records, if needed, with the fact that we received this document and approved it (assuming we did). If it does not match, we send a disapproval message. Ideally, it should explain the problem.
- Receive Document for verification
- Compare against records
- If matches records
- Send approval
- Update approval
- Send disapproval
- End
Possible exceptions
- Unauthorized/incorrect message
- Send failure
- Compare timeout/failure (due to technical problems; does not imply document is incorrect)
Compensation routines
- Undo update
Possible parameters
- Security
- authentication
- synchronous/asynchronous
Possible variants
- verifyApproveList where the document is a list of items and we allow for partial approval, i.e., where some items are approved and some are not.
- VerifyApproveAmendment where the document is an amendment to a previously approved document. It seems like this only affects the specifics of the verify process.
Examples of concrete processes covered by this pattern
remittance advice, and arguably (see next pattern), receive purchase order, receive supply schedule, purchase order amendment, delivery plan change, receive invoice, self-billing invoice, etc.
Ronen's note
The message entails either a human task for approval or automatic business rules approval. This should be documented as 2 basic variants. Since this is a legally binding approval we also need to associate a token mechanism with deadline (valid until) and traceability of further actions based on this approval. We also want possibility to define deadline for approval verification – and what happens if no approval is obtained within a certain period.
The message entails either a human task for approval or automatic business rules approval. This should be documented as 2 basic variants. Since this is a legally binding approval we also need to associate a token mechanism with deadline (valid until) and traceability of further actions based on this approval. We also want possibility to define deadline for approval verification – and what happens if no approval is obtained within a certain period.
Notification
Description
This pattern covers the case where we receive a document that contains data that requires us to update some information, but does not require further processing. This is a notification, and we cannot disapprove.
- Receive Document for update
- Perform update
Possible exceptions
- Unauthorized notification
- Incorrectly syntax
- Update time-out
Compensation routines
- Undo update
Examples of concrete processes covered by this pattern
- notification of shipment time
- notification of price change for a catalog
Ronen's note
there should be a time period indication – change as of “start date” / until “end date” and a token mechanism to refer to this change. Although we cannot object to notification – I would assume that businesses would want to have a form of appeal to un-acceptable modifications if they impact ongoing collaboration
there should be a time period indication – change as of “start date” / until “end date” and a token mechanism to refer to this change. Although we cannot object to notification – I would assume that businesses would want to have a form of appeal to un-acceptable modifications if they impact ongoing collaboration
Update-Approve (Synchronous)
Description
Much like Verify-Approve, but where the message requires an update to our state. It is not clear whether for our purpose we need a distinct pattern here. Intuitively, the main issue is whether the update has additional ramifications.
- Receive Document for update
- Evaluate update
- If acceptable
- Send approval
- Update
- Send disapproval
- Log disapproval if needed
- End
Possible exceptions
- Unauthorized update request
- Improper syntax of update request
- Send failure
- Update failure (different from disapproval)
Compensation routines
- Undo update
Possible parameters
- Security
- authentication
- synchronous/asynchronous
Possible variants
Again, the case of the document being a list of items such that items may be processed independently and some may succeed and some may fail (e.g., in/out-of stock).Examples of concrete processes covered by this pattern
- receive purchase order
- cancel purchase order
- amend purchase order
- receive delivery plan
Update-Approve (Asynchronous)
Description
This is similar to the previous patterns in that it based on receive/process/send. However, the process request in this case is long, requiring the spawning of a subprocess that will take sometime to complete. Therefore, the process is more involved. First, we have to notify the sender that we are handling his message. Then we have to spawn the sub-process. Then we have to wait for its completion and when it is done, we can respond to the sender. We assume that the process requires state update.
- Receive Document for update
- Commence Evaluate update
- Send “evaluation commencement”
- Wait for EvaluateResult message
- If acceptable
- Send approval
- Update
- Send disapproval
- Log disapproval if needed
- End
Possible exceptions
- Unauthorized update request
- Improper syntax of update request
- Send failure x 2
- Evaluate failure due to time out or other non-business condition
Compensation routines
- Undo update locally
- Compensate for spawned process
Possible parameters
- security
- authentication
- synchronous/asynchronous
Possible variants
Again, the case of the document being a list of items such that items may be processed independently and some may succeed and some may fail (e.g., in/out-of stock). There is an asynchronous variant to verify as well, as noted earlier that is similar.Examples of concrete processes covered by this pattern
- receive purchase order
- cancel purchase order
- amend purchase order
- receive delivery plan
Prosero (implementation)
Using the building blocks to create the templates will look like this: