home *** CD-ROM | disk | FTP | other *** search
- NAME
- WflProAdd - Add a workflow profile to a workflow process
-
- SYNOPSIS
-
- #include <wfl.h>
-
- SHORT APIENTRY
- WflProAdd(ppstProfile,pstWorkFlow)
- LLIST_PP ppstProfile;
- WORK_FLOW_P pstWorkFlow;
-
- DESCRIPTION
-
- Workflow profile ppstProfile is created based on the supplied workflow
- definition in pstWorkFlow. A workflow process may define multiple
- profiles. Each profile is a description of the types of jobs in
- the workflow system the workflow process is to process.
-
- Each workflow profile is based on the workflow structure:
-
- struct WORK_FLOW_S
- {
- CHAR szKey[WFL_KEY_LEN + 1]; /* Key = ID of process */
- SHORT sTrnState[10]; /* States themselves */
- SHORT sTrnStates; /* How many states are used */
- };
-
-
- Variable szKey is the workflow identifier for the process.
- The sTrnState array are the workflow transition states.
- The transition states are used by the workflow processes to
- coordinate the flow of work through the system.
-
- A process interacting with workflow will use the select state
- of one or more of its profiles and attempt to find a job
- in the system with that same state. The selection state is the
- first state in the transition state array.
-
- Once a process has found a job to work on, it will change the jobs
- state to the processes activation state. This will prevent other
- processes from working on the same job at the same time. The
- activation state is the second state in the transition array.
-
- When a process has completed a job, it will change the jobs
- state to another transition state. A successful completion of
- processing is given to the job by using the third state in
- the transition array. Any error conditions are represented
- starting with the fourth [3] array position.
-
- Each workflow profile maintains a distinct definition of transition
- state for a given process. Since a process can have multiple
- profiles, only one profile must be used for a particular job to
- avoid setting inappropriate transition states.
-
-
- RESOURCE NAME
-
- WFL.LIB
-
- DIAGNOSTICS
-
- C_OK = profile added
- !C_OK = error
-
-
- NAME
- WflJobAdd - adds a new job to the workflow system
-
- SYNOPSIS
-
- #include <wfl.h>
-
- SHORT APIENTRY
- WflJobAdd(ppstWorkTree,pstWorkItem)
- TNODE_PP ppstWorkTree;
- WORK_ITEM_P pstWorkItem;
-
- DESCRIPTION
-
- Work item (job) pstWorkItem is added to the work tree ppstWorkTree.
- All jobs are grouped in the pool by their state. Each job is
- described by the following work item structure:
-
- struct WORK_ITEM_S
- {
- SHORT sState; /* the state, or queue job is currently at */
- CHAR szId[WFL_KEY_LEN + 1]; /* unique identifier for job */
- CHAR szKey[WFL_KEY_LEN + 1]; /* current or last owners Id */
- BOOL fLocked; /* is currently in use */
- PVOID pvData; /* common data type all processes/owners are using */
- };
-
-
- Each job has a state and a unique identifier for the job. The current
- or last process owners identifier for the job is maintained. The
- job is marked as locked to avoid a condition where two processes
- with the same selection states would attempt to both obtain the job.
- The first process locks the job until the transition state is
- changed to active.
-
- RESOURCE NAME
-
- WFL.LIB
-
- DIAGNOSTICS
-
- C_OK - job added
- !C_OK - error
-
-
-
- NAME
- WflJobSelect - select a job using a processes workflow profile(s)
-
- SYNOPSIS
-
- #include <wfl.h>
-
- SHORT APIENTRY
- WflJobSelect(pstWorkHead,pstWorkList,ppstWorkNdx,ppstWorkItem,ppvData)
- TNODE_P pstWorkHead; /* main set of WORK_ITEM data */
- LLIST_P pstWorkList; /* this process WORK_FLOW list */
- WORK_FLOW_PP ppstWorkNdx; /* this process WORK_FLOW which was selected */
- WORK_ITEM_PP ppstWorkItem; /* this is the work item selected */
- PVOID * ppvData; /* ptr to return data if found */
-
- DESCRIPTION
-
- The list of jobs in pstWorkHead is searched by inspecting the processes
- workflow profiles through pstWorkList. If a matching job is found,
- ppstWorkNdx is initialized to point to the processes workflow profile
- which matched. Variable ppstWorkItem is initialized to point to the
- matching job. Variable ppvData is set to the jobs data area. This
- data area can be defined in any way which is mutually understood by
- all processes affecting the job.
-
- RESOURCE NAME
-
- WFL.LIB
-
- DIAGNOSTICS
-
- C_OK = job found
- !C_OK = job not found or error
- If a job is not found the return code is set to WFL_NO_JOB
-
- NAME
- WflJobTrans - Update a jobs current state based on a processes workflow
- profile.
-
- SYNOPSIS
-
- #include <wfl.h>
-
- SHORT APIENTRY
- WflJobTrans(ppstWorkTree,pstWorkItem,pstWorkFlow,sTrn,fUnlock)
- TNODE_PP ppstWorkTree;
- WORK_ITEM_P pstWorkItem;
- WORK_FLOW_P pstWorkFlow;
- SHORT sTrn;
- BOOL fUnlock;
-
- DESCRIPTION
-
- The list of jobs, ppstWorkTree, is passed in for potential
- modification of the head pointer. The job, pstWorkItem, is
- provided along with the jobs workflow profile as pstWorkFlow.
- The element of the transition state array to set the jobs
- state to is provided in sTrn. A flag indicating whether or
- not to unlock the job is provided in fUnlock.
-
- RESOURCE NAME
-
- WFL.LIB
-
- DIAGNOSTICS
-
- C_OK - update successful
- !C_OK - update failed