Software Process Engine of beyondtrack

Source: Internet
Author: User

This is just a draft, as a summary of this month's research and 'innovation. The article is messy. If you are interested, you can email me.

Beyondtrack's Software Process Engine and spdl seem to be coming to an end.

 

 

 
Software Process Engine of beyondtrack

Software Process Engine of beyondtrack
1 motivation

Software Process Modeling and execution is very specialized unlike
General workflows. The relations and associations of tasks of
Ordinary workflow are not very closed and coupled. In general, we may
Consider a task of an ordinary workflow is a work sheet rather than
Task. by ISO/IEC 12207 (software life cycle processes), a task is a set
Of elementary or atomic actions. A task consumes inputs (data,
Information, control) and produces outputs (data, information,
Control ).
We consider that a software process engine is a subset of Workflow
Engine is true. But, software process is too specialized to use
Workflow Engine. Software Process has its own specifications and
Practices. So, in process engine of beyondtrack, we defined a language
To depict software process, which namedSoftware Process Definition Language.

Petri Net
Is a formalized mathematical modeling ages for the description
Discrete distributed systems. The software process is a such system
Need to be defined and executed by rule and line.

2 main ideas
2.1 coloured Petri Net

All process instances defined by the same process definition are marked
As the template parameter of a token, and put these process instances
Into one Petri Net graph, which generated by the process definition.
So, just using one Petri Net (containsPetri Net GraphAndMarkings)
Instance we can depict all process instances defined by the same
Process Definition by markings. Here, we use the Colored Petri net
Model the process engine as one idea.

Every token associates a process instance, we can treat it as the token was colored. There is some benefits as followings:

  • Save Storage

The same type of process instances described by tokens
Respectively will share one Petri Net graph, so only one graph need
Persist

  • More easily to mine associations of process instances

The process instance was described by colored token, so easily to find these tokens' associations in one Graph 2.2 nested Petri Net

Todo: sub-process

2.3 concurrency

Todo: concurrency description using Petri net.

3 design intentions
3.1 Meta Model

As far as we know, XML technology is the base of Web Service,
Beautiful solution for distributed heterogeneous application. The role
Of XML of Web Service isDescriptionOf service andTransformationOf Service implementation. At this view, let's have a look at how XML do it.

We decided to use Java classes as the source meta model, and XML schema as the target meta model.

3.1.1 spdl XML Schema

To an XML document of the spdl, all elements associate with each other
By their names. So, the name of every element must unique in one spdl
XML document. The followings are all elements defined by spdl.
3.1.1.1 process-Definition

Name
Type
Multiplicity
Description
Name Attribute 1 The name of the Process Definition
Description Element [0 .. 1] The description of the Process Definition
Actor-Definition Element [1 .. *] The actor definitions of the Process Definition
Start-activity-Definition Element 1 The START activity definition of the Process Definition
Activity-Definition Element [0 .. *] All ordinary activity definitions of the Process Definition
End-activity-Definition Element [1 .. *] All end activity definitions of the Process Definition

3.1.1.2 actor-Definition

Name Type Multiplicity Description
Name Attribute 1 The name of the actor Definition
Description Element [0 .. 1] The description of the actor Definition

3.1.1.3 start-activity-Definition
Name Type Multiplicity Description
Name Attribute 1 The name of the Start activity Definition
Description Element [0 .. 1] The description of the Start activity Definition
Task-Definition Element [0 .. *] The task definitions of the Start activity Definition
Output-transition-Definition Element [1 .. *] The output transition definitions of the Start activity Definition

3.1.1.4 activity-Definition
Name Type Multiplicity Description
Name Attribute 1 The name of the activity Definition
Description Element [0 .. 1] The description of the activity Definition
Task-Definition Element [0 .. *] The task definitions of the activity Definition
Input-transition-Definition Element [1 .. *] The input transition definitions of the activity Definition
Output-transition-Definition Element [1 .. *] The output transition definitions of the activity Definition

3.1.1.5 end-activity-Definition
Name Type Multiplicity Description
Name Attribute 1 The name of the end activity Definition
Description Element [0 .. 1] The description of the end activity Definition
Task-Definition Element [0 .. *] The task definitions of the end activity Definition
Input-transition-Definition Element [1 .. *] The input transition definitions of the end activity Definition

3.1.1.6 input-transition-Definition
Name Type Multiplicity Description
Name Attribute 1 The name of the input transition Definition
Description Element [0 .. 1] The description of the input transition Definition
3.1.1.7 output-transition-Definition
Name Type Multiplicity Description
Name Attribute 1 The name of the output transition Definition
Description Element [0 .. 1] The description of the output transition Definition
3.1.1.8 task-Definition
Name Type Multiplicity Description
Name Attribute 1 The name of the task definition
Description Element [0 .. 1] The description of the task definition
Actor-Definition Element 1 The actor definition of the task definition
Property-Definition Element [1 .. *] The property definition of the task definition
 
3.1.1.9 property-Definition
Name Type Multiplicity Description
Name Attribute 1 The name of the property Definition
Description Element [0 .. 1] The description of the property Definition
Value-type Element 1 The value type defined by the property definition. At present, the value of this element only "Java. Lang. String" be allowed

3.2 todo ....
3.3 Petri net core

There are two kinds of Vertexes in Petri Net (P/T System ),PlaceAndTransition.
Place vertex depicts the process control computing, transition Vertex
Depicts the business activity. them collaborate each other over events.
3.3.1 process events

Process events depict process-level events, such as creation of
Process, completion of a activity. These events raise from business
Logic and will be handled by place vertex event handler. So far, all
Process events raise synchronously with raiser. See the following
Registration: Todo: Registration and event API snippet

3.3.2 transition vertex Logic

Transition vertex depicts the business logic of Process Engine
Beyondtrack. In classic Petri Net, a transition of a Petri net mayFire.
We can consider there is a fire event raised. The condition of firing
Please refers to Petri Net theory for details. When a transition fired,
Tokens of place connected with this transition changed.
The fire event corresponds to a business operation completed MED.
Todo: API snippets
3.3.3 place vertex event handler

A transition fire, a event raise like just we mentioned. So, there must
Exist a event handler to deal with that. Place vertex depicts the event
Handling. There are two responsibilities of place event handler mainly:

  • Move of token

Token move means the token related process instance's status has changed.

  • Generation of the next activity Node

Caused by move of token, A activity or concurrent activities will be created in process instance.

Todo: code snippets

3.4 Task Management
3.4.1 task property customizing

To depict the various of tasks of user's project is very hard in
General. So, let user to customize the properties of a task is
Necessary. The property customizing of a task was completed MED in process
Modeling.
There are three Property types has been considered:

  1. Pure text
    A pure text property is implemented by Java. Lang. String.
  2. Date
    A date property is implemented by Java. util. Date.
  3. List
    Todo: List Property

4 implementation4.1 using jaxb for spdl

In 3.1 meta model,
We decided to use Java classes as the source meta model. And,
Transformation Rules and transformation engine have been defined
Jaxb (JSR 222). The scenario of proceeding transformation as
Following Orchestration (cut from javaee tutorials ):

Author:LIANG Ding, <DL88250@gmail.com>

Status:Draft

 

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.