Views: 11035
Last Modified: 16.09.2014
Business Process template is a diagram (program) where one entry point, a sequence of activities (steps, stages, or functions) to be performed in a certain order and intended to achieve a certain goal, and also one or more exit points defining the termination of the execution are set.
The template is created in a special module Business Process Designer using a visual designer. The visual designer permits drag and drop activities from the control panel to the main working area of the visual designer thus creating a business process template visually. The template is created in the form of a flow diagram which graphically displays the operating logic of a business process.
The installation package includes a number of embedded activities which can be used in order to perform general purpose work. There are several dozens of such activities. There are activities that permit using your own script or php code. Also, there is a possibility to create your own activities and connect them to a business process.
The created template of a business process can be executed automatically or manually, depending on the settings. Several instances of a business process can be executed simultaneously at any time, and the system manages execution of these instances, saving and recovering their condition upon request. A log of each instance of a business process is maintained for further analysis of the diagram operation and its adjustment according to new conditions.
The internal system design of a business process the business process template is represented as a multidimensional array containing a hierarchy of actions and their property values. It is this representation of a business process template that API of the Business Processes module works with.
An example of a simple array representing a business process template is provided below:
array(
array(
"Type" => "SequentialWorkflowActivity",
"Name" => "SequentialWorkflowActivity1",
"Properties" => array(),
"Children" => array(
array(
"Type" => "SetFieldActivity",
"Name" => "SetFieldActivity1",
"Properties" => array("Field" => "XML_ID", "Value" => "Send for approval"),
),
array(
"Type" => "IfElseActivity",
"Name" => "IfElseActivity1",
"Properties" => array(),
"Children" => array(
array(
"Type" => "IfElseBranchActivity",
"Name" => "IfElseBranchActivity1",
"Properties" => array("FieldCondition" => array("CREATED_BY", "=", 1)),
"Children" => array(
array(
"Type" => "SetFieldActivity",
"Name" => "SetFieldActivity2",
"Properties" => array("Field" => "XML_ID", "Value" => "On approval"),
),
),
),
array(
"Type" => "IfElseBranchActivity",
"Name" => "IfElseBranchActivity2",
"Properties" => array(),
"Children" => array(
array(
"Type" => "ApproveActivity",
"Name" => "ApproveActivity1",
"Properties" => array(
"Users" => array(1),
"ApproveType" => "all",
"OverdueDate" => null,
"Name" => "Verify entry",
"Description" => "",
"Parameters" => null,
),
"Children" => array(
array(
"Type" => "SetFieldActivity",
"Name" => "SetFieldActivity3",
"Properties" => array("Field" => "XML_ID", "Value" => "Approved"),
),
array(
"Type" => "SetFieldActivity",
"Name" => "SetFieldActivity4",
"Properties" => array("Field" => "XML_ID", "Value" => "Rejected"),
),
),
),
),
),
),
),
),
),
)