Embodiment
Pass through to generate when file system drives the file in the change hot folder modification information in the embodiment of the invention; Extract the file of change again according to modification information; Generate operation subpoena (a kind of file, or claim that the worker is single or transfer single) according to the file of change then and submit to, thereby no longer need many times scanning calorimeter files; Avoid the long or too short problem of trace interval, and saved resource.
Referring to Fig. 1, the main method flow process of submit job is following in the present embodiment:
Step 101: file system driving module drives the file in the change hot folder through file system, and generates modification information, and modification information is sent to the hot folder monitor module.Alter operation mainly refers to newly-built and revises.
Step 102: the hot folder monitor module extracts the file of change from hot folder according to modification information.Extraction document is specially read operation in the present embodiment, promptly duplicates the file of change.Certainly, also can be the file of shearing change.
Step 103: the flow services operation submits to module to generate the operation subpoena according to file that extracts and preset job parameter, and submits to.
Referring to Fig. 2, the detailed method flow process of submit job is following in the present embodiment:
Step 201: drive the file in the change hot folder through file system, and generate modification information.Modification information comprises file name and file path, and file path can be a fullpath, also can be the path (title that comprises the last layer hot folder) with respect to the last layer hot folder.Modification information can also comprise alter operation and change time etc.
Step 202: judge whether to generate the altering event that comprises modification information according to modification information, if then continue step 203, otherwise finish this flow process.Mainly be to judge in this step according to preset judgment rule and the alter operation in the modification information.Alter operation comprises: newly-built, deletion and revised file, revised file title, revised file attribute etc.Preset judgment rule has multiple, as need generate altering event when stipulating newly-built, deletion and revised file, need not generate altering event when revised file title and revised file attribute.
Step 203: generate the altering event HtEvent that comprises modification information.
Step 204:, from hot folder, extract the file HtChangeContent of change according to modification information through the triggering of altering event.
Step 205: generate the operation subpoena according to file that extracts and preset job parameter, and submit to.Job parameter comprises configuration parameter required in sign and the subsequent processes of operation subpoena etc., like media size, PDF parameter, image compression format, image resolution ratio, antiquarian, zooming parameter, rasterisation parameter, output device parameter, printing ink parameter, flag parameters etc.
The submit job subpoena is to start the work process flow instance.After starting the work process flow instance, can the file that extract be standardized, layout, extension net and output.
In the present embodiment, the judgement in also can carry out step 202 no matter be which kind of alter operation, all generates altering event, promptly continues step 203.Carrying out step 202 is for fear of repetitive operation, as only being to have revised file name, then typographical printing is not had the change of essence, possibly cause the repetition operation.
Also can be before step 203, carry out determining step 202, but after step 203, carry out determining step, referring to flow process shown in Figure 3:
Step 301: drive the file in the change hot folder through file system, and generate modification information.
Step 302: generate the altering event that comprises modification information.
Step 303:, judge whether that according to alter operation needs extract the file of change, if then continue step 304, otherwise finish this flow process through the triggering of altering event.Preset judgment rule MRule has multiple, as stipulates newly-builtly need generate altering event during with revised file, and other alter operation all need not generate altering event.
Step 304: the file that from hot folder, extracts change according to modification information.
Step 305: generate the operation subpoena according to file that extracts and preset job parameter, and submit to.
Can also Fig. 2 and flow process shown in Figure 3 be combined, promptly before generating altering event, do rough filtration, need generate altering event when, deletion newly-built like the judgment rule regulation and revised file, other alter operation all need not generate altering event.After generating altering event, do further filtration, need generate altering event when stipulating newly-built and revised file like judgment rule, other alter operation all need not generate altering event.After generating altering event, judge if desired, then need alter operation be carried in the altering event, otherwise can not carry alter operation.
More than be the description that the realization flow of submit job is done, this flow process can be realized by device, introduces in the face of the function and the inner structure of this device down.
Referring to Fig. 4, the device that is used for submit job in the present embodiment comprises: module 403 is submitted in file system driving module 401, hot folder monitor module 402 and flow services operation to.
File system driving module 401 is used for driving through file system the file of change hot folder, and generates modification information, sends to hot folder monitor module 402.Modification information comprises title, path, alter operation and the change time etc. of change file, and is as shown in table 1:
Table 1
The title of file |
Fullpath |
Alter operation |
The change time |
Other |
|
|
|
|
|
File system driving module 401 can be sent complete modification information to hot folder monitor module 402.But in order to save transfer resource, file system driving module 401 is to hot folder monitor module 402 transmitting section modification informations, and is as shown in table 2:
Table 2
The title of file |
Relative path |
|
|
File system driving module 401 can also be judged network condition; If the Network Transmission bandwidth usage surpasses preset bandwidth threshold, expression network this moment is busier, then transmits modification information as shown in table 2; Otherwise the expression network is relatively more idle, can transmit modification information as shown in table 1.
Hot folder monitor module 402 is used for extracting the file of change according to modification information from hot folder, and sends to flow services operation submission module 403.
The flow services operation submits to module 403 to be used for generating the operation subpoena according to file that extracts and preset job parameter, and submits to.The flow services operation submits to module 403 also to be used to provide operation to submit interface to, and hot folder monitor module 402 submits to interface that the file of change is sent to flow services operation submission module 403 through calling this operation.This operation is submitted to interface also to be used for direct-type and is submitted to, and direct-type way of submission and hot folder way of submission can be shared same interface and same flow services operation submission module 403 like this, have saved resource.Flow services operation submission module 403 can (Component Object Model, COM) assembly be formed by The Component Object Model in the present embodiment.
File system driving module 401 also is used to generate the altering event that comprises modification information.The hot folder monitor module extracts the file of change through the triggering of altering event from hot folder according to modification information.
File system driving module 401 also is used for judging whether to generate the altering event that comprises modification information according to modification information; When being, generate the altering event that comprises modification information in judged result.This moment, modification information can include only the title and the path of change file.
Hot folder monitor module 402 also is used for judging whether that according to alter operation needs extract the file of change; When being, from hot folder, extract the file of change in judged result according to modification information.If file system driving module 401 does not judge whether to generate altering event, but directly generate altering event, trigger in the altering event of hot folder monitor module 402 and need carry alter operation this moment.
Hot folder monitor module 402 also is used for submitting to module 403 to send the heartbeat detection signal to the flow services operation, and the testing process service operation is submitted the heartbeat detection signal of module 403 transmissions to.The flow services operation submits to module 403 also to be used for sending the heartbeat detection signal to hot folder monitor module 402, and detects the heartbeat detection signal that hot folder monitor module 402 sends.That is, whether hot folder monitor module 402 is submitted module 403 mutual heartbeat detection signals to the flow services operation, normal with the state that detects the other side, if normal, then continues the scheme in the present embodiment.
When the device initial launch, start the heartbeat detection process of hot folder monitor module 402 and flow services operation submission module 403; Judgment rule in profile system driver module 401 and/or the hot folder monitor module 402; Hot folder monitor module 402 gets into the altering event waiting status to file system driving module 401 registration altering events.
Said device also comprises the memory module 404 that is used to store hot folder and file, referring to shown in Figure 5.
File system driving module 401 in the present embodiment, hot folder monitor module 402, flow services operation submit to module 403 and memory module 404 can be arranged in same physical entity, also can lay respectively in the different physical entities.If be arranged in different physical entities, can realize distributed arrangement, more help operated from a distance.
Be used to realize that the software of the embodiment of the invention can be stored in storage mediums such as floppy disk, hard disk, CD and flash memory.
Pass through to generate when file system drives the file in the change hot folder modification information in the embodiment of the invention; Extract the file of change again according to modification information; Generate operation subpoena (a kind of file, or title worker list or accent list) and submission according to the file that changes then, thereby find the variation of hot folder immediately; Initiatively catch the file of variation, in time submit job.No longer need many times scanning calorimeter files, avoided the long or too short problem of trace interval, and saved resource.And, do not receive the influence of quantity of documents in the hot folder.Also alter operation is filtered in the embodiment of the invention, can filter repeatedly,, save system resource to reduce the repetition operation.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, belong within the scope of claim of the present invention and equivalent technologies thereof if of the present invention these are revised with modification, then the present invention also is intended to comprise these changes and modification interior.