• 沒有找到結果。

Chapter 3. BPMN Signature Patterns

3.2 Signature Patterns modeled with BPMN

3.2.2 Parallel Category

Our patterns in parallel category are extended from Sequential Signature pattern. After the originator completes the ASA, the s-document of the patterns is duplicated into several mv-s-documents, of which each is sent to a reviewer in parallel. To simplify our discussion, we assume that all reviewer(s) starts to execute his/her ASA at the same time. To ensure the consistency of the signature workflow, when any of the reviewers disapproves his/her mv-s-document, the rest reviewers are enforced immediately to do: the completed ASAs are compensated and the uncompleted ones are rollback. After all the mv-s-documents are reviewed, the mv-s-documents are collected at the starting subprocess of the approver. If any reviewer disapproves his/her mv-s-document, the approver asks the originator to compensate his/her ASA with the information collected and redo the whole process. Otherwise, the all the information are merged into an s-document to start the final approval.

There are three signature patterns in this category presented in the following subsections correspondingly: Static Countersignature, Dynamic Countersignature, and Additional Countersignature.

22

3.2.2.1 Static Countersignature Pattern

The simplest parallel signature workflow is to let the reviewer keep in the process. The process can be named as Static Countersignature pattern, and its pattern is shown below.

Figure 3.5 A Static Countersignature

1. Name: Static Countersignature

2. Intent: The reviewers in this pattern cannot be removed during the signature

23

workflow.

3. Applicability: This pattern is applicable for the signature workflows with essential reviewers approving the s-document simultaneously.

4. Structure: Figure 3.5 shows the structure of this pattern. In the pattern, OSP contains a parallel gateway after the ASA to dispatch the mv-s-documents to the corresponding reviewers. In RSPi, 1 <= i <= N, when the ASA fails, an undo event is thrown to the rest reviewers simultaneously for the compensation of their ASAs.

ASP contains three structures described as below:

(1) A parallel gateway, the entry point of ASP, is used to merge the input mv-s-documents.

(2) An exclusive gateway, after the parallel gateway, checks whether any reviewer disapproves the mv-s-document.

(3) An undo event generator between two parallel gateways is used to ask the compensation of Ri’s ASA, 1 <= i <= N, before OSP restarts the process again.

5. Examples: The human resource and the accounting department in the company are necessary departments to approve the leaving application. When an employee leaves, the human resource and the accounting department sign the leaving applications before the manager approves the application.

24

3.2.2.2 Dynamic Countersignature Pattern

A parallel process can be more complicated. For example, it allows the originator to select the reviewers from all followed to approve their work after the originator’s ASA is completed. The selection at the end of its ASA occurs at the originator’s first turn or each of its redo action. Such a process can be implemented according to Dynamic Countersignature pattern shown below.

Figure 3.6 A Dynamic Countersignature

1. Name: Dynamic Countersignature

2. Intent: Dynamic Countersignature pattern, an extension of Static Countersignature

25

pattern, allows the originator to determine the necessary reviewer(s) after completing its ASA. Besides, the originator may ignore all the reviewers and send the s-document directly to the approver.

3. Applicability: During design time, the designers may be allowed to put all possible reviewers in the parallel signature workflow only. This pattern can be applied to implement the corresponding workflow.

4. Structure: As in Figure 3.6, the pattern is similar to Static Signature pattern. In the pattern, after the originator completes his/her ASA, an inclusive gateway in OSP duplicates and dispatches the mv-s-documents to the necessary reviewers. The input mv-s-documents of ASP are merged by an inclusive gateway after all the reviewers review the mv-s-documents. Besides, a flow connecting the two inclusive gateways is established that the originator may pass the s-document to the approver directly if it is unnecessary being reviewed.

5. Examples: When the cost of an advertising application exceeds the budget cap, the sales department may determine either or both of auditing department and accounting department needed to approve the application before the approved of the manager.

When the cost is low, the sales department may send the application directly to the manager for approval.

26

3.2.2.3 Additional Countersignature Pattern

A more complicated case is that the system allows a reviewer to ask another reviewer to approve the corresponding review after his approval. The target reviewer of each one is selected during program execution. The following pattern, Additional Countersignature pattern, contains a sample structure.

Figure 3.7 An Additional Countersignature

1. Name: Additional Countersignature

27

2. Intent: Additional Countersignature pattern is an extension of Dynamic Countersignature pattern. Due to the sequence of invocations from a predefined reviewer and a reviewer by another one, a sequence of reviewers and their approval work is generated. There may be more than one sequence of reviewers, but a reviewer cannot perform the review work more than one time.

3. Applicability: This pattern is applicable for the signature workflows where both the originator and the reviewer(s) are allowed to determine the necessary reviewer(s) according to the characteristic of the job dynamically.

4. Structure: Figure 3.7 shows that Additional Countersignature pattern is constructed from Dynamic Signature pattern. To improve the flexibility of reviewer decision, there are three control structures added to RSPi, 1 <= i <= N:

(1) A condition is added to the exclusive gateway in front of Ri’s ASA to check whether the ASA is completed. If it is true, Ri’s ASA is skipped to avoid duplicated approval. Otherwise, Ri’s ASA is normally executed.

(2) An exclusive gateway after Ri’s ASA is added to allow Ri to invoke another one to approve the mv-s-document.

(3) A redo event including generator and catcher is named “add Rj”, 1 <= j <= N and i ≠ j, to direct the flow to RSPj if Ri invokes Rj to approve the mv-s-document.

5. Examples: The HR department, the accounting department, and the risk management department are the potential reviewers of investment application. When the investment department proposes an application associated with investments, they decide that the HR department and the accounting department should review the application. If HR department cannot distinguish whether the application may bring damages, it can request the risk management department as an additional reviewer. If the damage is simple and can be decided by HR department, such a request is not needed. Additional Countersignature pattern works for this case.

28

相關文件