home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / diverses / text_cla / wfl.man < prev    next >
Encoding:
Text File  |  1992-05-12  |  6.0 KB  |  181 lines

  1. NAME
  2.         WflProAdd - Add a workflow profile to a workflow process
  3.  
  4. SYNOPSIS
  5.  
  6.         #include <wfl.h>
  7.  
  8.         SHORT APIENTRY
  9.         WflProAdd(ppstProfile,pstWorkFlow)
  10.         LLIST_PP ppstProfile;
  11.         WORK_FLOW_P  pstWorkFlow;
  12.  
  13. DESCRIPTION
  14.  
  15.         Workflow profile ppstProfile is created based on the supplied workflow
  16.         definition in pstWorkFlow.  A workflow process may define multiple 
  17.         profiles.  Each profile is a description of the types of jobs in
  18.         the workflow system the workflow process is to process.
  19.  
  20.         Each workflow profile is based on the workflow structure:
  21.         
  22.         struct WORK_FLOW_S
  23.         {
  24.            CHAR   szKey[WFL_KEY_LEN + 1];   /* Key = ID of process */
  25.            SHORT  sTrnState[10];            /* States themselves */
  26.            SHORT  sTrnStates;               /* How many states are used */
  27.         };
  28.  
  29.         
  30.         Variable szKey is the workflow identifier for the process.
  31.         The sTrnState array are the workflow transition states.
  32.         The transition states are used by the workflow processes to
  33.         coordinate the flow of work through the system.
  34.  
  35.         A process interacting with workflow will use the select state
  36.         of one or more of its profiles and attempt to find a job
  37.         in the system with that same state.  The selection state is the
  38.         first state in the transition state array.
  39.  
  40.         Once a process has found a job to work on, it will change the jobs
  41.         state to the processes activation state.  This will prevent other
  42.         processes from working on the same job at the same time.  The
  43.         activation state is the second state in the transition array.
  44.  
  45.         When a process has completed a job, it will change the jobs
  46.         state to another transition state.  A successful completion of 
  47.         processing is given to the job by using the third state in
  48.         the transition array.   Any error conditions are represented
  49.         starting with the fourth [3] array position.
  50.          
  51.         Each workflow profile maintains a distinct definition of transition
  52.         state for a given process.  Since a process can have multiple
  53.         profiles, only one profile must be used for a particular job to
  54.         avoid setting inappropriate transition states.
  55.  
  56.  
  57. RESOURCE NAME
  58.  
  59.         WFL.LIB
  60.  
  61. DIAGNOSTICS
  62.  
  63.         C_OK    = profile added
  64.         !C_OK   = error
  65.  
  66.  
  67. NAME
  68.         WflJobAdd - adds a new job to the workflow system
  69.  
  70. SYNOPSIS
  71.  
  72.         #include <wfl.h>
  73.  
  74.         SHORT APIENTRY
  75.         WflJobAdd(ppstWorkTree,pstWorkItem)
  76.         TNODE_PP ppstWorkTree;
  77.         WORK_ITEM_P pstWorkItem;
  78.  
  79. DESCRIPTION
  80.  
  81.         Work item (job) pstWorkItem is added to the work tree ppstWorkTree.
  82.         All jobs are grouped in the pool by their state.  Each job is
  83.         described by the following work item structure: 
  84.  
  85.         struct WORK_ITEM_S
  86.         {
  87.            SHORT  sState;   /* the state, or queue job is currently at */
  88.            CHAR   szId[WFL_KEY_LEN + 1];  /* unique identifier for job */
  89.            CHAR   szKey[WFL_KEY_LEN + 1];  /* current or last owners Id */
  90.            BOOL   fLocked;  /* is currently in use */
  91.            PVOID  pvData;   /* common data type all processes/owners are using */
  92.         };
  93.  
  94.  
  95.         Each job has a state and a unique identifier for the job.  The current
  96.         or last process owners identifier for the job is maintained.  The
  97.         job is marked as locked to avoid a condition where two processes
  98.         with the same selection states would attempt to both obtain the job.
  99.         The first process locks the job until the transition state is
  100.         changed to active.
  101.       
  102. RESOURCE NAME
  103.  
  104.         WFL.LIB
  105.  
  106. DIAGNOSTICS
  107.  
  108.         C_OK    - job added
  109.         !C_OK   - error
  110.         
  111.  
  112.  
  113. NAME
  114.         WflJobSelect - select a job using a processes workflow profile(s)
  115.  
  116. SYNOPSIS
  117.  
  118.         #include <wfl.h>
  119.  
  120.         SHORT APIENTRY
  121.         WflJobSelect(pstWorkHead,pstWorkList,ppstWorkNdx,ppstWorkItem,ppvData)
  122.         TNODE_P  pstWorkHead;      /* main set of WORK_ITEM data */
  123.         LLIST_P  pstWorkList;     /* this process WORK_FLOW list */
  124.         WORK_FLOW_PP ppstWorkNdx;  /* this process WORK_FLOW which was selected */
  125.         WORK_ITEM_PP ppstWorkItem;  /* this is the work item selected */
  126.         PVOID   * ppvData;        /* ptr to return data if found */
  127.  
  128. DESCRIPTION
  129.  
  130.         The list of jobs in pstWorkHead is searched by inspecting the processes
  131.         workflow profiles through pstWorkList.   If a matching job is found,
  132.         ppstWorkNdx is initialized to point to the processes workflow profile
  133.         which matched.  Variable ppstWorkItem is initialized to point to the
  134.         matching job.  Variable ppvData is set to the jobs data area.  This
  135.         data area can be defined in any way which is mutually understood by
  136.         all processes affecting the job.
  137.       
  138. RESOURCE NAME
  139.  
  140.         WFL.LIB
  141.  
  142. DIAGNOSTICS
  143.  
  144.         C_OK    = job found
  145.         !C_OK   = job not found or error
  146.                   If a job is not found the return code is set to WFL_NO_JOB
  147.  
  148. NAME
  149.         WflJobTrans - Update a jobs current state based on a processes workflow
  150.                       profile.
  151.  
  152. SYNOPSIS
  153.  
  154.         #include <wfl.h>
  155.  
  156.         SHORT APIENTRY
  157.         WflJobTrans(ppstWorkTree,pstWorkItem,pstWorkFlow,sTrn,fUnlock)
  158.         TNODE_PP ppstWorkTree;
  159.         WORK_ITEM_P pstWorkItem;
  160.         WORK_FLOW_P pstWorkFlow;
  161.         SHORT  sTrn;
  162.         BOOL   fUnlock;
  163.  
  164. DESCRIPTION
  165.  
  166.         The list of jobs, ppstWorkTree, is passed in for potential
  167.         modification of the head pointer.  The job, pstWorkItem, is
  168.         provided along with the jobs workflow profile as pstWorkFlow.
  169.         The element of the transition state array to set the jobs
  170.         state to is provided in sTrn.   A flag indicating whether or
  171.         not to unlock the job is provided in fUnlock.
  172.         
  173. RESOURCE NAME
  174.  
  175.         WFL.LIB
  176.  
  177. DIAGNOSTICS
  178.  
  179.         C_OK    - update successful
  180.         !C_OK   - update failed 
  181.