Computerized method and system for managing business processes using linked workflows6073109Abstract A system for analyzing and structuring business processes implemented in software to provides businesses with tools to manage business processes. The system i) notifies the user that he or she has a step to begin or to complete; ii) provides the user with the proper tools to complete a task; iii) provides the user with the proper information to complete a task; iv) allows the user to see where a task fits in the overall process; v) manages proper reminders, alerts, and follow-ups to keep the process moving; vi) automates certain standard procedures; vii) integrates with the organization's existing business systems; and viii) provides application program interfaces that allow developers to develop applications that are workflow-enabled. The system utilizes a workflow server including a transactions manager and a database. Claims We claim: Description BRIEF SUMMARY OF THE INVENTION
______________________________________
Value Methods
______________________________________
BPTid lfnGetBPTid
WFTid lfnGetWFTid
IncId fnGetIncId
______________________________________
5. The workflow associated with the incompletion is retrieved from the VDB. An instance of the class TXWFINSTANCE is created. The lBPTid and the lWFTid are passed as parameters. 6. Depending on the incompletion, the workflow participant is determined. The logic for determining the workflow participant is as follows:
______________________________________
Incompletion Workflow
Notification Type
Type Role
______________________________________
Reminder Customer His Completion
Performer
Follow-up Customer His Response
Performer
Follow-up Customer His Completion
Performer
Follow-up Performer His Response
Customer
______________________________________
7. Check if the Identity needs notification. The Identity attributes are retrieved from the VDB. These are stored in table NRDFIDENTITY. If the Notification flag is set then the follow-up/reminder information is sent to the workflow participant. The notification information is retrieved using method bfnGetNotify. 8. If notification is required, then retrieve the STF Processor Id, by using method lfnGetSTFProcId of class NRDFIDENTITY. The notification is placed in the STF queue of this STF processor. 9. The notification event is determined by the following table:
______________________________________
Incompletion Type
Event Type
______________________________________
Customer His Completion
Performer Completion coming due
Customer His Response
Performer Response past due
Customer His Completion
Performer Completion past due
Performer His Response
Customer Response past due
______________________________________
10. Get the time when the incompletion was due i.e. the Completion Time (this is not to be confused with he completion time of the workflow). 11. Get the reminder or follow-up time, i.e. the time this notification was due. (Note: It is important to distinguish between incompletion due time and reminder and follow-up due time). 12. Dispatch notification. The notification is placed in the STF Queue. Method bfnPutEvent of class TXSTFQUEUE places the notification. 13. Determine when the next notification is to be sent. Get the workflow notification definition. This contains recurring information. The next follow-up time is determined and written to the incompletion table via method vfnPutFollowUpTime. 14. Get the next incompletion to be processed. If present, proceed to step 4. 15. Return, processing is complete. Date/Time Schedule Manager The date/time schedule manager detects events which are to be executed at a particular time. The scheduled events are kept in the schedule database. The events are placed in the database by the workflow server manager user interface via calls to the schedule API and are processed by the schedule manager. The scheduled events are kept in the database in chronologically increasing order. A schedule database entry specifies when the event will be done as well as the first and last valid times for the entry, indicating the first time it should happen and when it should stop happening. If the first and last valid times are the same, the schedule entry is executed once. A recurrence interval for a schedule entry is "how often" the schedule entry is executed. Recurrence intervals may be every X minutes, every hour, every day, every month, the third Thursday of every month, and so forth. An organizational calendar is connected to the schedule manager, so that entries may be tagged to not happen on specific days (such as weekends or holidays like Labor Day). The schedule entry may be filtered to happen only on particular days of the week (such as Monday through Friday). The schedule entry may be filtered to happen only during particular time intervals (such as any time between 8-12 or 1-5) The first thing that the schedule manager does in a cycle is to find events that are due now (or which are past due). This is done by finding those with a time-out time that is less than "now". For each of the found entries, the schedule manager then brings the time-out forward to "now", even if it is currently set in the past. This function should deal properly with the case when the server has been down. For each of the found entries, the schedule manager then passes the business process initiation script to the Workflow Language Interpreter for processing. After the schedule entry is processed, the schedule manager updates the schedule entry record for the next time out based on the parameter set for it. If the entry needs not be executed again, it is then removed from the schedule database. The following is a description in pseudo-code for implementing the schedule manager process. This implementation is described in terms of a MAIN function or routine which includes a call to a loop (MainLoop) which executes continuously. MAIN The MAIN function connects to the Virtual Database(VDB), performs the primary activity of the Scheduler and disconnects from the Virtual Database. The primary activity of the schedule manager is to find business processes that are scheduled for initiation and start them. In case of an error the MAIN function performs a write to an error log, giving the error code and the message. The flow of the MAIN function is as follow: 1. Connect to the Virtual Database. 2. If connection is successful write an message to the log. 3. If connection is not successful, write a message to the log and return. 4. Call function MainLoop. 5. Disconnect from the Virtual Database. 6. If disconnection is successful write an message to the log 7. If disconnection is not successful, write a message to the log and return. MAINLOOP This function performs the primary activity of the schedule manager. In an unconditional loop, it checks if any message has been sent from the workflow server manager (WSM) using the workflow administration API, and processes it. It then performs the main activity of scheduling business processes at the scheduled time. 1. Check for any message for the schedule manager from the WSM. To retrieve messages, the method bfnGetMessage of class MESSAGE is called. In case of any error, the error is written into the log file. 2. Depending on the message, the message is processed differently, according to steps 3 and 4 below. 3. If the message is to terminate the schedule manager, the function is terminated. 4. If the message is to indicate that the configuration has changed then do the following: 5. The new configuration is retrieved using method bfnGetConfigInfo of class CONFIGINFO. The new configuration is returned in a structure that contains all configuration information. In case of error in retrieving the configuration information, the error is written in the log file. 6. The configuration constitutes the polling interval and the log verbosity options. The polling interval is the time the Scheduler sleeps between processing cycles. The log verbosity option specifies the amount of information that get written into the log file. 7. The function Scheduler is called, this performs the main activity of the schedule manager. 8. Sleep for a time interval of duration PollInterval. 9. Proceed to step 1. Scheduler The Scheduler function scans the scheduler table of the schedule database and determines which business processes are ready to be scheduled. 1. Get the current time. This tine will the basis for selecting business processes which are due to be started. If the initiate time of the business process is after the current date then the business process is initiated. 2. Using methods of class SCBPSCHEDULE the business processes due for initiating are retrieved. Methods bfnGetFirstIncompletion and bfnGetNextIncompletion retrieve the business processes that are due. 3. Get the Business Process Definition Id (BPDid). Use method lfnGetBPDid of class SCBPSCHEDULE. 4. Get the Business Process Definition. Create an instance of class DFBP for definition id BPDid. 5. Get the Business Process Name. Use method vfnGetBPName of class DFBP. 6. Initiate the business process. Transactions API call AWSTINITBP is called. The Business Process Name is a parameter to this call. 7. Determine the next ti-Le the Business Process needs to be scheduled. The Recurring Offset is retrieved using methods lfnGetRecTime of class SCBPSCHEDULE. 8. If the Recurring Offset is specified, the next initiate time is computed by adding the recurring offset to the current initiate time. 9. If the Recurring Offset is not specified, the scheduling entry is deleted from the table. 10. Get next Business Process to be initiated. If present proceed to step 3. 11. Return, processing is complete. Modules Workflow Processor The workflow processor is the brain of the workflow system. The workflow processor is analogous to the central processor unit (CPU) in a computer. Both processors receive inputs in the form of events, and both carry out logic computations. The CPU embodies a logic processor, while the workflow processor embodies the logic of workflows with phases, cycle times, actions and roles. It contains the structures and Finite State Machines (FSMs) that specify the acts and actions that are available. This module is database independent, and provides an API through which the rest of the system interfaces with it. It is furnished with in-memory structures providing complete act/state data of a workflow, from which it derives updated status information returned via these structures. The workflow processor embodies the logic of workflows with phases, actions, roles and dates of completion and reply. The basic logic of the workflow server is very similar to that used by a human manager. It asks: What actions have happened and not happened? That data has changed? and What amount of time has elapsed? The workflow updater module of the workflow server asks the workflow processor: What are the available acts for the customer and performer given the current state and the type of the workflow? Given an act, what is the new state of the workflow and what incompletions change? The workflow processor then answers with the state of the workflow and gives the answer to the workflow updater which updates databases, and changes the state of the workflow. These tasks would be impossibly complex if the number of states were large and the possible actions infinite. The present invention addresses this problem by defining a business model that intelligently defines a few conditions and actions as building blocks, but from which thousands of permutations can be constructed. A complete description of a suitable workflow processor which may be used in a workflow server may be found in U.S. Ser. No. 600,144 filed Oct. 17, 1990 and U.S. Ser. No. 07/368,179 filed Jun. 19, 1989, both owned by Action Technologies, Inc., the assignee of the present application. Workflow Updater The workflow updater module processes requests made by users via API calls, changes to the transaction database or by agent actions. This module processes workflow transactions that have been modified, updating then with the new workflow status information returned by the workflow processor. The workflow updater module updates the bound data in the business process, based on the data that was provided as part of the act that is being taken. If other scopes are defined for a workflow, then the bound data is updated in the scope of the workflow in which the act was taken. The workflow updater calls the workflow processor passing to it the workflow identification, the act being taken, the workflow role that is taking the act and the current state. The workflow processor returns to the workflow updater the new state of the workflow, the incompletion transitions what incompletions need to be set, and which ones need to be removed), the set of available acts for each one of the workflow roles and the times that can/must be specified by the users when taking each one of these available acts. The workflow updater maintains and updates the workflow transaction database. It uses the workflow; processor to determine the status of workflows and the set of possible actions for each one of the roles. The workflow updater processes an act taken by a workflow participant i.e., the Customer or Performer. This act could have been taken through a call to the proper transactions API function, through a direct modification of the transactions database or by the agent actions manager upon request of the workflow language interpreter. When an act is taken, it is recorded in a act taken database record of the transactions database. The server sequentially processes all acts. The following is a description in pseudo-code for implementing the workflow updater module. 1. Use AWSWriteToLog method of the Translog class of the Administration database to log the act taking activity. 2. Check whether there are acts to take by calling method bpnGetFirstInQueue of class TxWFActs in the VDB. 3. Check if the act is a valid act and the act is present in the list of available acts for an workflow participant by invoking method bfnCheckValidAct of class TwxFActs in the VDB. 4. Find out the current state, WF type, WF role, and the Act by invoking respectively the methods fnGetWFState, fnGetWFType, fnGetWFRole, and fnGetAct of class TxWFActs in the VDB. 5. Check with the workflow processor to determine if the act taken is consistent with the current state of the workflow and the role of the act taker (Customer/Performer) by invoking method bfnCheckValidAct of the class TxwFActs. 6. Determine the new state of the workflow by calling the workflow processor. 7. Compute the new set of incompletions by by calling the workflow processor. 8. Compute the new set of acts and the date prompts for the customer and performer using function AWSTAvailableActs of the workflow processor. If any acts are disabled then those are removed form this new set of acts using the method bfnIsDisabled of class DFWFDisabledActs of the VDB. 9. Invoke the workflow event handler to interpret the scripts associated with the act, state, and the primary workflow. 10. Send notifications the workflow participants informing the completion of the act by invoking the STF Router/Enqueuer. Classes and the methods invoked by the workflow updater module:
______________________________________
Methods Class Action
______________________________________
bfnCheckValidActs
TxWFActs check if act is in
Available Acts Table
lfnGetCompletionTime
TxWFInstance
From VDB retrieve the
Completion time
lfnGetIncompletionTime
TxWFActs From VDB retrieve the
Incompletion Time
AWSTAvailableActs compute available acts
for both customer and
performer.
______________________________________
Workflow Instantiator The workflow instantiator module is called by the transaction manager when it detects a request to initiate an instance of a business process or a workflow. The workflow instantiator instantiates business process and workflow records into the transactions database. This module creates workflow transaction records as specified in business process definitions whenever a workflow is initiated. If the transaction manager detects a change in the transactions database that indicates a request for initiation of a new business process, the instantiator reads the business process definition and creates the transaction records for the business process and for the primary workflow of the business process according to the definition. If the transaction manager detects a change in the transactions database that indicates a request for initiation of a new workflow, the instantiator reads the workflow definition and creates the transaction record for the workflow according to the definition. The instantiator also performs the role to identity mapping so that the roles that are specified in the workflow definition get mapped to the proper identities in the transaction record of the workflow. The following is a description of the steps for implementing the workflow instantiator module. The instantiator creates an instance of a business process. It makes a copy of the definition. 1. Check the length of the Business Process Name (szBPName) is within limits. If beyond limits, return error. 2. Validate the Instantiator Identity. Check if the name length is within limits. 3. Check if Instantiator Identity is a valid user and registered. Method InquireAuthorization from class AuthMaint is used to determine if the user is valid and registered. This function accesses the Names/Routings database for validation, it calls the constructor of class NRDFIDENTITY. 4. Check if the Instantiator Identity is authorized to instantiate business processes. It checks the authorities table in the names/routings database to check if this identity is authorized to instantiate business processes. The authorization method InguireAuthorization from class AuthMaint is called to determine the authorization. 5. If the Customer name is specified, check if the name length is within limits. 6. It the Customer name is specified, check that this nave is valid and registered method InguireAuthorization from class AuthMaint is used to determine if the user is valid and registered. This function accesses the Names/Routings database for validation, it calls the constructor of class NRDFIDENTITY. 7. If the Performer name is specified, check if the name length is within limits. 8. If the Performer name is specified, check that this name is valid and registered. Method InguireAuthorization from class AuthMaint is used to determine if the user is valid and registered. This function accesses the Names/Routing databases for validation, it calls the constructor of class NRDFIDENTITY. 9. If the Completion date is specified, check if the date string length is within limits. 10. If the Completion date is specified, convert the date string to long format. 11. If the Reply date is specified, check if the date string length is within limits. 12. If the Reply date is specified, convert the date string to long format. 13. If the Initiate date is specified, check if the date string length is within limits. 14. If the Initiate date is specified, convert the date string to long format. 15. If Completion and Reply dates are specified, the Reply date should be before the Completion date. 16. If the Initiate date, if specified, it should be the earliest of all specified dates. 17. Create an instance of this business process. The constructor for class TXBPINSTANCE is called for this purpose. 18. The central workflow instance is created. The constructor for class TXWFINSTANCE is called for this purpose. 19. Check for each organization role to identity any mapping which is specified at the time of initiation which overrides the mapping specified in the definition of the workflow, that the organization role and identity do exist. To verify that the organization role is present, the constructor for class NRDFORGROLE is called. To verify that the identity is present, the constructor for class NRDFIDENTITY is called. 20. Store the organization role in classes TXBPASSIGN and TXWFASSIGN from the transaction database classes to identity overrides. The constructors are called for these two classes. 21. Return status. Workflow Language Interpreter Workflow definitions are stored in the definitions database. Included in these workflow definitions are conditions under which workflows become active and inactive, and the conditions under which the workflow server should take specified actions. These conditions and instructions are expressed in the workflow language. The workflow language interpreter interprets workflow language scripts. These scripts or workflow language segments contain workflow commands, such as the initiation or taking an act in a workflow. These scripts are part of the business process definition. These scripts are automatically generated by the application builder or equivalent design application. The following is a description of the steps and syntax for implementing the workflow language interpreter module. The workflow language interpreter interprets both user defined and system generated scripts, and performs the corresponding function defined in the script. The user can perform the following functions on a workflow. The workflow language interpreter interprets user-defined as well as system generated scripts, and performs tests, functions, and assignments as presented in either kind of script. The syntax and capability of the ActionWorkflow scripting language are the same for the two kinds of scripts and is described as follows: Language Syntax A statement of the language is either an If Statement, an Action Statement or an Assignment Statement. An If Statement is either:
______________________________________
If <boolean expression> statement 1 . . . statement n
endif
or
If <boolean expression> statement 1 . . . statement s
else statement s+1 . . . statement n endif
where <boolean expression> is:
TRUE
FALSE
<boolean expression> AND <boolean expression>
<boolean expression> OR <boolean expression>
<bound data name> OPERATION <numeric term>
ISINSTATE (workflow name, state name)
ISNOTINSTATE (workflow name, state name)
where OPERATION is
equal to
not equal to
greater than
greater than or equal to
less than
less than or equal to
An Action Statement is either:
INITIATE workflow name,
ACTIVATE workflow name, or
ACT workflow name, act name
An Assignment Statement is either:
<bound data name> = <bound data name>
or
<bound data name> = <numeric term>
______________________________________
2. Capability The above-described syntax enables a script writer to start workflows, to act in workflows, to change bound data associated with a workflow, to test sound data associated with a workflow and conditional upon the results follow one or another distinctly different course of action. The workflow language interpreter can be divided into the following functional modules: 1. The Lexical Analyzer which defines the Workflow Language grammar. 2. The Parser which parses the workflow scripts and invokes the corresponding semantic routines associated with the commands in the script. The main implementation details are as follows: 1. The workflow event manager calls the workflow language interpreter and passes to it the Business Process Transaction ID, the Workflow Transaction ID, and the Script Type to be executed. 2. Using this information the workflow language interpreter retrieves the appropriate workflow script from the definitions database using method bfnGetScriptName of the class DFWFActState. 3. For the command Instantiate, the instantiator is invoked. 4. For the command Activate, the workflow updater is invoked. 5. For the command TakeAnAct, the workflow updater is invoked. 6. For external functions, the workflow language interpreter invokes the external function passing the specified parameters. Workflow Event Handler The workflow event handler is called by the transaction manager to process the actions associated to acts and states in the workflow definition which are specified for a given workflow when an action is taken or a state reached in the workflow. It accomplishes this my reading the business process definition and by reading the workflow status information of the workflow transaction. The workflow event handler also locks in the definitions database for the workflow language scripts associated with acts and states of the workflow. The workflow event handler retrieves the language script corresponding to the act that was taken and passes the script to the workflow language interpreter for processing. The workflow event handler retrieves the language script corresponding to the state of the workflow and passes the script to the workflow language interpreter for processing. Then the workflow event handler retrieves the appropriate scripts associated with the states of the connecting workflows and passes the to the workflow language interpreter. Finally the workflow event handler retrieves the language script for the primary workflow of the business process for the current state of that workflow and passes that script to the workflow language interpreter for processing. The following is a description of the steps for implementing the workflow event handler module. The workflow event handler invokes the method AWSScriptToExecute of the workflow language interpreter to execute the following scripts associated with a workflow: 1. The system generated act script 2. The user generated act script 3. The system generated state script 4. The user generated state script 5. The system generated state script of all the connected workflows 6. The user generated state script of all the connected workflows 7. The system generated state script of the primary workflow 8. The user generated state script of the primary workflow To implement steps 7 and 8, the method bfnIsCentralWF of class obTxWFINSTANCE is used to determine the Current WF is the primary workflow. Method obWFInstance is used to obtain the primary workflow. Agent Actions Manager The agent actions manager module executes the commands specified in a script. These include Initiate, Act, Follow-up as well as external functions. In this form the agent action manager is taking workflow acts by an "agent" on behalf of some role in the workflow. The commands that the "agents" execute are specified through the workflow language. The following is a description of the steps for implementing the agent actions manager module. The agent actions manager is invoked by the workflow language interpreter when it finds a workflow action or external function to be performed in a workflow language script. If the workflow needs to be instantiated the instantiation is done by the workflow instantiator module. After instantiation a flag is set to indicate if activation or initiation is required. The agent action manager scans for all workflows which have this flag set and processes them. The process is described below. 1. Log the activity using the method AWSWriteToLog. 2. Obtain the current date and time. 3. Get the next workflow to act on by using method TxWINSTANCE of class TXWFINSTANCE, which is the act to take queue. 4. If the workflow to be processed is the primary workflow then change the Business Process status to "IN.sub.-- PROGRESS". The methods to use are bfnIsCentralWF and bFnSetBPStatus. 5. If the Customer, Performer and Observer(s) are not specified, then pick up defaults and assign all the workflow participants. The methods to use are lfnGetCustId, lfnGetPerfId, lfnPutCustId and lfnPutPerId. 6. Specify the default Reply and Completion time using methods lfnGetReplayDate and lfnGetCompletionTime of class TxWFINSTANCE. If these times not present, obtain them through the definition defaults by using methods bfnGetCycleTimes of class DFWFCYCLETIMES in the VDB. Assign the default using the methods bfnPutReplyDate and bfpPutCompletionTime of class TxWFINSTANCE. 7. Set up environment for first act to be taken. The act is dependent on the workflow type, request act in a workflow of type request and offer act in a workflow of type offer. 8. Make an entry in the Available Acts Table using method bfnPutAct of the class obAvlActs. 9. Take the first act if the workflow is to be Initiated. The act to be taken is placed in the act to process queue using method obTxWFacts of class TXWDACTS. Log the message using AWSLogMessage. 10. The flag is reset to indicate that the processing is complete using method bfnResetInstantiate of class obTxWFINSTANCE. Methods and Modules invoked by Agent Actions Manager Module
______________________________________
Methods Class Action
______________________________________
lfnGetBPTid TxBPINSTANCE get the BP Transaction Id
lfnGetWFTid TxWFINSTANCE get the WF Transaction Id
bfnSetBPStatus
TxBPINSTANCE set the status of BP
instance
lfnGetPerfId get the performer Id
lfnGetCustId
TxWFNSTANCE get the customer Id
lfnGetCompletionTime
TxWFNSTANCE get cycle time of the WF
TxWFActs queue the act to be taken
______________________________________
STF Router/Enqueuer The STF Router/Enqueuer module is called by the workflow updater to determine if the workflow currently being processed has a participant who must be notified in this workflow via an STF Processor. The router queues such transactions in the STF queue database for the appropriate STF processor to process. The following is a description of the steps for implementing the STF router/enqueuer module. 1. The STF router/enqueuer first retrieves the BP and WF definition given the current WF transaction instance by using the methods TXBPINSTANCE and obTxWFINSTANCE of classes TXBPINSTANCE and TXWFINSTANCE. 2. Using the BP and WF Ids, the follow-up definition is retrieved from the definitions database using method DFWFollowUp of class DFWFFOLLUP. If no notification required, just return. 3. Get the notification status by using method NRDfIdentity of class NRDFIDENTITY. If there is no need to do notification, just return. This is achieved through the method bfnGetNotify of class NRDfIdentity in the VDB. 4. Get the STFProcId using method lfnGetSTFProcId of class NRDfIdentity. 5. Write the Notification event in the STF queue database using method bfnPutEvent of class TxSTFQUEUE. The date and time is computed. Databases Virtual Database The present invention utilizes a Virtual Database for implementing the databases used by the system. The Virtual Database (VDB) is designed to be a collection of classes and methods. "Virtual" because it is DBMS independent. The VDB contains all the necessary storage structures to support the operations of the Workflow Server. More importantly, it defines a collection of methods for the manipulation of these structures and their instances. The basic domain as well as the classes for workflow definitions, transactions, schedules, names and routing, STF queue and server administration and configuration are described below. These classes define the attributes and methods for the data manipulation supporting the Workflow Server. Basic Domain Classes The basic domain classes used in the server are listed here in alphabetic order. act
______________________________________
act = { request, offer, decline-request, agree, declare-
complete, declare-satisfaction, cancel, revoke, accept-
offer, decline-offer, counter-offer, accept-counter-
offer, decline-counter-offer, counter-with-request,
declare-dissatisfaction, question, answer, inform, open-
speculation, continue-speculation, revise-offer, revise-
request, follow-up, note, comment, initiate, activate,
cancel-new-request, revoke-new-promise, revoke-new-offer,
commit-to-commit, interim-report, delegate, accept-
delegation, decline-delegation, cancel-delegation,
declare-complete-delegation, declare-satisfaction-
delegation, revoke-delegation, start-with-promise,
accept-starting-promise, decline-starting-promise }
______________________________________
bpstatus bpstatus={inprogress, completed, aborted, suspended} configuration configuration={option1, option2, . . . } datetime Time is a built-in domain in the Virtual Database. Its counter part in the underlying DBMS will provide the actual implementation. datetimeoffset Datetimeoffset is a unit of time. Its value can range from seconds, days, weeks, and months, but is expressed in seconds. incompletion The various incompletions that need to be managed for the Customer and Performer in terms of Completions and Responses. incompletion={CMC, CMR, CHC, CHR, PMC, PMR, PHC, PHR} 1st letter--C for Customer, P for Performer 2nd letter--M for My, H for His 3rd letter--C for Completion, R for Response notification This domain class specifies the events which require notification. notification={PerformerResponsePastDue, PerformerCompletionPastDue, PerformerCompletionComingDue, CustomerReponsePastDue, Act} objecttype objecttype={BP, WF, STFProcessor} privileges privileges={create, delete, modify, activate, schedule, assign privileges} state
______________________________________
state = { request/offer, inactive, initial(after activation)
agreement, completion, satisfaction, counter, decline, cancel
revoke }
______________________________________
string String is defined to be a character string which varying length. txstatus Status of the a transaction. txstatus={pending, inprogress, complete} txtype List of various types of transactions processed by the server.
______________________________________
txtype = { initbp, initwf, actinwf, bindappdata, getbounddata,
getbounddatafieldattributes, status, availableacts, querywf,
availablebp, acthistory, notificationstring }
______________________________________
wfrole wfrole={customer, performer, observer } wftype wftype={request, offer, note} Definitions Database DFBP This class contains the Business Process (BP) definitions which includes information such as the BP Name, the BP Version, The person (ID) who created the BP, The date when this information was last modified, The Server ID which is the Home Server of this BP and the natre of the file which contains the mapping of this BP.
______________________________________
Attributes :
IDEN lBPDid
CHAR szBPName [BPNAME.sub.-- LEN]
INT iVersion
IDEN lBPAdmin
LONG lLastModDate
IDEN lHomeServerId
CHAR szBPmap [BLOBNAME.sub.-- LEN]
______________________________________
Methods :
DFBP The Constructor of this Class:
Depending on its first
parameter it returns the first
record from the table which
matches the predicate, or
creates a new Business Process
in the Table with the given
parameters, or creates a new
version of an existing
Business Process with the
given parameters
BOOL bfnDelete Deletes the record whose
parameters matches the DFBP
class attributes
IDEN lfnGetBPDid Returns the BPDid of the BP in
context to the Class
attributes
INT ifnGetversion
Returns the BP Version of the
BP in context to the Class
attributes
IDEN lfnGetLastModDate
Returns the Date when the BP
Definition was last modified
in context to the Class
attributes
BOOL bfnPutBPMap Creates/Appends to the Map
file of the BP, the data in
memory.
BOOL bfnGetBPMap Retrieves the specified number
of bytes from the Map file.
BOOL bfnNumListBP
Returns the Number of BPs for
which there exists a
Transaction in the Tx Database
BOOL bfnListBP Returns the List of BPs for
which there exists a
Transaction in the Tx Database
BOOL bfnListDFBP Returns the list of all BPs
defined in the Definitions
Database.
VOID vfnGetBPName
Returns the BP Name of the BP
in context to the Class
attributes
______________________________________
DFWF This class contains the Workflow definitions which include information such as the a Name, the WFDid, the BPDid to which this workflow belongs, the type of workflow (primary or non primary), the default IDs of the customer and performer for this WF, the Repeat IF adn factor in case of repetitive WFs, the form names and the Conditions of satisfaction
______________________________________
Attributes :
IDEN lBPDid
IDEN lWFDid
BOOL bCentralWFFlag
CHAR szWFName[WFNAME.sub.-- LEN]
WFTYPE WFType
IDEN lCusOrgRole
IDEN lPerOrgRole
INT iRepeatFieldId
INT iRepeatFieldFactor
CHAR szCustFormName[FORMNAME.sub.-- LEN]
CHAR szPerFormName[FORMNAME.sub.-- LEN]
CHAR szObsFormName[FORMNAME.sub.-- LEN]
CHAR szInitFormName[FORMNAME.sub.-- LEN]
CHAR szCOS[COS.sub.-- LEN]
______________________________________
Methods :
DFWF Constructor of this class which
depending on its first parameter it
returns the first record from the
table which matches the predicate
or creates a new Workflow
Definition in the Table with the
given parameters
BOOL bfnModify Modifies the Workflow Definition
of an existing workflow (in context
of the Class attributes) in the
Table with the given parameters
BOOL bfnModifyForms
Modifies the form names of an
existing workflow (in context of
the Class attributes) in the Table
with the given form names
BOOL bfnPutCOS Appends/ Creates the conditions of
satisfactions of an existing
workflow (in context of the Class
attributes) in the Table with the
given COS
BOOL bfnGetCOS Retrieves the Conditions of
Satisfaction of an existing
workflow (in context of the Class
attributes)
IDEN lfnGetWFDid Returns the WFDId of an existing
workflow (in context of the Class
attributes)
WFTYPE fnGetWFType
Returns the WF type of an existing
workflow (in context of the Class
attributes)
IDEN lfnGetCustOrgRole
Returns the customer ID of an
existing workflow (in context of
the Class attributes)
IDEN lfnGetPerfOrgRole
Returns the performer ID of an
existing workflow (in context of
the Class attributes)
______________________________________
DFWFOBS This class contains the workflow observer definitions which includes information such as the WFDid, the BPDid to which this workflow belongs, the Observer ID for the WF.
______________________________________
Attributes :
IDEN lBPDid
IDEN lWFDid
IDEN lObserver
______________________________________
Methods :
DFWFOBS The constructor for this
Class, which depending on its
first parameter it: creates a
new Workflow Observer
Definition in the Table with
the given parameters, or
returns the first record from
the table which matches the
predicate
BOOL bfnDelete Deletes the record whose
parameters matches the
DFWFOBS class attributes
BOOL bfnGetWFObsList
Returns the List of Observers
defined for the workflow (in
context of the Class
Attributes)
INT nfnGetWFObsCount
Returns the Number of
Observers defined for the
workflow (in context of the
Class Attributes)
______________________________________
DFBPCONTAINER This class contains the Business Process Container Information (the Container ID for a particular BP).
______________________________________
Attributes :
IDEN lBPDid
IDEN lContainerId
______________________________________
Methods :
DFBPCONTAINER Creates a new Container Definition
for a BP with the given parameters
(in context of the Class
Attributes) It also inserts a
record in another table
(DFCONTAINER) with the Container
ID and the number of fields
IDEN lfnGetContainerId
Returns the Container ID (in
context of the Class Attributes)
______________________________________
DFFIELD This class contains the Container Field Information which includes the Container ID to which the field belongs, the Field ID, the data type of the field, its maximum length, its attributes, and its initial Value.
______________________________________
Attributes :
IDEN lContainerId
IDEN lFieldId
INT iDataType
INT iMaxLen
ATTRIBUTES Attr
CHAR szInitVal[INIT.sub.-- VAL.sub.-- LEN]
______________________________________
Methods :
DFFIELD Creates a new Container field
record with the given
parameters. It also inserts a
record in another table
(DFBDFIELDLIST) with the
BPDid, the Field ID and the
field name.
______________________________________
DFLINK This class contains the Workflow Link Information which includes the BPDid to which this LINK belongs, the ID of the workflow from which the LINK starts, whether the link starts from an act or from a state, the act/state IDs from which the Link starts and at which link ends, and the Destination State ID.
______________________________________
Attributes :
IDEN lBPDid
IDEN lFromWFid
BOOL bFromActOrState
IDEN lFromActOrStateId
IDEN lToWFid
BOOL bToActOrState
STATE ToState
______________________________________
Methods :
DFLINK The Constructor for this
Class that creates a new
Link record with the
given parameters. Using
WFName WFID is first got
from DFWF
BOOL bfnGetWFLinks
Returns all the links to
a given WFID
______________________________________
DFBPASSIGN This class contains all the Identity to Organization role mappings at the Business process level.
______________________________________
Attributes :
IDEN lBPDid
IDEN lIdentityId
IDEN lOrgRole
______________________________________
Methods :
DFBPASSIGN The constructor of this
class that depending on
its first parameters
creates a new BP
assignment in a given
BPDid with the given
parameters or returns the
first record from the
table which matches the
predicate
IDEN lfnGetIdentity
Returns the Identity ID
(in context of the Class
attributes)
______________________________________
DFWFASSIGN This class contains all the Identity to Organization role mappings at the Workflow level.
______________________________________
Attributes :
IDEN lBPDid
IDEN lWFDid
IDEN lIdentityId
IDEN lOrgRole
WFROLE WFRole
______________________________________
Methods :
DFWFASSIGN The constructor of this
class that depending on
its first parameter it
creates a new workflow
assigninent in a given
WFDid and BPDid with the
given parameters or
returns the first record
from the table which
matches the predicate
IDEN lfnGetIdentity
Returns the Identity ID
(in context of the Class
attributes)
______________________________________
DFBPNOTIFICATION This class contains all notification string information at BP Level.
______________________________________
Attributes :
IDEN lBPDid
NOTIFICATION NEvent
CHAR szNstring[NSTRING.sub.-- LEN]
______________________________________
Methods :
DFBPNOTIFICATION This is the constructor for
this class that creates a
new BP notification for a
given BPDid
BOOL bfnGetEventString
Returns the BP notification
string of an event in a BP
______________________________________
DFWFNOTIFICATION This class contains all notification string information at workflow level
______________________________________
Attributes :
IDEN lBPDid
IDEN lWFDid
NOTIFICATION NEvent
CHAR szNstring[NSTRING.sub.-- LEN]
______________________________________
Methods :
DFWFNOTIFICATION This is the constructor
for this class that
creates a new workflow
notification for a given
WFDid and BPDid
BOOL bfnGetEventString
Returns the workflow
notification string of an
event at workflow level.
______________________________________
DFWCYCLETIMES This class contains all the Cycle times defined for a workflow.
______________________________________
Attributes :
IDEN lBPDid
IDEN lWFDid
LONG lTime1
LONG lTime2
LONG lTime3
LONG lTime4
______________________________________
Methods :
DFWFCYCLETIMES This is the constructor
for this class that
creates a new record with
the given cycle times for
a given WFDid and BPDid
BOOL bfnGetCycleTimes
Returns the cycle times
(in context of the Class
Attributes)
DFWFCYCLETIMES Returns the first record
from the table which
matches the predicate
IDEN lfnGetWFDid Returns the WFDid (in
context of the Class
Attributes)
______________________________________
DFWFDISABLEDACTS This Class contains information of all the Disabled Acts.
______________________________________
Attributes :
IDEN lBPDid
IDEN lWFDid
WFROLE WFRole
ACT ActId
______________________________________
Methods :
DFWFDISABLEDACTS This is the constructor
for this class that
creates a new record
with the given WFrole
and ActId for a given
WFDid and BPDid
BOOL bfnIsDisabled Returns whether a
particular Act for a
particular WFRole in a
given workflow is
disabled or not.
______________________________________
DFWFACTSTATE This contains all the definitions of the workflow acts and States (their names and IDs) for all business processes and their workflows.
______________________________________
Attributes :
IDEN lBPDid
IDEN lWFDid
BOOL bActOrState
INT ActOrState
CHAR szUserDefName[USERDEF.sub.-- STRING.sub.-- LEN]
CHAR szGenScript[BLOBNAME.sub.-- LEN]
CHAR szUserScript[BLOBNAME.sub.-- LEN]
______________________________________
Private Methods :
BOOL bfnIsAvail Returns whether an Act/
state is Available for a
given Workflow.
BOOL bfnGetScriptName
Returns the Script Name
given the BP and WF DIds
the Act/State and the
type of script (User
Defined or System
Generated) required.
______________________________________
Methods :
DFWFACTSTATE This is the Constructor
for this Class that
creates a new record with
the given Act/State , and
user defined name for a
given WFDid and BPDid
BOOL bfnPutScript Inserts the given Script
into a blob file
DFWFACTSTATE Returns the first record
from the table which
matches the predicate
BOOL bfnGetWFScript
Returns the required data
from the script file (In
context of the Class
Attributes) given the
Script Type
______________________________________
DFWFCONTAINER This class contains the Workflow Container Information (the Container ID for a particular workflow in a given BP).
______________________________________
Attributes :
IDEN lBPDid
IDEN lWFDid
IDEN lContainerId
______________________________________
Methods :
DFWFCONTAINER Creates a new Container
Definition for a workflow with
the given parameters (in
context of the Class
Attributes)
IDEN lfnGetContainerId
Returns the Container ID (in
context of the Class
Attributes)
______________________________________
DFWFACTSTATEBDREF This Class contains the workflow Act/State Bound Data reference information.
______________________________________
Attributes :
IDEN lBPDid
IDEN lWFDid
BOOL bActOrState
INT ActOrStateId
WFROLE WFRole
IDEN lContainerId
______________________________________
Methods :
DFWFACTSTATEBDREF The Constructor for this
Class that inserts a
record with the with the
given parameters
IDEN lfnGetContainerId
Returns the Container ID
(in context of the Class
Attributes)
BOOL bfnGetFieldAttrList
Returns the list of
Field Attributes for the
given conditions
(parameter values)
BOOL bfnGetNumFieldAttrList
Returns the number of
Field Attributes for the
given conditions
(parameter values)
______________________________________
DFWFFOLLOWUP This class contains all the Follow-up information of a workflow.
______________________________________
Attributes :
IDEN lBPDid
IDEN lWFDid
BOOL bPRFUFlag
BOOL bPRFURecur
LONG lPRFUOffset
INT iPRFUCount
BOOL bPCFUFlag
BOOL bPCFURecur
LONG lPCFUOffset
INT iPCFUCount
BOOL bCRFUFlag
BOOL bCRFURecur
LONG lCRFUOffset
INT ICRFUCount
BOOL bPCRemFlag
LONG lPCRemOffset
BOOL bActNotifyFlag
______________________________________
Methods :
DFWFFOLLOWUP The constructor of this class
that depending on its first
parameter inserts a record in
the FollowUp Table with the
Given parameters or returns
the first record from the
table which matches the
predicate
BOOL bfnGetPerfRespInfo
Returns the Performer
Response Information (in
context of the Class
Attributes)
BOOL bfnGetPerfCompInfo
Returns the performer
Completion Information (in
context of the Class
Attributes)
BOOL bfnGetCustRespInfo
Returns the Customer Response
Information (in context of
the Class Attributes)
BOOL bfnGetPerfRemInfo
Returns the Performer
Reminder Information (in
context of the Class
Attributes)
BOOL bfnGetActNotifyFlag
Returns the Notify flag (in
context of the Class
Attributes)
______________________________________
DFBDFIELDLIST
______________________________________
Attributes :
IDEN lBPDid
char szFieldName[FIELDNAME.sub.-- LEN]
IDEN lFieldId
______________________________________
Methods No Methods Transactions Database TXBPINSTANCE This Class contains information of all instances of Business Process Transactions. This information consists of the Transaction ID of the Business Process (BPTid), the Business Process definition ID (BPDid), the BP Status and whether the BP Instance is active or not.
______________________________________
Attributes :
IDEN lBPTid
IDEN lBPDid
BOOL bIsActive
BPSTATUS BPStatus
______________________________________
Methods :
TXBPINSTANCE The Constructor for this Class that
returns the first record from the
table which matches the predicate
CreateInstance Creates an instance of the given BP
in the Transactions Database table
(TXBPINSTANCE) bIsActive will still
be FALSE
BOOL bfnActivate
Changes the Status (bIsActive) of
the current BP (In context to the
Class Attributes) from FALSE to TRUE
BOOL bfnSetBpStatus
Sets the BPStatus to the given
status ID(In context to the Class
Attributes)
IDEN lfnGetBpDid
Returns the BPDid of the Business
Process Instance (In context to the
Class Attributes)
IDEN lfnGetBpTid
Returns the BPTid of the Business
Process Instance (In context to the
Class Attributes)
BOOL bfnNumListBP
Returns the number of BPs that have
been Instantiated
BOOL bfnListBP Returns a list of all BPs that have
been Instantiated to memory or to
the file specified
BOOL bfnDelete Deletes the BP transaction
(specified by the class attributes)
from the table.
BOOL bfnAbort Sets the BPStatus to ABORT (In
context to the Class Attributes)
(Further Actions are yet to be
defined)
BOOL bfnSuspend Sets the BPStatus to SUSPEND (In
context to the Class Attributes)
(Further Actions are yet to be
defined)
BOOL bfnNumListQueryQF
Returns the number of BP Instances
(instantiated between the specified
start date and the end dates)for the
given Identity, having the specified
Organization Role, (If bPending is
TRUE then only those BPs are
included where Acts are pending)
BOOL bfnListQueryWF
Returns a list of all BP Instances
(instantiated between the specified
start date and the end dates)for the
given Identity, having the specified
Organization Role, (If bPending is
TRUE then only those BPs are
included where Acts are pending)
______________________________________
TXBPASSIGN This class contains all the Identity to Organization role mappings at the BP level for BP Transaction. These mappings if present override the corresponding DFBPASSIGN mapping for a given BPDid for that particular instance of the BP (BPTid).
______________________________________
Attributes :
IDEN lBPTid
IDEN lOrgRole
IDEN lIdentityId
______________________________________
Methods :
TXBPASSIGN The constructor of this
class that depending on
its first parameter
creates a new BP
assignment in a given
BPTid with the given
parameters or returns the
first record from the
table which matches the
predicate
IDEN lfnGetIdentity
Returns the Identity ID
(in context of the Class
attributes)
______________________________________
TXWFINSTANCE This Class contains information of all instantiated Workflows. This information consists of the Transaction ITDs of the Workflow (WFTid) and the Business Process (BPTid) to which it belongs, whether it is a Primary workflow or not, the Workflow definition ID (WFDid), the reply, completion and initiate date, the present State, the Customer and Performer for this workflow Instance, the conditions of satisfaction for this workflow and whether this workflow instance has been instantiated or not
______________________________________
Attributes:
______________________________________
IDEN lBPTid
IDEN lWFTid
BOOL bCentralWFFlag
IDEN lWFDid
DATETIMET lReplyDate
DATETIMET lCompletionTime
DATETIMET lInitiateTime
STATE StateId
IDEN lCustId
IDEN lPerfId
BOOL bCOSFlag
CHAR szCondOfSatisfn[BLOBNAME.sub.-- LEN]
BOOL bInstantiate
______________________________________
Methods:
______________________________________
TXWFINSTANCE The Constructor for this
Class that returns the first
record from the table which
matches the predicate
BOOL Creates an Instance of the
bfnInstantiateCentralWF
Primary workflow of a BP
Instance, given the BPDid and
BPTid with the given
parameters. For the given
BPDid, the workflow with CWF
Flag TRUE is fetched from the
DFWF table to create this CWF
instance. A new WFTid for
this workflow Instance is
returned
BOOL bfnCreateInstance
Creates an Instance of the
non Primary workflow of a BP
Instance, given the BPDid and
BPTid with the given
parameters. A new WFTid for
this workflow Instance is
returned
BOOL bfnSetState
Sets the STATE of the given
workflow Instance to the
state specified.
BOOL bfnGetInstantiate
Returns the Status of the
Instantiate flag for the
given workflow Instance (In
context of the Class
Attributes). This indicates
if the specified workflow
instance has been
instantiated or not.
BOOL bfnModify Modifies the specified
parameters in the WFInstance
(In context of the Class
Attributes) and returns the
WFTid
IDEN lfnGetCustId
Returns the Customer ID for
the given workflow Instance
(In context of the Class
Attributes)
IDEN lfnGetPerfId
Returns the Performer ID for
the given workflow Instance
(In context of the Class
Attributes)
BOOL bfnGetStateName
Returns the User Defined
State Name corresponding to
the current state of the
workflow Instance. (In context
of the Class Attributes).
BOOL bfnGetFormName
Returns the form name
(corresponding to the WFRole)
of the workflow Instance. (In
context of the Class
Attributes)
BOOL bfnIsCentralWF
Returns TRUE if the current
WF is a primary WF
IDEN lfnGetBPTid
Returns the BPTid for the
given workflow Instance (In
context of the Class
Attributes)
IDEN lfnGetWFTid
Returns the WFTid for the
given workflow Instance (In
context of the Class
Attributes)
BOOL Sets the Instantiate Flag to
bfnResetInstantiate
FALSE
IDEN lfnGetWFDid
Returns the WFDid for the
given workflow Instance (In
context of the Class
Attributes)
STATE ifnGetState
Returns the current State of
the given workflow Instance
(In context of the Class
Attributes.
BOOL bfnGetPending
Return whether or not an act
is pending for this Workflow
Instance
BOOL bfnPutCOS Creates/Appends to the Blob
file of the workflow
Instance, the COS data in
memory
BOOL bfnGetCOS If the COSFlag is TRUE it
retrieves the specified
number of bytes from the Blob
file of this workflow
Instance containing the
Conditions of Satisfaction
else the COS is retrieved
from the workflow Definitions
table
BOOL bfnPutCustId
Modifies the Customer ID for
this WF Instance to the given
ID(in context of the Class
attributes)
BOOL bfnPutPerfId
Modifies the Performer ID for
this WF Instance to the given
ID(in context of the Class
attributes)
LONG lfnGetReplyDate
Returns the Reply date for
this workflow Instance(in
context of the Class
attributes)
LONG lfnGetCompletionTime
Returns the Completion date
for this workflow Instance(in
context of the Class
attributes)
BOOL bfnPutReplyDate
Modifies the Reply date for
this WF Instance to the given
date(in context of the Class
attributes)
BOOL bfnPutCompletionTime
Modifies the Completion date
for this WF Instance to the
given date(in context of the
Class attributes)
BOOL bfnGetCOSFlag
Returns the COS Flag for this
workflow Instance(in context
of the Class attributes)
BOOL bfnPutCOSFlag
Modifies the COS Flag for
this WF Instance to the given
value(in context of the Class
attributes)
______________________________________
TXWFOBS This class contains the Workflow Observer Transactions information which includes information such as the WFTid, the BP Instance (BPTid) to which this workflow belongs, and the Observer ID for the workflow instance.
______________________________________
Attributes :
private:
IDEN lBPTid
IDEN lWFTid
IDEN lObserver
______________________________________
Methods :
TXWFOBS The constructor of this class
that depending on its first
parameter it c | ||||||
