CN1728165A - Multitask coordinated dispatching method in use for workflow engine - Google Patents

Multitask coordinated dispatching method in use for workflow engine Download PDF

Info

Publication number
CN1728165A
CN1728165A CNA2005100428886A CN200510042888A CN1728165A CN 1728165 A CN1728165 A CN 1728165A CN A2005100428886 A CNA2005100428886 A CN A2005100428886A CN 200510042888 A CN200510042888 A CN 200510042888A CN 1728165 A CN1728165 A CN 1728165A
Authority
CN
China
Prior art keywords
task
state
setstatus
work
client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CNA2005100428886A
Other languages
Chinese (zh)
Inventor
胡飞虎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
XI'AN LONGZHOU TECHNOLOGY Co Ltd
Xian Jiaotong University
Original Assignee
XI'AN LONGZHOU TECHNOLOGY Co Ltd
Xian Jiaotong University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by XI'AN LONGZHOU TECHNOLOGY Co Ltd, Xian Jiaotong University filed Critical XI'AN LONGZHOU TECHNOLOGY Co Ltd
Priority to CNA2005100428886A priority Critical patent/CN1728165A/en
Publication of CN1728165A publication Critical patent/CN1728165A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

A method for coordination - dispatching multitask used in operation stream engine includes structuring multistep task coordination net with four element set of N= ( C, T : W , D ) , initializing all operations before multitask is dispatched, dispatching start - up case first then dispatching the others as per flow direction of said net and finally dispatching end case automatically according to operation state. The said dispatch includes eight manners of start - up, end, signed and returned task of client computer, multistep task process and reprocess as well as start - up and end circulation.

Description

Multitask cooperative scheduling method for workflow engine
Technical Field
The invention relates to a workflow and business process analysis and modeling technology, in particular to a multitask cooperative scheduling method for a workflow engine.
Prior Art
The main objective of the workflow engine is to implement the scheduling and execution of multiple tasks in the workflow, and the performance of the workflow engine mainly depends on the scheduling method of multiple tasks, so the scheduling method of multiple tasks in the workflow engine is increasingly regarded by academia and industry. The Petri network technology is one of the most commonly used methods in workflow engine multitask scheduling, and a workflow network (WF-net) scheduling method proposed by Van der Aalst on the Petri network basis is the most famous. Knowledge about Petri nets and workflow nets can be referred to in the book "workflow management-model, method and System" (Wilvan der Aalst & Kees vanHee, ed. King of Miner, Renship, etc., Qinghua university Press, 2.2004, ISBN 7-302-.
Although the Petri network-based workflow network technology achieves certain results in the application of workflow engine multitask scheduling, the following problems exist:
1. the workflow network is based on a Petri network formed by triples (P, T; F), conditions are represented by a library (P), tasks are represented by transitions (T), and the conditions and the transitions are connected by flow relations (F). This method is suitable for scheduling situations where each task is only handled by one client (i.e. each task is completed on one client at a time), whereas for situations where a task is handled by multiple clients simultaneously (i.e. each task is completed in stages on multiple clients), the scheduling method fails to achieve normal scheduling because it fails to express the cooperative relationship between multiple clients and multiple tasks.
2. In multi-task scheduling of workflows, reverse scheduling situations often occur where an executed task is rolled back or re-executed. In a Petri network-based workflow network, a library (P) represents a condition, a transition (T) represents a task, and the task can be scheduled only in a forward direction but not in a reverse direction. Therefore, this scheduling method is less practical.
Disclosure of Invention
The invention aims to realize the cooperation between the multi-step tasks and the multiple clients and realize the forward and reverse scheduling of the multi-step tasks, and has strong practicability and flexible scheduling.
The technical scheme of the invention is realized as follows:
1. a multitask cooperative scheduling method for a workflow engine is characterized by comprising the following steps: the method comprises the following steps:
(1) constructing a computing model of a multi-task cooperative method, namely a multi-step task cooperative network, wherein a four-tuple N ═ C, T; W, D) is constructed according to the following sufficient requirements:
1°C≠φ
2°T≠φ
3°CI T=φ
4°W*C×T
5°D*T×C
6°dom(W)Ycod(W)=CY T
wherein, <math> <mrow> <mi>dom</mi> <mrow> <mo>(</mo> <mi>W</mi> <mo>)</mo> </mrow> <mo>=</mo> <mo>{</mo> <mi>x</mi> <mo>|</mo> <mo>&Exists;</mo> <mi>y</mi> <mo>:</mo> <mrow> <mo>(</mo> <mi>x</mi> <mo>,</mo> <mi>y</mi> <mo>)</mo> </mrow> <mo>&Element;</mo> <mi>W</mi> <mo>}</mo> <mo>,</mo> <mi>cod</mi> <mrow> <mo>(</mo> <mi>W</mi> <mo>)</mo> </mrow> <mo>=</mo> <mo>{</mo> <mi>y</mi> <mo>|</mo> <mo>&Exists;</mo> <mi>x</mi> <mo>:</mo> <mrow> <mo>(</mo> <mi>x</mi> <mo>,</mo> <mi>y</mi> <mo>)</mo> </mrow> <mo>&Element;</mo> <mi>W</mi> <mo>}</mo> <mo>:</mo> </mrow> </math>
in a quad, C is a limited set of clients; t is a limited set of tasks; w is a collection of jobs representing the division of work by the client in a task; d is a forwarding set, representing the direction of flow of the task.
(2) Constructing a dynamic structure of the multi-step task cooperative network, namely a multi-step task cooperative network system, wherein an octave sigma ═ (C, T; W, D; W0, PD, G, L) is constructed according to the following conditions:
1 DEG N ═ C, T; W, D) is a multi-step mission collaborative network.
2°W0W is the set of initial jobs. Initiating work refers to work that can be handled without relying on any task client.
3°PDIs the set of forwarding conditions defined on D. The forwarding condition refers to a condition on which forwarding depends.
4 ° G is a set of packets defined on C. If there is a dependency between the work that the client is about to handle and the tasks that have been completed, the work and the forwarding that delivers the tasks need to be divided into a set, called a packet.
5 L.su.W.su.D, is a cyclic set. A loop refers to a circular path that can be executed repeatedly and only the last execution information is retained.
(3) And constructing state sets required by multitask scheduling, wherein the state sets comprise five state sets:
state set for 1 ° case: si ═ Sir,Siw,Swf}. The case is one-time execution of the multi-step task collaborative network, and one multi-step task collaborative network can be executed for multiple times, wherein each execution corresponds to a different case. Wherein,
Sirready state: the case waits for the status of execution,
Siwin the office state: the state in which the case is executing,
Sifand (4) completion state: state where the case has ended.
Set of states for 2 ° operation: sw ═ { Swr,Sww,Swn,Swf}. Wherein,
Swrready state: a state in which the job waits for the client to handle,
Swwin the office state: the state in which work is being transacted by the client,
Swnnegative state: the work can not be handled by the client because the condition is not satisfied,
Swfand (4) completion state: a state in which the work has ended.
State set of 3 ° service: st ═ Str,Stw,Stn,Stf}. Wherein,
Strready state: the task waits for the status of the client to transact,
Stwin the office state: the state in which the task is being handled by the client,
Stnnegative state: the task is in a state of being unable to be handled by the client because the condition is not satisfied,
Stfand (4) completion state: a state in which the task has ended.
4 ° forwarded state set: sd ═ Sdr,Sdw,Sdn,Sdf}. Wherein,
Sdrready state: forwarding the state waiting to be performed,
Sdwa state to be signed: forwarding the state waiting to be signed in by the client,
Sdnnegative state: forwarding a state that cannot be signed by the client because the condition is not satisfied,
Sdfand (4) completion state: the forwarding has ended.
Set of states for a 5 ° cycle: sl ═ Sl { Slr,Slw,Sdf}. Wherein,
Slrready state: wait cyclicallyThe state of being executed is such that,
Slwthe working state is as follows: the state in which the loop is being executed,
Slfand (4) completion state: a state in which the loop has ended.
(4) The multi-task scheduling comprises eight scheduling methods, namely a start case, a stop case, a client sign-on task, a client return task, multi-step task handling, multi-step task reprocessing, a start cycle and a stop cycle. Prior to multitasking, cases and all work, tasks, forwarding, loops are initialized to the ready state. The starting case is the first executed scheduling, the client signs up the task, the client returns the task, the multi-step task is processed, the multi-step task is re-processed, the starting cycle and the terminating cycle are scheduled by the client according to the flow direction of the multi-step task collaborative network, including the forward direction and the reverse direction, and the scheduling of the terminating case is automatically scheduled by the system according to the working and forwarding states.
Order:
setstatus (x) indicates the state of a setting object x, x being a case, task, job, forward, or loop;
GetStatus (x) represents the state of an object x, wherein x is a case, a task, work, forwarding or circulation;
setclient (x) represents the client to which the set object belongs, and x is work or forwarding;
GetClient (x) represents the client to which the obtained object belongs, and x is work or forwarding;
precondition (x) represents condition calculation, the result is True or False, and x is forwarding;
count (x) represents the number of objects in a collection, x being a collection.
The scheduling method of the multi-step task can be expressed as follows:
1 deg. start-up case.
Let w0As a casei any initial work of, W0Is w0The scheduling method of the start case is as follows:
the status of the case and each of the initial jobs is set to the in-office status. Namely, it is
SetStatus(1):=Siw
SetStatus(w0):=Sww,*w0∈W0
2 ° end case
Let W be any work of case i, W be the set of W, D be any forwarding of case i, and D be the set of D, then the scheduling method of the terminating case is:
the first step is as follows: if there are still jobs to be done or tasks to be signed in a case, i.e. <math> <mrow> <mi>GetStatus</mi> <mrow> <mo>(</mo> <mi>w</mi> <mo>)</mo> </mrow> <mo>=</mo> <mi>S</mi> <msub> <mi>w</mi> <mi>w</mi> </msub> <mo>,</mo> <mo>&Exists;</mo> <mi>w</mi> <mo>&Element;</mo> <mi>W</mi> </mrow> </math> Or <math> <mrow> <mi>GetStatus</mi> <mrow> <mo>(</mo> <mi>d</mi> <mo>)</mo> </mrow> <mo>=</mo> <mi>S</mi> <msub> <mi>d</mi> <mi>w</mi> </msub> <mo>,</mo> <mo>&Exists;</mo> <mi>d</mi> <mo>&Element;</mo> <mi>D</mi> <mo>,</mo> </mrow> </math> The case can not be terminated and the process is ended; otherwise, the second step is carried out.
The second step is that: setting the state of the case to be a complete state, namely SetStatus (i): is Si ═ Sif
And 3 degrees of client machines sign the tasks.
Let c be any client of the case order, gcIs any packet defined on c, d packets gcD is a set of D,'t is a task to which D belongs,dis any forwarding in the task't,Dis thatdSet of (2)'W is any work in task't, 'W is a set of' W, W is a grouping gcW is the set of W, t is the task to which W belongs,wis any one of the jobs in the task t,Wis thatwD ' is any forwarding in task t, D ' is a set of D '. The scheduling method of the client c to sign up the task is as follows:
the first step is as follows: if g iscIs in a pending or negative state, i.e., GetStatus (d) e { Sdw,SdnThe * D belongs to D, then the second step is carried out; otherwise, ending;
the second step is that: if g iscIs in a negative state, i.e. getstatus (d) ═ Sdn* D belongs to D, then go to the third step; otherwise, turning to the fourth step;
the third step: g is prepared fromcIs set to a negative state, namely setstatus (w): swn* W ∈ W; for each w, if it belongs to each work of task twAre all in a negative state, i.e. GetStatus: (w)=Swn,* wWThen task t and each forwarding d' of task t are set to a negative state, i.e. setstatus (t): st-nSetStatus(d′):=Sdn* D' is equal to D, and ends; otherwise, ending.
The fourth step: for gcIf it is in the ready state, set the client of d to c, i.e. setclient (d): if c, turning to the sixth step; otherwise, set the client of d to null, i.e., setclient (d): null, and go to the fifth step;
the fifth step: if the task't to which d belongs is in a negative state, namely GetStatus ('t): st-nThen task't and each of its jobs' w and each of its forwardingsdSet to the done state, SetStatus ('t): st-f,SetStatus(′w):=Swf,*′w∈′W,SetStatus( d):=Sdf,* dD
And a sixth step: g is prepared fromcSet to completion status, set each work w to completion status, and set the client of each work w to c, setstatus (d): sd ═ Sdf,*d∈D,SetClient(w):=c,*w∈W,SetStatus(w):=Sww* W ∈ W. If g iscThe forwarding d is still in the pending or negative state, i.e. GetStatus (d) epsilon { Sdw,SdnFourthly, * D belongs to D, then the fourth step is carried out; otherwise, turning to the seventh step.
The seventh step: if task t is ready, i.e. GetStatus (t) StrThen task t is set to be in the office state, i.e., setstatus (t): st-w
Eighth step: client c transacts gcAny of which works w.
The ninth step: if the work w is done, the work w is set to a completion state, namely setstatus (w): swf. If g iscStill in the on-hold state, i.e. <math> <mrow> <mi>GetStatus</mi> <mrow> <mo>(</mo> <mi>w</mi> <mo>)</mo> </mrow> <mo>=</mo> <mi>S</mi> <msub> <mi>w</mi> <mi>w</mi> </msub> <mo>,</mo> <mo>&Exists;</mo> <mi>w</mi> <mo>&Element;</mo> <mi>W</mi> <mo>,</mo> </mrow> </math> Rotating to the eighth step; otherwise, ending.
The 4 client returns to the task.
Let c be any client of the case order, gcIs any packet defined on c, d is a packet gcD is a set of D,'t is a task to which D belongs,dis any forwarding in the task't,Dis thatdIs any work in task't, ' W is a set of ' W, W is a packet gcW is the set of W, t is the task to which W belongs, wis any one of the jobs in the task t,Wis thatwD ' is any forwarding in task t, and D ' is a set of D ', then the scheduling method for client c to return to the task is as follows:
the first step is as follows: if g iscIs in an on state, i.e. GetStatus (w) ═ Sww* W belongs to W, then the second step is carried out; otherwise, ending.
The second step is that: g is prepared fromcIs set to the ready state, setstatus (w): swr* W ∈ W. For gcIf w belongs to each work of task twAre all in the ready state, i.e., GetStatus: (w)=Swr,* wWThen task t is set to the ready state, setstatus (t): st-r
The third step: for gcIf the client is c, i.e., getclient (d) ═ c, then the client of d is set to null, and d is set to the to-be-signed state, i.e., setclient (d): null, setstatus (d): sd ═ SdwThen, turning to the fifth step; otherwise, set d to a negative state, i.e., setstatus (d): sd ═ SdnAnd then turning to the fourth step.
The fourth step: if each forwarding of the task't to which d belongsdAre all in the negative state, i.e. GetStatus (d) ═ Sdn,* dDAnd each client working on ' W for task't is null, i.e. GetClient (' W) ═ null, * ' W ∈ ' W, then task't is set to the negative state, i.e. SetStatus ('t): st-n. And (6) ending.
5 deg. multi-step task handling.
Let t be any task in the case, W be any work of task t, W be the set of W, c be the client responsible for handling work W, gcIs any packet defined on client c, and'd is packet gcIs a set of 'D,'t is a work to which 'D belongs,' W is any work of task't,' W is a set of 'W'dIs any forward of't'DIs'dThe set of (a) and (b),wis a packet gcIn the above-mentioned manner, any one of the operations,Wis thatwD is any forwarding of the task t, D is the set of D, c' is the client to which D belongs, gc'is any packet defined on client c',dis a packet gcEither of the above-mentioned' forwarding is carried out,Dis thatdW' is a packet gc'any work in W', W 'is a set of W', t 'is a task to which W' belongs,w'is any one of the jobs in the task t',W' isw' D ' is any forwarding of t ' and D ' is a set of D '. The scheduling method of the task t handling process is as follows:
the first step is as follows: if every work w of task t is in the complete or negative state, i.e. GetStatus (w) e { Swf,SWn}, If W belongs to W, then switching to the second step; otherwise, ending.
The second step is that: if every task w of task t is in negative state, i.e. getstatus (w) Swnw∈W,
Set task t and each forwarding d of task t to a negative state, setstatus (t): st-n SetStatus(d):=Sdn* D ∈ D, then go to the seventh step; otherwise, the third step is carried out.
The third step: for any w in t, if w is in a negative state, then w is set to a complete state, the client of w is set to null, and w will be in the same group g as wcEach of which operateswAnd each forwarding'd is set to a completion state, setstatus (w): swf,SetClient(w):=null,SetStatus( w)=Swf,* wW,SetStatus(′d)=Sdf* 'D ∈' D, then go to the fourth step; otherwise, turning to the fifth step.
The fourth step: for any'd, if the task't to which the'd belongs is in a negative state, i.e. GetStatus ('t) ═ StnThen each of task't and task't is forwarded 'dSet to the done state, SetStatus ('t): st-f,SetStatus(′ d):=Sdf,*′ d∈′ D
The fifth step: if task t has work w in negative state, i.e. <math> <mrow> <mi>GetStatus</mi> <mrow> <mo>(</mo> <mi>w</mi> <mo>)</mo> </mrow> <mo>=</mo> <mi>S</mi> <msub> <mi>w</mi> <mi>n</mi> </msub> <mo>,</mo> <mo>&Exists;</mo> <mi>w</mi> <mo>&Element;</mo> <mi>W</mi> <mo>,</mo> </mrow> </math> Turning to the third step; otherwise, the step six is executed.
And a sixth step: setting task t to completion state, i.e. <math> <mrow> <mi>SetStatud</mi> <mrow> <mo>(</mo> <mi>t</mi> <mo>)</mo> </mrow> <mo>:</mo> <mo>=</mo> <msub> <mi>St</mi> <mi>f</mi> </msub> <mo>,</mo> <mo>&Exists;</mo> <mi>w</mi> <mo>&Element;</mo> <mi>W</mi> <mo>.</mo> </mrow> </math> Calculating a forwarding condition of each forwarding d of the task t, and if the result is True, namely precondition (d) True, setting the forwarding d to a to-be-signed state, namely setstatus (d): sd ═ Sdw(ii) a Otherwise forward d is set to negative state, i.e. setstatus (d): sd ═ Sdn
The seventh step: for any d, if it belongs to the group gcAll forwarding in `dIn the negative state, i.e. GetStatus: (d)=Sdn,* dDThen group g will be groupedcAll work w ' in ' is set to negative state, i.e. SetStatus (w '): is SWn,*w′∈W′。
Eighth step: for any one w ', all jobs in task t' if it belongs tow' in a negative state, i.e. GetStatusS ((R))w′)=Swn,* w′∈ W', then all forwarding d ' of task t ' and task t ' are set to negative state, i.e. SetStatus (t '): st-n SetStatus(d′)=Sdn,*d′∈D′。
6 degrees of multi-step task reprocessing.
Let t be any task in the case, W be any work of task t, W be the set of W, c be the client responsible for handling work W, gcIs any packet defined on client c, and'd is packet gcIs a set of 'D,'t is a work to which 'D belongs,' W is any work of task't,' W is a set of 'W'dIs any forward of't'DIs'dThe set of (a) and (b),wis a packet gcIn the above-mentioned manner, any one of the operations,Wis thatwD is any forwarding of the task t, D is the set of D, c' is the client to which D belongs, gc'is any packet defined on client c',dis a packet gcEither of the above-mentioned' forwarding is carried out,Dis thatdW' is a packet gc'any work in W', W 'is a set of W', t 'is a task to which W' belongs,w'is any one of the jobs in the task t',W' isw' D ' is any forwarding of t ' and D ' is a set of D '. The scheduling method for client c to redo task t is as follows:
the first step is as follows: if task t is in the on-hold state, i.e., GetStatus (t) StwOr task t is in completion and task t is not forwarded, i.e. getstatus (t) Stf &Count (d) 0, or task t is in complete state and each forwarding d of task t is in pending or negative state, i.e. getstatus (t) Stf & GetStatus(d)∈{Sdw,SdnThe * D belongs to D, then the second step is carried out; otherwise, ending.
The second step is that: for any d, if it belongs to the group gc' Each of the forwardingdAre all in a negative state, i.e. GetStatus: (d)=Sdn,* dDThen group g will be groupedcAll jobs w ' in ' are set to the ready state, SetStatus (w '): swr* W 'is belonged to W', and then the third step is carried out; otherwise, turning to the fourth step.
The third step: for any w ', if the task t' to which it belongs is in a negative state, each forwarding d 'of the task t' and the task t 'is set to a ready state, i.e., SetStatus (t'): st-r SetStatus(d′)=Sdr,*d′∈D′。
The fourth step: setting the task t and the work w to be reworked by the task t as an on-office state, and setting each forwarding d of the task t as a ready state, namely SetStatus (w): sww,SetStatus(t):=Stw,SetStatus(d):=Sdr* D ∈ D. For any d, if it belongs to the group gcWith work W' in the negative state, i.e. <math> <mrow> <mi>GetStatus</mi> <mrow> <mo>(</mo> <msub> <mi>w</mi> <mo>&prime;</mo> </msub> <mo>)</mo> </mrow> <mo>=</mo> <msub> <mi>Sw</mi> <mi>n</mi> </msub> <mo>,</mo> <mo>&Exists;</mo> <msup> <mi>w</mi> <mo>&prime;</mo> </msup> <mo>&Element;</mo> <msup> <mi>W</mi> <mo>&prime;</mo> </msup> <mo>,</mo> </mrow> </math> Will group gc' each work w ' in the set is set to the ready state, SetStatus (w '): swr,*w′∈W′。
The fifth step: if task t has work w in completion and the client of w is null, i.e. GetStatus ( w ) = Sw f & <math> <mrow> <mi>GetClient</mi> <mrow> <mo>(</mo> <mi>w</mi> <mo>)</mo> </mrow> <mo>=</mo> <mi>null</mi> <mo>,</mo> <mo>&Exists;</mo> <mi>w</mi> <mo>&Element;</mo> <mi>W</mi> <mo>,</mo> </mrow> </math> Put w to the negative state, setstatus (w): swn
And a sixth step: for any one w in t, if w belongs to a group gcIs in a negative state, i.e. GetStatus (b) ((b))w)=Swn,* wWThen g iscSet to a negative state, SetStatus ('d): sd ═ Sdn,*′d∈′D。
The seventh step: for any'd, if its task't is in completion and the client of each work ' w of the task't is null, i.e. GetStatus ('t) ═ Stf &GetClient (' W) ═ null, * ' W ∈ ' W, then each job ' W of task't and task't is set to a negative state, SetStatus ('t): st-n SetStatus(′w):=Swn,*′w∈′W。
Eighth step: client c reworks job w.
The ninth step: if the work w is finished, setting the work w to be in a finished state, namely SetStatus (w): swfAnd then, the process is ended. Otherwise, the step eight is executed.
The cycle is started at 7 deg..
Let L be any cycle of case i, and w be any work on the cycle path, then the scheduling method of the start cycle is as follows:
if the work w belongs to the loop L and the work w is in the on-Do state and the loop L is in the ready state, i.e. w belongs to L&GetStatus(w)=Sww&GetStatus(L)=SlrThen set cycle L to run state, setstatus (L): sl ═ Slw(ii) a Otherwise, ending.
The cycle is terminated at 8 °.
Let L be any cycle of case i, and w be any work on the cycle path, then the scheduling method for terminating the cycle is as follows:
if the work w belongs to the loop L, the work w is in the on state and the loop L is in the running state, namely w belongs to the L&GetStatus(w)=Sww&GetStatus(L)=SlwThen set cycle L to run state, setstatus (L): sl ═ Slf(ii) a Otherwise, ending.
The invention realizes a cooperation method between the multi-step tasks and the clients and a forward and reverse scheduling method of the multi-step tasks when the tasks are completed on the clients in stages in the multi-task scheduling of the workflow, wherein the scheduling method comprises a starting case, a terminating case, a client signing task, a client returning task, a multi-step task handling, a multi-step task reprocessing, a starting cycle and a terminating cycle. Through the actual test of the workflow engine software based on the scheduling method, the scheduling method completely meets the requirements, and the aim of the invention is well fulfilled.
Drawings
FIG. 1 is a flow chart of the case start scheduling of the present invention
FIG. 2 is a flow chart of the case termination scheduling of the present invention
FIG. 3 is a schematic diagram of client sign-on and return tasks according to the present invention
FIG. 4 is a flow chart of a client sign-on task of the present invention
FIG. 5 is a flow chart of the client return task of the present invention
FIG. 6 is a schematic diagram of task handling and re-handling according to the present invention
FIG. 7 is a task processing flow diagram of the present invention
FIG. 8 is a task re-processing flow chart of the present invention
FIG. 9 is a flow chart of a start-up cycle of the present invention
FIG. 10 is a flow chart of the termination cycle of the present invention
FIG. 11 is a schematic view of an embodiment of the present invention
Detailed Description
As shown with reference to figure 1 of the drawings,
let w0For any initial job of case i, W0Is w0The scheduling method of the start case is as follows:
the status of the case and each of the initial jobs is set to the in-office status. Namely, it is
SetStatus(i):=Siw
SetStatus(w0):=Sww,*w0∈W0
As shown with reference to figure 2 of the drawings,
let W be any work of case i, W be the set of W, D be any forwarding of case i, and D be the set of D, then the scheduling method of the terminating case is:
the first step is as follows: if there are still jobs to be done or tasks to be signed in a case, i.e. <math> <mrow> <mi>GetStatus</mi> <mrow> <mo>(</mo> <mi>w</mi> <mo>)</mo> </mrow> <mo>=</mo> <mi>S</mi> <msub> <mi>w</mi> <mi>w</mi> </msub> <mo>,</mo> <mo>&Exists;</mo> <mi>w</mi> <mo>&Element;</mo> <mi>W</mi> </mrow> </math> Or <math> <mrow> <mi>GetStatus</mi> <mrow> <mo>(</mo> <mi>d</mi> <mo>)</mo> </mrow> <mo>=</mo> <msub> <mi>Sd</mi> <mi>w</mi> </msub> <mo>,</mo> <mo>&Exists;</mo> <mi>d</mi> <mo>&Element;</mo> <mi>D</mi> <mo>,</mo> </mrow> </math> The case can not be terminated and the process is ended; otherwise, the second step is carried out.
The second step is that: setting the state of the case to be a complete state, namely SetStatus (i): is Si ═ Sif
As shown with reference to figure 3 of the drawings,
let c be any client in case i, gcIs any packet defined on c, d is a packet gcD is a set of't is the task to which D belongs, D is any forwarding in task't,Dis thatdIs any work in task't, ' W is a set of ' W, W is a packet gcW is a set of W, t is a task to which W belongs, W is any one of tasks t,Wis thatwD ' is any forwarding in task t, D ' is a set of D '.
As shown with reference to figure 4 of the drawings,
let c be any client in case i, gcIs any packet defined on c, d is a packet gcD is a set of't is the task to which it belongs, D is any forwarding in task't,Dis thatdIs any work in task't, ' W is a set of ' W, W is a packet gcW is the set of W, t is the task to which W belongs,wis any one of the jobs in the task t,Wis thatwD ' is any forwarding in task t, D ' is a set of D '. The scheduling method of the client c to sign up the task is as follows:
the first step is as follows: if g iscIs forwarded tod are all in the pending or negative state, i.e., GetStatus (d) e { Sdw,SdnThe * D belongs to D, then the second step is carried out; otherwise, ending;
the second step is that: if g iscIs in a negative state, i.e. getstatus (d) ═ Sdn* D belongs to D, then go to the third step; otherwise, turning to the fourth step;
the third step: g is prepared fromcIs set to a negative state, namely setstatus (w): swn* W ∈ W; for each w, if it belongs to each work of task twAre all in a negative state, i.e. GetStatus: (w)=Swn,* wWThen task t and each forwarding d' of task t are set to a negative state, i.e. setstatus (t): st-nSetStatus(d′):=Sdn* D 'is E.D', end; otherwise, ending.
The fourth step: for gcIf it is in the ready state, set the client of d to c, i.e. setclient (d): if c, turning to the sixth step; otherwise, set the client of d to null, i.e., setclient (d): null, and go to the fifth step;
the fifth step: if the task't to which d belongs is in a negative state, namely GetStatus ('t): st-nThen task't and each of its jobs' w and each of its forwardingsdSet to the done state, SetStatus ('t): st-f,SetStatus(′w):=Swf,*′w∈′W,SetStatus( d):=Sdf,* dD
And a sixth step: g is prepared fromcSet to completion status, set each work w to completion status, and set the client of each work w to c, setstatus (d): sd ═ Sdf,*d∈D,SetClient(w):=c,*w∈W,SetStatus(w):=Sww* W ∈ W. If g iscIn which the forwarding d is still pendingA sign-on or a-off state, i.e., GetStatus (d) e { SdwSdn }, * D ∈ D, then go to the fourth step; otherwise, turning to the seventh step.
The seventh step: if task t is ready, i.e. GetStatus (t) StrThen task t is set to be in the office state, i.e., setstatus (t): st-w
Eighth step: client c transacts gcAny of which works w.
The ninth step: if the work w is done, the work w is set to a completion state, namely setstatus (w): swf
If g iscStill in the on-hold state, i.e. <math> <mrow> <mi>GetStatus</mi> <mrow> <mo>(</mo> <mi>w</mi> <mo>)</mo> </mrow> <mo>=</mo> <msub> <mi>Sw</mi> <mi>w</mi> </msub> <mo>,</mo> <mo>&Exists;</mo> <mi>w</mi> <mo>&Element;</mo> <mi>W</mi> <mo>,</mo> </mrow> </math> Rotating to the eighth step; otherwise, ending.
As shown with reference to figure 5 of the drawings,
let c be any client in case i, gcIs any packet defined on c, d is a packet gcD is a set of D,'t is a task to which D belongs,dis any forwarding in the task't,Dis thatdIs any work in task't, ' W is a set of ' W, W is a packet gcW is the set of W, t is the task to which W belongs,wis any one of the jobs in the task t,Wis thatwD ' is any forwarding in task t, and D ' is a set of D ', then the scheduling method for client c to return to the task is as follows:
the first step is as follows: if g iscIs in an on state, i.e. GetStatus (w) ═ Sww* W belongs to W, then the second step is carried out; otherwise, ending.
The second step is that: g is prepared fromcIs set to the ready state, setstatus (w): swr* W ∈ W. For gcIf w belongs to each work of task twAre all in the ready state, i.e. GetStatus (w) ═ Swr,* wWThen task t is set to the ready state, setstatus (t): st-r
The third step: for gcIf the client is c, i.e., getclient (d) ═ c, then the client of d is set to null, and d is set to the to-be-signed state, i.e., setclient (d): null, setstatus (d): sd ═ SdwThen, turning to the fifth step; otherwise, set d to a negative state, i.e., setstatus (d): sd ═ SdnAnd then turning to the fourth step.
The fourth step: if each forwarding of the task't to which d belongsdAre all in a negative state, i.e. GetStatus: (d)=Sdn,*d∈ DAnd each client working on ' W for task't is null, i.e. GetClient (' W) ═ null, * ' W ∈ ' W, then task't is set to the negative state, i.e. SetStatus ('t): st-n. And (6) ending.
As shown with reference to figure 6 of the drawings,
let t be any task in the case, W be any work of task t, W be the set of W, c be the client responsible for handling work W, gcIs any packet defined on client c, and'd is packet gcIs a set of 'D,'t is a work to which 'D belongs,' W is any work of task't,' W is a set of 'W'dIs any forward of't'DIs'dThe set of (a) and (b),wis a packet gcIn the above-mentioned manner, any one of the operations,Wis thatwD is any forwarding of the task t, D is the set of D, c' is the client to which D belongs, gc'is any packet defined on client c',dis a packet gcEither of the above-mentioned' forwarding is carried out,Dis thatdW' is a packet gc'any work in W', W 'is a set of W', t 'is a task to which W' belongs,w'is any one of the jobs in the task t',W' isw' D ' is any forwarding of t ' and D ' is a set of D '.
As shown with reference to figure 7 of the drawings,
let t be any task in the case, W be any work of task t, W be the set of W, c be the client responsible for handling work W, gcIs any packet defined on client c, and'd is packet gcIs a set of 'D,'t is a work to which 'D belongs,' W is any work of task't,' W is a set of 'W'dIs any forward of't'DIs'dThe set of (a) and (b),wis a packet gcIn the above-mentioned manner, any one of the operations,Wis thatwD is any forwarding of the task t, D is the set of D, c' is the client to which D belongs, gc'is any packet defined on client c',dis a packet gcEither of the above-mentioned' forwarding is carried out,Dis thatdW' is a packet gc'any work in W', W 'is a set of W', t 'is a task to which W' belongs,w'is any one of the jobs in the task t',W' isw' D ' is any forwarding of t ' and D ' is a set of D '. The scheduling method of the task t handling process is as follows:
the first step is as follows: if every work w of task t is in the complete or negative state, i.e. GetStatus (w) e { Swf,Swn}, If W belongs to W, then switching to the second step; otherwise, ending.
The second step is that: if every task w of task t is in negative state, i.e. getstatus (w) Swn
Figure A20051004288800192
W ∈ W, then set task t and each forwarding d of task t to a negative state, i.e. setstatus (t): st-n SetStatus(d):=Sdn* D ∈ D, then go to the seventh step; otherwise, the third step is carried out.
The third step: for any w in t, if w is in a negative state, then w is set to a complete state, the client of w is set to null, and w will be in the same group g as wcEach of which operateswAnd each forwarding'd is set to a completion state, setstatus (w): swf,SetClient(w):=null,SetStatus( w)=Swf,* wW,SetStatus(′d)=Sdf* 'D ∈' D, then go to the fourth step; otherwise, turning to the fifth step.
The fourth step: for any'd, if the task't to which the'd belongs is in a negative state, i.e. GetStatus ('t) ═ StnThen each of task't and task't is forwarded 'dSet to the done state, SetStatus ('t): st-f,SetStatus(′ d):=Sdf,*′ d∈′ D
The fifth step: if task t has work w in negative state, i.e. <math> <mrow> <mi>GetStatus</mi> <mrow> <mo>(</mo> <mi>w</mi> <mo>)</mo> </mrow> <mo>=</mo> <msub> <mi>Sw</mi> <mi>n</mi> </msub> <mo>,</mo> <mo>&Exists;</mo> <mi>w</mi> <mo>&Element;</mo> <mi>W</mi> <mo>,</mo> </mrow> </math> Turning to the third step; otherwise, the step six is executed.
And a sixth step: setting task t to completion state, i.e. <math> <mrow> <mi>SetStatus</mi> <mrow> <mo>(</mo> <mi>t</mi> <mo>)</mo> </mrow> <mo>:</mo> <mo>=</mo> <msub> <mi>St</mi> <mi>f</mi> </msub> <mo>,</mo> <mo>&Exists;</mo> <mi>w</mi> <mo>&Element;</mo> <mi>W</mi> <mo>.</mo> </mrow> </math> Calculating a forwarding condition of each forwarding d of the task t, and if the result is True, namely precondition (d) True, setting the forwarding d to a to-be-signed state, namely setstatus (d): sd ═ Sdw(ii) a Otherwise forward d is set to negative state, i.e. setstatus (d): sd ═ Sdn
The seventh step: for any d, if it belongs to the group gcAll forwarding in `dIn the negative state, i.e. GetStatus: (d)=Sdn,* dDThen group g will be groupedcAll jobs in ' w ' are set to a negative state, i.e. SetStatus (w '): swn,*w′∈W′。
Eighth step: for any one w ', all jobs in task t' if it belongs tow' in a negative state, i.e. GetStatusS ((R))w′)=Swn,* w′∈ W', then all forwarding d ' of task t ' and task t ' are set to negative state, i.e. SetStatus (t '): st-n SetStatus(d′)=Sdn,*d′∈D′。
As shown with reference to figure 8 of the drawings,
let t be any task in the case, W be any work of task t, W be the set of W, c be the client responsible for handling work W, gcIs any packet defined on client c, and'd is packet gcIs a set of 'D,'t is a work to which 'D belongs,' W is any work of task't,' W is a set of 'W'dIs any forward of't'DIs'dThe set of (a) and (b),wis a packet gcIn the above-mentioned manner, any one of the operations,Wis thatwD is the task's task ofOne forwarding, D is the set of D, c' is the client to which D belongs, gc'is any packet defined on client c',dis a packet gcEither of the above-mentioned' forwarding is carried out,Dis thatdW' is a packet gc'any work in W', W 'is a set of W', t 'is a task to which W' belongs,w'is any one of the jobs in the task t',W' isw' D ' is any forwarding of t ' and D ' is a set of D '. The scheduling method for client c to redo task t is as follows:
the first step is as follows: if task t is in the on-hold state, i.e., GetStatus (t) StwOr task t is in completion and task t is not forwarded, i.e. getstatus (t) Stf&Count (d) 0, or task t is in complete state and each forwarding d of task t is in pending or negative state, i.e. getstatus (t) Stf&GetStatus(d)∈{Sdw,SdnThe * D belongs to D, then the second step is carried out; otherwise, ending.
The second step is that: for any d, if it belongs to the group gc' Each of the forwardingdAre all in a negative state, i.e. GetStatus: (d)=Sdn,* dDThen group g will be groupedcAll jobs w ' in ' are set to the ready state, SetStatus (w '): swr* W 'is belonged to W', and then the third step is carried out; otherwise, turning to the fourth step.
The third step: for any w ', if the task t' to which it belongs is in a negative state, each forwarding d 'of the task t' and the task t 'is set to a ready state, i.e., SetStatus (t'): st-r SetStatus(d′)=Sdr,*d′∈D′。
The fourth step: setting the task t and the work w to be reworked by the task t as an on-office state, and setting each forwarding d of the task t as a ready state, namely SetStatus (w): sww,SetStatus(t):=Stw,SetStatus(d):=Sdr* D ∈ D. For any d, if it belongs to the group gc'with work w' in negative, i.e. <math> <mrow> <mi>GetStatus</mi> <mrow> <mo>(</mo> <msup> <mi>w</mi> <mo>&prime;</mo> </msup> <mo>)</mo> </mrow> <mo>=</mo> <msub> <mi>Sw</mi> <mi>n</mi> </msub> <mo>,</mo> <mo>&Exists;</mo> <msup> <mi>w</mi> <mo>&prime;</mo> </msup> <mo>&Element;</mo> <msup> <mi>W</mi> <mo>&prime;</mo> </msup> <mo>,</mo> </mrow> </math> Will group gc' each work w ' in the set is set to the ready state, SetStatus (w '): swr,*w′∈W′。
The fifth step: if task t has work w in completion and the client of w is null, i.e. GetStatus ( w ) = Sw f & <math> <mrow> <mi>GetClient</mi> <mrow> <mo>(</mo> <mi>w</mi> <mo>)</mo> </mrow> <mo>=</mo> <mi>null</mi> <mo>,</mo> <mo>&Exists;</mo> <mi>w</mi> <mo>&Element;</mo> <mi>W</mi> <mo>,</mo> </mrow> </math> Set w to a negative state, setstatus (w): swn
And a sixth step: for any one w in t, if w belongs to a group gcEach of which operateswAre all in a negative state, i.e. GetStatus: (w)=Swn,* wWThen g iscSet to a negative state, SetStatus ('d): sd ═ Sdn,*′d∈′D。
The seventh step: for any'd, if its task't is in completion and the client of each work ' w of the task't is null, i.e. GetStatus ('t) ═ Stf&GetClient(′w)=null,*′w∈' W, then set task't and each job ' W of task't to a negative state, SetStatus ('t): st-n SetStatus(′w):=Swn,*′w∈′W。
Eighth step: client c reworks job w.
The ninth step: if the work w is done, the work w is set to a completion state, namely setstatus (w): swfAnd then, the process is ended. Otherwise, the step eight is executed.
As shown with reference to figure 9 of the drawings,
let L be any cycle of case i, and w be any work on the cycle path, then the scheduling method of the start cycle is as follows:
if the work w belongs to the loop L and the work w is in the on-Do state and the loop L is in the ready state, i.e. w belongs to L&GetStatus(w)=Sww&GetStatus(L)=SlrThen set cycle L to run state, setstatus (L): sl ═ Slw(ii) a Otherwise, ending.
As shown with reference to figure 10 of the drawings,
let L be any cycle of case i, and w be any work on the cycle path, then the scheduling method for terminating the cycle is as follows:
if the work w belongs to the loop L, the work w is in the on state and the loop L is in the running state, namely w belongs to the L&GetStatus(w)=Sww&GetStatus(L)=SlwThen set cycle L to run state, setstatus (L): sl ═ Slf(ii) a Otherwise, ending.
As shown with reference to figure 11 of the drawings,
there are 6 clients (c1, c2, c3, c4, c5 and c6) and 7 tasks (t1, t2, t3, t4, t5, t6, t7) in case i, where tasks t1, t5 and t7 are multi-step tasks (completed in steps across multiple clients), work w1_1, w1_1 and w _5 are initiating work, forwarding d1_1 and d1_2 are conditional forwarding, 2 packets are defined on c6, d2 and w6_2 are packets g1, d1_2 and w6_1 are packets g2, all other clients that do not define packets default to the same packet, w2_1, d4, w3_1 and d3 are a loop l.
The multi-step task collaborative network can be represented graphically, which is called a network diagram for short. In this embodiment, a graphical representation method as in fig. 11 is employed: clients are represented by circles, tasks are represented by rectangles, work and forwarding are represented by lines with arrows, initial work and conditional forwarding are represented by open arrows, loops are represented by small circles at the beginning of the lines (only loops are used as open), and packets are represented by numbers marked on the lines near the client end.
All work, tasks, forwarding, and loops in the case and case are in a ready state before the case is not started.
1. Forward scheduling example for case i.
(1) When i is activated, s (i) ═ Siw,S(w1_1)=Sww,S(w1_1)=Sww,S(w_5)=Sww,S(t1)=Stw,S(t2)=Stw
(2) As can be seen from the figure, t1 is responsible for c1 and c5 simultaneously, corresponding to works w1_1 and w5, t2 is responsible for c1, corresponding to work w1_ 2.
(3) When w1_1 and w5 are finished, S (w1_1) is Swf,S(w5)=Swf,S(t1)=StfSince d1_1 and d1_2 are conditional forwarding, conditional judgment needs to be performed according to condition setting, where P (d1_1) is True and P (d1_2) is False, S (d1_1) is Sdw,S(d1_2)=Sdn
(4) When w1_2 is finished, S (w1_2) is Swf,S(t2)=Stf,S(d2)=Sdw
(5) c2 does not define a packet, defaulting to all forwarding and working as a group. Since d3 is only used for loop (active when loop is started), and no loop is assumed to be started, c2 can sign task t1, and after the sign, S (d1_1) ═ Sdf,S(w2_1)=Sww,S(w2_1)=Swn,S(t4)=Stw,S(t5)=Stw
(6) 2 groups are defined on c6, d2 and w6_2 are groups g1, and d1_2 and w6_1 are groups g 2. For g1, after c6 signs task t2, S (d2) is Sdf, and S (w6_2) is Sww,S(t6)=Stw. For g2, S (d1 — 2) ═ SdnSo S (w6_1) ═ Swn
(7) When w2_1 is finished, S (w2_1) is Swf,S(t4)=Stf,S(d4)=Sdw
(8) When w2_2 is finished, S (w2_2) is SwfSince S (w6_1) ═ Swn,S(t5)=Stf,S(d5_1)=Sdw,S(d5_2)=Sdw
(9) When w6_2 is finished, S (w6_2) is Swf,S(t6)=Stf
(10) c3 does not define a packet, defaulting to all forwarding and working as a group. Since w3_1 is for loop only, and it is assumed here that loop is not started, S (d4) Sd after c3 signs tasks t4 and t5f,S(d5_1)=Sdf,S(w3_2)=Sww
(11) c4 does not define a packet, defaulting to all forwarding and working as a group. c4 signs task t5, S (d5_2) ═ Sdf,S(w4)=Sww
(12) When w3_2 and w4 are finished, S (w3_2) is Swf,S(w4)=Swf,S(t7)=StfI ends because none of w and d in i is in the pending or signed state, s (i) ═ Sif
2. Example of a reverse scheduling process for a case.
(1) The client machine reworks the task:
let case i schedule forward to step (4), since S (d1_1) ═ Sdw,S(d1_2)=Sdn,S(d1_2)=SdnTherefore, c5 can redo t1, c1 can redo t1 and t1t 2. Here, let c1 redo t1, and after redo, S (d1_1) ═ Sdr,S(d1_2)=Sdr,S(t1)=Stw,S(w1_1)=Sww
(2) The client returns to the task:
let case i forward schedule to step (6), since S (w2_1) ═ Sww,S(w2_1)=Swn,S(w6_1)=Swn,S(w6_2)=Sww,S(t4)=Stw,S(t5)=Stw,S(t6)=StwSo both c2 and c6 can roll back to the task. Assuming that c6 returns signed task t2 of group g1, S (w6_2) is Swr,S(d2)=Sdw. It can be seen that c1 can also redo w1_2 when c6 rolls back to signed t2, thereby continuously implementing the reverse direction in the multi-step task scheduling process.
3. Example of a round-robin scheduling process for a case.
If case i is scheduled forward to step (10), c3 starts loop l, then s (l) Slw,S(w3_1)=Sww,S(t3)=Stw(ii) a When w3_1 is finished, S (w3_1) is Swf,S(t3)=Stf,S(d3)=Sdw(ii) a At this time, c2 may sign task t3, and since the cycle handles the work, task, and forwarding in the path together as ready, and w2_2 is not in the cycle, S (d3) after signing is Sdf,S(2_1)=Sww,S(t4)=Stw(ii) a When w2_1 is finished, S (w2_1) is Swf,S(t4)=Stf,S(d4)=Sdw(ii) a At this time, if the cycle is stopped at c3, s (l) ═ SlfThe loop ends, ce can then process w3_1 if the loop is not to be aborted, S (w3_1) ═ Sww,S(t3)=StwAnd repeating the circulation in such a way until the circulation is terminated.

Claims (1)

1. A multitask cooperative scheduling method for a workflow engine is characterized by comprising the following steps: the method comprises the following steps:
(i) constructing a computing model of a multi-task cooperative method, namely a multi-step task cooperative network, wherein a four-tuple N ═ C, T; W, D) is constructed according to the following sufficient requirements:
1°C≠φ
2°T≠φ
3°CI T=φ
4°W*C×T
5°D*T×C
6°dom(W)Y cod(W)=CYT
wherein, <math> <mrow> <mi>dom</mi> <mrow> <mo>(</mo> <mi>W</mi> <mo>)</mo> </mrow> <mo>=</mo> <mo>{</mo> <mi>x</mi> <mo>|</mo> <mo>&Exists;</mo> <mi>y</mi> <mo>:</mo> <mrow> <mo>(</mo> <mi>x</mi> <mo>,</mo> <mi>y</mi> <mo>)</mo> </mrow> <mo>&Element;</mo> <mi>W</mi> <mo>}</mo> <mo>,</mo> </mrow> </math> <math> <mrow> <mi>cod</mi> <mrow> <mo>(</mo> <mi>W</mi> <mo>)</mo> </mrow> <mo>=</mo> <mo>{</mo> <mi>y</mi> <mo>|</mo> <mo>&Exists;</mo> <mi>x</mi> <mo>:</mo> <mrow> <mo>(</mo> <mi>x</mi> <mo>,</mo> <mi>y</mi> <mo>)</mo> </mrow> <mo>&Element;</mo> <mi>W</mi> <mo>}</mo> <mo>;</mo> </mrow> </math>
in a quad, C is a limited set of clients; t is a limited set of tasks; w is a collection of jobs representing the division of work by the client in a task; d is a forwarding set and represents the circulation direction of the task;
(2) constructing a dynamic structure of the multi-step task cooperative network, namely a multi-step task cooperative network system, wherein an octave sigma ═ (C, T; W, D; W0, PD, G, L) is constructed according to the following conditions:
1 DEG N ═ C, T; W, D) is a multi-step mission collaborative net;
2°W0w is a set of initial work, and the initial work refers to work which can be handled without depending on any task client;
3°PDis a set of forwarding conditions defined on D, a forwarding condition refers to a condition on which forwarding depends;
4G is a set of packets defined on C that need to be divided into a set, called packets, of jobs to be handled by the client and of the forwarding of the tasks to be delivered if there is a dependency between these jobs and the tasks completed;
a 5 ° L occlusal wye D, which is a set of cycles, a cycle refers to a circular path that can be executed repeatedly and retains only the last execution information;
(3) and constructing state sets required by multitask scheduling, wherein the state sets comprise five state sets:
state set for 1 ° case: si ═ Sir,Siw,SwfCases are executed once by the multi-step task collaborative network, and one multi-step task collaborative network can be executed for multiple times, wherein each execution corresponds to a different case, wherein,
Sirready state: the case waits for the status of execution,
Siwin the office state: the state in which the case is executing,
Sifand (4) completion state: a state where the case has ended;
set of states for 2 ° operation: sw ═ { Swr,Sww,Swn,SwfAnd (c) the step of (c) in which,
Swrready state: a state in which the job waits for the client to handle,
Swwin the office state: the state in which work is being transacted by the client,
Swnnegative state: the work can not be handled by the client because the condition is not satisfied,
Swfand (4) completion state: a state where the work has ended;
state set for 3 ° task: st ═ Str,Stw,Stn,StfAnd (c) the step of (c) in which,
Strready state: the task waits for the status of the client to transact,
Stwin the office state: the state in which the task is being handled by the client,
Stnnegative state: the task is in a state of being unable to be handled by the client because the condition is not satisfied,
Stfand (4) completion state: a state in which the task has ended;
4 ° forwarded state set: sd ═ Sdr,Sdw,Sdn,SdfAnd (c) the step of (c) in which,
Sdrready state: forwarding the state waiting to be performed,
Sdwa state to be signed: forwarding a shape waiting to be signed by a clientThe state of the optical disk is changed into a state,
Sdnnegative state: forwarding a state that cannot be signed by the client because the condition is not satisfied,
Sdfand (4) completion state: forwarding the state that has ended;
set of states for a 5 ° cycle: s1 ═ Slr,Slw,Sdf}; wherein,
Slrready state: the loop waits for the state to be executed,
Slwthe working state is as follows: the state in which the loop is being executed,
Slfand (4) completion state: a state where the loop has ended;
(4) the multi-task scheduling comprises eight scheduling methods, namely a starting case, a terminating case, a client signing task, a client returning task, multi-step task handling, multi-step task reprocessing, starting circulation and terminating circulation; before multitask scheduling, cases and all work, tasks, forwarding, and loops are initialized to a ready state; the starting case is the first executed scheduling, the client signs a task, the client returns a task, multi-step tasks are handled, multi-step tasks are reworked, the starting cycle and the terminating cycle are scheduled by the client according to the flow direction of the multi-step task collaborative network, including the forward direction and the reverse direction, and the scheduling of the terminating case is automatically scheduled by the system according to the working and forwarding states;
order:
setstatus (x) indicates the state of a setting object x, x being a case, task, job, forward, or loop;
GetStatus (x) represents the state of an object x, wherein x is a case, a task, work, forwarding or circulation;
setclient (x) represents the client to which the set object belongs, and x is work or forwarding;
GetClient (x) represents the client to which the obtained object belongs, and x is work or forwarding;
precondition (x) represents condition calculation, the result is True or False, and x is forwarding;
count (x) represents the number of objects in a collection, x being a collection;
the scheduling method of the multi-step task can be expressed as follows:
1 ° start-up case:
let w0For any initial job of case i, W0Is w0The scheduling method of the start case is as follows:
setting the status of the case and each of the initiatives to an in-office status, i.e.
SetStatus(i):=Siw
SetStatus(w0):=Sww,*w0∈W0
2 ° end case:
let W be any work of case i, W be the set of W, D be any forwarding of case i, and D be the set of D, then the scheduling method of the terminating case is:
the first step is as follows: if there are still jobs to be done or tasks to sign for, i.e. getstatus (w) ═ Sww <math> <mrow> <mo>&Exists;</mo> <mi>w</mi> <mo>&Element;</mo> <mi>W</mi> </mrow> </math> Or GetStatus (d) ═ Sdw <math> <mrow> <mo>&Exists;</mo> <mi>d</mi> <mo>&Element;</mo> <mi>D</mi> <mo>,</mo> </mrow> </math> The case can not be terminated and the process is ended; otherwise, turning to the second step;
the second step is that: setting the state of the case to be a complete state, namely SetStatus (i): is Si ═ Sif
3 client sign-up tasks:
let c be any client in case i, gcIs any packet defined on c, d is a packet gcD is a set of D,'t is a task to which D belongs,dis any forwarding in the task't,Dis thatdIs any work in task't, ' W is a set of ' W, W is a packet gcW is the set of W, t is the task to which W belongs,wis any one of the jobs in the task t,Wis thatwD' isIf any of the tasks t is forwarded and D 'is a set of D', the scheduling method for the client c to sign the tasks is as follows:
the first step is as follows: if g iscIs in a pending or negative state, i.e., GetStatus (d) e { Sdw,SdnThe * D belongs to D, then the second step is carried out; otherwise, ending;
the second step is that: if g iscIs in a negative state, i.e. getstatus (d) ═ Sdn* D belongs to D, then go to the third step; otherwise, turning to the fourth step;
the third step: g is prepared fromcIs set to a negative state, namely setstatus (w): swn* W ∈ W; for each w, if it belongs to each work of task twAre all in a negative state, i.e. GetStatus: (w)=Swn,* wWThen task t and each forwarding d' of task t are set to a negative state, i.e. setstatus (t): st-nSetStatus(d′):=Sdn* D 'is E.D', end; otherwise, ending;
the fourth step: for gcIf it is in the ready state, set the client of d to c, i.e. setclient (d): if c, turning to the sixth step; otherwise, set the client of d to null, i.e., setclient (d): null, and go to the fifth step;
the fifth step: if the task't to which d belongs is in a negative state, namely GetStatus ('t): st-nThen task't and each of its jobs' w and each of its forwardingsdSet to the done state, SetStatus ('t): st-f,SetStatus(′w):=Swf,*′w∈′W,SetStatus( d):=Sdf,* dD
And a sixth step: g is prepared fromcSet to completion status, set each work w to completion status, and set the client of each work w to c, setstatus (d): sd ═ Sdf,*d∈D,SetClient(w):=c,*w∈W,SetStatus(w):=Sww* W ∈ W; if g iscThe forwarding d is still in the pending or negative state, i.e. GetStatus (d) epsilon { Sdw,SdnFourthly, * D belongs to D, then the fourth step is carried out; otherwise, turning to the seventh step;
the seventh step: if task t is ready, i.e. GetStatus (t) StrThen task t is set to be in the office state, i.e., setstatus (t): st-w
Eighth step: client c transacts gcAny one of the works w;
the ninth step: if the work w is done, the work w is set to a completion state, namely setstatus (w): swf(ii) a If g iscStill has work in office, namely GetStatus (w) ═ Sww <math> <mrow> <mo>&Exists;</mo> <mi>w</mi> <mo>&Element;</mo> <mi>W</mi> <mo>,</mo> </mrow> </math> Rotating to the eighth step; otherwise, ending;
4 client fallback task:
let c be any client in case i, gcIs any packet defined on c, d is a packet gcD is a set of D,'t is a task to which D belongs,dis any forwarding in the task't,Dis thatdIs any work in task't, ' W is a set of ' W, W is a packet gcW is the set of W, t is the task to which W belongs,wis any one of the jobs in the task t,Wis thatwD is any forwarding in the task t, and D 'is a set of D', then the scheduling method for the client c to return to the task is as follows:
the first step is as follows: if g iscIs in an on state, i.e. GetStatus (w) ═ Sww* W belongs to W, then the second step is carried out; otherwise, ending;
the second step is that: g is prepared fromcIs set to the ready state, setstatus (w): swr* W ∈ W; for gcIf w belongs to each work of task twAre all in the ready state, i.e., GetStatus: (w)=Swr,* wWThen task t is set to the ready state, setstatus (t): st-r
The third step: for gcIf the client is c, i.e., getclient (d) ═ c, then the client of d is set to null, and d is set to the to-be-signed state, i.e., setclient (d): null, setstatus (d): sd ═ SdwThen, turning to the fifth step; otherwise, set d to a negative state, i.e., setstatus (d): sd ═ SdnThen, turning to the fourth step;
the fourth step: if each forwarding of the task't to which d belongsdAre all in a negative state, i.e. GetStatus: (d)=Sdn,* dDAnd each client working on ' W for task't is null, i.e. GetClient (' W) ═ null, * ' W ∈ ' W, then task't is set to the negative state, i.e. SetStatus ('t): st-n(ii) a Finishing;
5 ° multi-step task handling:
let t be any task in the case, W be any work of task t, W be the set of W, c be the client responsible for handling work W, gcIs any packet defined on client c, and'd is packet gcIs a set of 'D,'t is a work to which 'D belongs,' W is any work of task't,' W is a set of 'W'dIs any forward of't'DIs'dThe set of (a) and (b),wis a packet gcIn the above-mentioned manner, any one of the operations,Wis thatwD is any forwarding of the task t, D is the set of D, c' is the client to which D belongs, gc'is any packet defined on client c',dis a packet gcEither of the above-mentioned' forwarding is carried out,Dis thatdW' is a packet gc'any work in W', W 'is a set of W', t 'is a task to which W' belongs,w'is any one of the jobs in the task t',W' isw' if D ' is any forwarding of t ' and D ' is a set of D ', the scheduling method of the task t handling process is as follows:
the first step is as follows: if every work w of task t is in the complete or negative state, i.e. GetStatus (w) e { Swf,Swn}, <math> <mrow> <munder> <mo>&ForAll;</mo> <mo>&CenterDot;</mo> </munder> <mi>w</mi> <mo>&Element;</mo> <mi>W</mi> <mo>,</mo> </mrow> </math> Then the second step is carried out; otherwise, ending;
the second step is that: if every task w of task t is in negative state, i.e. getstatus (w) Swn <math> <mrow> <munder> <mo>&ForAll;</mo> <mo>&CenterDot;</mo> </munder> <mi>w</mi> <mo>&Element;</mo> <mi>W</mi> <mo>,</mo> </mrow> </math> Set task t and each forwarding d of task t to a negative state, setstatus (t): st-n SetStatus(d):=Sdn* D ∈ D, then go to the seventh step; otherwise, turning to the third step;
the third step: for any w in t, if w is in a negative state, then w is set to a complete state, the client of w is set to null, and w will be in the same group g as wcEach of which operateswAnd each forwarding'd is set to a completion state, setstatus (w): swf,SetClient(w):=null,SetStatus( w)=Swf,* wW,SetStatus(′d)=Sdf* 'D ∈' D, then go to the fourth step; otherwise, turning to the fifth step;
the fourth step: for any'd, if the task't to which the'd belongs is in a negative state, i.e. GetStatus ('t) ═ StnThen each of task't and task't is forwarded ' dSet to the done state, SetStatus ('t): st-f,SetStatus(′ d):=Sdf,*′ d∈′ D
The fifth step: if task t has work w in negative state, i.e. GetStatus (w) ═ Swn <math> <mrow> <mo>&Exists;</mo> <mi>w</mi> <mo>&Element;</mo> <mi>W</mi> <mo>,</mo> </mrow> </math> Turning to the third step; otherwise, turning to the sixth step;
and a sixth step: set task t to completion, i.e., setstatus (t): st-f <math> <mrow> <mo>&Exists;</mo> <mi>w</mi> <mo>&Element;</mo> <mi>W</mi> <mo>;</mo> </mrow> </math> Calculating a forwarding condition of each forwarding d of the task t, and if the result is True, namely precondition (d) True, setting the forwarding d to a to-be-signed state, namely setstatus (d): sd ═ Sdw(ii) a Otherwise forward d is set to negative state, i.e. setstatus (d): sd ═ Sdn
The seventh step: for any d, if it belongs to the group gcAll forwarding in `dIn the negative state, i.e. GetStatus: (d)=Sdn,* dDThen group g will be groupedcAll jobs in ' w ' are set to a negative state, i.e. SetStatus (w '): swn,*w′∈W′;
Eighth step: for any one w ', all jobs in task t' if it belongs tow' in a negative state, i.e. GetStatusS ((R))w′)=Swn,* w′∈ W', then all forwarding d ' of task t ' and task t ' are set to negative state, i.e. SetStatus (t '): st-n SetStatus(d′)=Sdn* D 'e.g. D'; finishing;
6 ° multi-step task rework:
let t be any task in the caseW is any work of task t, W is a set of W, c is the client responsible for handling work W, gcIs any packet defined on client c, and'd is packet gcIs a set of 'D,'t is a work to which 'D belongs,' W is any work of task't,' W is a set of 'W'dIs any forward of't'DIs'dThe set of (a) and (b),wis a packet gcIn the above-mentioned manner, any one of the operations,Wis thatwD is any forwarding of the task t, D is the set of D, c' is the client to which D belongs, gc'is any packet defined on client c',dis a packet gcEither of the above-mentioned' forwarding is carried out,Dis thatdW' is a packet gc'any work in W', W 'is a set of W', t 'is a task to which W' belongs,w'is any one of the jobs in the task t',W' isw' D ' is any forwarding of t ', D ' is a set of D ', then the scheduling method for client c to redo task t is as follows:
the first step is as follows: if task t is in the on-hold state, i.e., GetStatus (t) StwOr task t is in completion and task t is not forwarded, i.e. getstatus (t) Stf &Count (d) 0, or task t is in complete state and each forwarding d of task t is in pending or negative state, i.e. getstatus (t) Stf & GetStatus(d)∈{Sdw,SdnThe * D belongs to D, then the second step is carried out; otherwise, ending;
the second step is that: for any d, if it belongs to the group gc' Each forwarding d in (a) is in a negative state, i.e. GetStatus: (d)=Sdn,* dDThen group g will be groupedcAll jobs w ' in ' are set to the ready state, SetStatus (w '): swr* W 'is belonged to W', and then the third step is carried out; otherwise, turning to the fourth step;
the third step: for any w ', if the task t' to which it belongs is in a negative state, each forwarding d 'of the task t' and the task t 'is set to a ready state, i.e. SetStatus (t') ═ Str SetStatus(d′)=Sdr,*d′∈D′;
The fourth step: setting the task t and the work w to be reworked by the task t as an on-office state, and setting each forwarding d of the task t as a ready state, namely SetStatus (w): sww,SetStatus(t):=Stw,SetStatus(d):=Sdr* D ∈ D; for any d, if it belongs to the group gc' in which work w ' is in the negative state, i.e. GetStatus (w ') -Swn <math> <mrow> <mo>&Exists;</mo> <msup> <mi>w</mi> <mo>&prime;</mo> </msup> <mo>&Element;</mo> <msup> <mi>W</mi> <mo>&prime;</mo> </msup> <mo>,</mo> </mrow> </math> Will group gc' each work w ' in the set is set to the ready state, SetStatus (w '): swr,*w′∈W′;
The fifth step: if task t has work w in completion state and the client of w is null, i.e. getstatus (w) ═ Swf& GetClient(w)=null, <math> <mrow> <mo>&Exists;</mo> <mi>w</mi> <mo>&Element;</mo> <mi>W</mi> <mo>,</mo> </mrow> </math> Set w to a negative state, setstatus (w): swn
And a sixth step: for any one w in t, if w belongs to a group gcEach of which operateswAre all in a negative state, i.e. GetStatus: (w)=Swn,* wWThen g iscSet to a negative state, SetStatus ('d): sd ═ Sdn,*′d∈′D;
The seventh step: for any'd, if its task't is in completion and the client of each work ' w of the task't is null, i.e. GetStatus ('t) ═ Stf &GetClient (' W) ═ null, * ' W ∈ ' W, then each job ' W of task't and task't is set to a negative state, SetStatus ('t): st-n SetStatus(′w):=Swn,*′w∈′W;
Eighth step: client c reworks work w;
the ninth step: if the work w is done, the work w is set to a completion state, namely setstatus (w): swfAnd ending; otherwise, turning to the eighth step;
7 deg. start-up cycle:
let L be any cycle of case i, and w be any work on the cycle path, then the scheduling method of the start cycle is as follows:
if the work w belongs to the loop L and the work w is in the on-Do state and the loop L is in the ready state, i.e. w belongs to L&GetStatus(w)=Sww & GetStatus(L)=SlrThen set cycle L to run state, setstatus (L): sl ═ Slw(ii) a Otherwise, ending;
8 ° end cycle:
let L be any cycle of case i, and w be any work on the cycle path, then the scheduling method for terminating the cycle is as follows:
if the work w belongs to the loop L, the work w is in the on state and the loop L is in the running state, namely w belongs to the L&GetStatus(w)=Sww& GetStatus(L)=SlwThen set cycle L to run state, setstatus (L): sl ═ Slf(ii) a Otherwise, ending.
CNA2005100428886A 2005-07-04 2005-07-04 Multitask coordinated dispatching method in use for workflow engine Pending CN1728165A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2005100428886A CN1728165A (en) 2005-07-04 2005-07-04 Multitask coordinated dispatching method in use for workflow engine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2005100428886A CN1728165A (en) 2005-07-04 2005-07-04 Multitask coordinated dispatching method in use for workflow engine

Publications (1)

Publication Number Publication Date
CN1728165A true CN1728165A (en) 2006-02-01

Family

ID=35927424

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2005100428886A Pending CN1728165A (en) 2005-07-04 2005-07-04 Multitask coordinated dispatching method in use for workflow engine

Country Status (1)

Country Link
CN (1) CN1728165A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102193823A (en) * 2010-03-12 2011-09-21 微软公司 Optimal incremental workflow execution allowing meta-programming
CN102609809A (en) * 2012-01-18 2012-07-25 西安交通大学 Method for realizing workflow cycle control by looking up table

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102193823A (en) * 2010-03-12 2011-09-21 微软公司 Optimal incremental workflow execution allowing meta-programming
CN102609809A (en) * 2012-01-18 2012-07-25 西安交通大学 Method for realizing workflow cycle control by looking up table
CN102609809B (en) * 2012-01-18 2015-07-01 西安交通大学 Method for realizing workflow cycle control by looking up table

Similar Documents

Publication Publication Date Title
CN1152305C (en) Virtual machine system
CN1838077A (en) Schedulability determination method and real-time system
CN1288556C (en) Arithmetic processing system and control method, task management system and method
CN1680959A (en) Process editing apparatus and method and process management apparatus and method
CN1162777C (en) Interruption managing device and interruption managing method
CN1399762A (en) Robotic manipulators based on pre-defined time-optimum trajectory shape
CN1722130A (en) Reconfigurable operation apparatus
CN2579091Y (en) Customer device for data test by utilizing array processing
CN1010830B (en) Utilize the method for adsorption seperation of gas mixer
CN1906583A (en) Information processing device, interrupt processing control method, and computer program
CN1252144A (en) Method for self-synchronizing configurable elements of programmable component
CN1201942A (en) Message handling method, message handling apparatus, and memory media for storing message handling apparatus controlling program
CN1845213A (en) Method for realizing encryption/decryption processing in SMS4 cipher algorithm
CN100347682C (en) Automatic detection building method
CN101047849A (en) Discrete cosine inverse transformation method and its device
CN1321273A (en) Operating system and virtual computer system
CN1870028A (en) Work flow system, work flow processing method and work flow processing program
CN1728165A (en) Multitask coordinated dispatching method in use for workflow engine
CN101031884A (en) Processor
CN1258704C (en) Method for using synergic multiple computer engines based on gridding environment
CN101048739A (en) Multiprocessor system, synchronization control apparatus and synchronization control method
CN1143213C (en) Compiler and processor for processing loops at high speed
CN1444161A (en) Resolution method of material detailed list (BOM) data
CN1801745A (en) Method for building network fault diagnosis rule base
CN1598797A (en) Real-time processor system and control method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication