Tuesday, June 16, 2009

Suggest transaction boundaries within a business process

Component Implementation
 

Suggest transaction boundaries within a business process

Transactional behavior of business processes

Business processes are executed as part of transactions. The navigation of a business process can span multiple transactions in the case of long-running processes, or happen as part of one transaction in the case of microflows. Such navigation transactions can be triggered by external requests, internal messages, or responses from asynchronous services. When a transaction starts, the required activities are performed according to the process definitions. Invoked services can participate in the transaction.

 
A business process runs under one of two execution modes:
  1. Microflows
    run under a single transaction in a short period of time.
  2. Long-running business processes
    run in a series of chained transactions over days, months, or even years. Long-running processes can be optimized with respect to transaction boundaries.
 
Business process developers can declare transaction behavior for invoke, human task, and snippet activities:
  1. Commit before
    guarantees that the activity runs in a new transaction.
  2. Commit after
    guarantees that the current transaction is committed after executing the activity.
  3. Requires own
    guarantees that the activity runs in a new transaction and the current transaction is committed after executing the activity.
  4. Participates
    behavior states that the activity runs within an existing transaction, if one is available.

Setting up a process as long-running

Transaction boundaries are only applicable to long-running processes containing more than one transaction.
 
To setup a process as long-running, just check the Process is long-running checkbox.

Setting up Human Task transaction behaviour

Set the transaction behaviour choices on the Properties/Server page.
 
Setting up Invoke transaction behaviour
 
Set the transaction behaviour choices on the Properties/Server page.

Setting up Snippet transaction behaviour

Set the transaction behaviour choices on the Properties/Server page.

Related links


No comments: