Views: 10054
Last Modified: 16.09.2014

A Business Process is a specific instance of a business process template. It is created upon request, launched from the entry point, and terminates its operation upon achieving one of the exit points. An unlimited number of business processes can be launched for one template simultaneously.

A business process ceases to exist upon after its termination. But its status is maintained and available for use.

A business process is always executed over a certain document which is determined by its code. In this case, the document may not have a physical representation (i.e. it can be virtual). Business process may be set up for automatic launch in case any document is added or any modification is done to a document.

Each business process has a unique identification code which can be assigned by an executing environment or preset by the programmer. The code may be used to access a certain business process.

An event can be sent to a business process using methods of executing environment. The message is sent to the business process using its unique code.

When launched, a business process can accept as input parameters the values which list is preset at the business process’ design stage. For example, it can be an order ID or a current user’s code. Any activity of a business process will have access to these parameters.

A business process is not necessarily executed continuously. For example, a business process contains the activity CBPDelayActivity (executes a delay, postponing execution for a certain term), in which the business process enters into a wait condition, gets saved into the database, and then is removed from memory. Upon the expiry of the preset time, the business process is read from the database, recalled in memory, and goes on executing from the stop point on.

Advice

To see all the interior details during debugging, for example, in order to understand which variables can be operated, introduce the following PHP code into the points of interest in the diagram:

echo "<pre>", print_r( $_REQUEST ), "</pre>";
echo "-----<br />";
echo "<pre>", print_r( $this ), "</pre>";
exit;
After that, launch the business process for execution, for example, create or edit an infoblock element and take your time reviewing the process.


Courses developed by Bitrix24