Cordys BOP 4 Platform sub-process vs. embedded sub-process and sub-process modeling techniques

Source: Internet
Author: User
Tags xpath

A sub-process means that a new process can be created and executed during a process flow, where the parent process can be returned at the end.

about sub-processesSub-process

A sub-process is a BPMN component, which is a composite activity in a process. Sub-processes can be decomposed into a series of finer activities. The child process is instantiated through the parent process.

Sub-processes can be designed as part of a transaction, with three possible trading results listed below:

    • successfully completed ( Successful completion ): The process executes sequentially and the transaction executes successfully;
    • Cancel ( Cancel ): Activities within the transaction are rolled back, and specific activities are supplemented;
    • Exception ( Exception ): Abnormal activity does not need to be rolled back and will continue to flow from the error event.

Embedding sub-processes

Embedded sub-processes are BPMN group artifacts used to group activities that belong to a specific environment. This helps to hide the complexity of the activity by collapsing an embedded sub-process. It also helps link timeout exceptions and offsets, which are common for all activities that embed sub-processes.

Note:

When the timeout event is attached to the embedded sub-process, all unfinished tasks are removed from the message box.

If you encounter "terminate activity (terminate actively)" during process execution, all unfinished tasks are removed from the inbox and the activity is set to "obsolete (Obsolete)". This state is visible from the process instance activity view. termination indicates that the embedded sub-process terminates and that the flow proceeds from the next activity (after embedding the sub-process). Embed the sub-flowchart as shown in.

Figure 1-1

Sub-process vs. embedded sub-process

The embedded sub-process is not an independent process, there are no start events (Start event) and End events (end event), only local in the process, in order to represent simplicity in the embedded sub-process approach.

A subprocess is an independently completed process that can be called by other normal processes, with start events (Start event) and end events.


child process modeling and useFirst step: Create a new process

Create a new business process Model in workspace documents, such as the blank process shown in 2-1, including two activity links, with the process named Sub_processa.


Figure 2-1

The process is configured as follows, as shown in 2-2.


Figure 2-2

(1) Process hook-up form

Drag the form (named Testforeach) to the process activity link, as shown in 2-2, the activity is named "sub-process Activity 1", "sub-process Activity 2".

(2) Messaging Configuration (message map)


Figure 2-3

The Create message name is Sub_msg, which contains two elements (element) Sub_msg_name, Sub_msg_data.

(3) Message binding to form

On each activity link, use "Pre Assignments" to bind the input message element to the form input, as shown in 2-3, using the "Post Assignments" binding form to enter input into the message element.

(4) Configuring the Process Start Event (start events)

The configuration here is to set the input message interface for the process to receive the incoming parameters of the parent process, set the Start property (properties), where trigger type is "message" and input message is set to "Bpm:sub_msg" (obtained through an XPath expression).


Figure 2-4

(5) Configuring the Process End Event (end event)

The configuration here is the output message interface that is set to return a message to the parent process at the end of the process, setting the End property, where the end type is "Message" and the output message is "Bpm:sub_msg".

Note: The message here is what has been configured in message map.


Figure 2-5

(6) Release process

The publishing process can be used as a sub-process for other processes.

Step Two: New process using sub-process

The second step in this paragraph is to describe the process using sub-process methods, and the settings for parent-child relationships.

(1) New process

The new process is used as a parent process, ready to use the process previously built. On the left side of the business Process model interface, switch the options page to workspace, as shown in 2-6, and drag and drop the new process "Sub_processa" to the diagram.


Figure 2-6

When dragged into place, drag the icon into a similar activity, and then draw the connection line, as shown in 2-7. Name the successor node master process activity 2, and bind the form. The naming process is TestSubProcess1.


Figure 2-7

(2) New Master (parent) process messages (message Map)

The Create message name is Main_msg, which contains two elements (element) Main_msg_name, Main_msg_data.


Figure 2-8

(3) Configure sub-process activity link

The sub-process activity (Sub_processa) attribute is defined as follows:

The general content, as shown in 2-9, basically saves the default state.


Figure 2-9

Message no one, as shown in 2-10, basically keeps the default value.


Figure 2-10

(4) Message binding to sub-process

The sub-process referred to here is the above-dragged into the process of "sub_process" process, according to the process Activity link configuration, using "Pre Assignments" binding input message elements into the sub-process message, as the input of the sub-process, as shown in 2-8, Main_msg_name corresponds to sub_msg_name, main_msg_data corresponds to Main_msg_data. use the "Post Assignments" binding subprocess to end the event message output on the main process message element.

(5) Configuring the Process Start Event (start events)

The configuration here is to set the input message interface for the process to receive external incoming parameters, set the Start property (properties), where trigger type is "message" and input message is set to "Bpm:main_msg" (obtained through an XPath expression).

(6) Other configurationsA little. (7) Release processThe third step, the test process(1) test the sub-process first(2) Testing the main processDuring the debug test main process, a sub-process debug interface will appear, after the sub-process debug is completed, and then back to the main process interface.
use for Each loop on the sub-process activity linkFirst step: Create a new process

The first step in the "sub-process modeling and use" section, here is a little bit.

Step Two: The new process uses the sub-process and the for Each loop

(1) New process

The new process is named TestSubProcess2, where "sub-process in main process 1" is the name of the Sub_processa process. Configure the process activity as a For Each loop group widget by the For Each loop method.


Figure 3-1

(2) New Primary (parent) process messages (message Map)

The message name is Main_msg, the first iteration element, named Main_elem, contains two elements (element) Main_elem_name, Main_elem_data. This MAIN_MSG message hosts the iteration parameters to the sub-process.

The message name is then created as main_ret_msg, used as a receive subprocess return message, and then built with two elements (element) Main_ret_msg_name, Main_ret_msg_data.


Figure 3-2

(3) Configuring the For each property

To set the iteration variable iterator name to iterator subprocess, select the condition value for condition to Bpm:main_msg/bpm:main_elem. (Note that this value is obtained through the XPath selector)


Figure 3-3

(4) Message binding to sub-process

The sub-process referred to here is the above-dragged into the process of "sub_process" process, according to the process Activity link configuration, using "Pre Assignments" binding input message elements into the sub-process message, as the input of the sub-process, as shown in 3-2, Main_ Elem_name corresponds to Sub_msg_name, main_elem_data corresponds to Main_msg_data.

Note: The input message is iterative data, so main_elem_name the actual corresponding XPath expression is Instance:iterator_subprocess/bpm:main_elem_name/text (), as shown in 3-4.


Figure 3-4

(5) Binding sub-process return message to main process

use "Post Assignments" to bind the Subprocess End event message to output the main process message element, sub_msg_name corresponds to Main_ret_msg_name, sub_msg_data corresponds to Main_ret_msg_data, as shown in 3-5.

Figure 3-5

(7) Release process


Step three: Test process

Slightly.

Due to the limited author level, feedback discussion is welcome.

Reference:

Cordys BOP 4 Platform Development Walkthrough--for Each process Modeling development Sho Yongwei 2015.4

Cordys BOP 4 Platform Development Walkthrough--Process Modeling Development (BPM) Sho Yongwei 2015.4


Cordys BOP 4 Platform sub-process vs. embedded sub-process and sub-process modeling techniques

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.