Mapping Timer Event from Business Process Model on Windows Workflow Foundation

A method to mapping timer event in business process model into Activity in Windows Workflow Foundation (WF) was proposed. This method can work with general business process because the model is designed in Business Process Modeling Notation (BPMN) 1.1 and it uses XML Process Definition Language (XPDL) 2.1 version as the file format. Experiment result showed that timer event could be directly mapped to flowchart model in Windows Workflow Foundation and the mapped flowchart model satisfied the functionality of timer event.


Introduction
Business Process Management (BPM) has been one of the hot research focuses in the domain of software engineering since 2003 [1].Since different modeling tools often use similar but subtly different graphical symbols, this can hinder users from effectively understanding and communicating the process models.
A better way to model business process is adopting the Business Process Modeling Notation (BPMN) 1.1 version [2] published by Object Management Group (OMG) and saving it in the file format of XML Process Definition Language (XPDL) [3] proposed by Workflow Management Coalition (WfMC).TIBCO Business Studio [4] is a tool that supports designing in BPMN and XPDL.Microsoft's Windows Workflow Foundation (WF) [5] can be used to implement the business process model in the system implementation phase.
Automatic model conversion is one of the key technologies of MDA [6] to improve the development speed.The research works of reference [7,8] show that the XPDL model can be mapped to WF model because there are certain workflow patterns supported by both XPDL 2.0 and Windows Workflow Foundation 3.5.Lin [9] developed a method to transform a subset of XPDL model into sequential model of WF 3.5.Due to the numerous types of elements in XPDL model, the scope of one paper does not permit a detailed discussion of all of these elements.For example, there are at least 30 types of events in XPDL specification, and each type of event has many attributes.Lin [9] did not discuss how to transform events in detail.
Timer event is an important type of event because it can act as a delay mechanism in the flow.As far as we know, there has been no published mapping method to map timer event from XPDL to WF.To solve the problem, the paper proposes a method to transform timer event from XPDL model to flowchart model in WF 4.0.WF 4.0 is our target platform because it has been totally redesigned and has many new features not existing in WF 3.5.
The rest of the paper is organized as the followings: Section 2 introduces the basic definitions in business process modeling.Section 3 presents the method to mapping timer event from XPDL to WF. Finally Section 4 draws the conclusion and previews future research content.

Business Process Model
The Business Process Modeling Notation (BPMN) and XML Process Definition Language (XPDL) are standards for illustrating and storing business process models in the requirement analysis phase of systems development.To facilitate the model mapping, the definition of process in our previous work [10]  The Lanes, Text Annotations and Groups in XPDL are omitted because they do not have any direct effect on the flow of the process.
Windows Workflow Foundation (WF) 4.0 is a new paradigm for building business applications in the system implementation phase.Our previous work [11] shows that WF 4.0 has many advantages over WF 3.5.For example, the Flowchart activity is more attractive to programmers, and the function of Sequence activity is improved also.

Definition 2. A flowchart in Workflow Foundation is a directed graph F= {N, C}, where N is a set of nodes, C is a set of connections, C
FlowStep is one type of node used to perform a specified activity such as WriteLine, Assign, Delay, or a set of activities contained by Sequence or Flowchart activity, or any other type of class derived from System.Activities.Activity.The Next property of FlowStep is used to specify an unconditional successor node.
FlowDecision and FlowSwitch are the other two types of nodes.The True and False properties of FlowDecision, and Default and Cases properties of FlowSwitch are used to store their conditional successor nodes.

Mapping XPDL onto WF
This section discusses the methods to map timer event in XPDL to flowchart in WF in details.

Mapping Id of Event
In XPDL model, each element has a unique Id that distinguishes it from other elements within the model.The Id property of activity in WF is an identifier that is auto-generated and unique in the scope of the workflow model.Rule 1 shows how to establish the correlation between XPDL and WF.Rule 1. . ..Let e be an event in XPDL model, v 1 is the activity created according to e in WF model H, and the mapping Id of e can be formalized as following steps: Advanced Engineering Forum Vol. 4 When H is an instance of Sequence activity, v equals to v 1 and it will be added to the Activities property of H directly, otherwise an instance of FlowStep is created to wrap v 1 so that it can be added into Nodes property of flowchart.
The DisplayName property of v is assigned so that it can be easily viewed in workflow designer.The wfobject is used to establish the correspondence of element and WF element.It is an instance of Dictionary so that the WF element can be found easily.

Mapping Name of Event
The Name attribute of XPDL element can be mapped to WF as the DisplayName property of the corresponding activity (Rule 1) and a WriteLine activity (Rule 2).
The Text property of WriteLine is used to output some information so that we can trace the execution of each activity at runtime.

Mapping of Timer Event
In XPDL model, timer event will be triggered at a specific time-date or after a specific cycle.The timer event may be a start event or an intermediate event.When it acts as a delay mechanism in the flow, timer event can be implemented by Delay activity in WF.Table 2 shows the mapping method which can be implemented by Rule 3.
In Eq. 3, map_element_name is a function implemented according to Rule 2, and function add_to_model is realized by the steps shown in Eq. 1.

Table 1 .
Mapping the Name of event Rule 2. ...Let e be an event in XPDL model, v is the WriteLine activity created according to e, and the mapping of Name can be formalized as following: e be an event in XPDL model, v is the corresponding element in WF model H, and the mapping of e can be formalized as following steps: can be described as the following.
-C is a set of connections which can be partitioned into disjoint sets of sequence flow C S , association flow C A and message flow C M ,ϕ is a set of function mappings from sub-processes to processes.