This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:software:tim:timer:addfilestoprocessinstance [2018/03/28 13:50] Julian Le |
en:software:tim:timer:addfilestoprocessinstance [2021/07/01 09:52] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====AddFilesToProcessInstance ==== | + | ==== AddFilesToProcessInstance ==== |
The AddFilesToProcessInstance timer browses through a folder on the server. To filter a specific part of the filename a regex has to be given. Now in every instance a variable and its value is read out. It is alternatively possible to read out use the regex on the instance's name instead of the variable's value. A part of the vlaue of this variable is now filtered out with a regex. If the part of the filname matches the part of the variable value. the file is attached to the instance. Following that the file can be moved or deleted. | The AddFilesToProcessInstance timer browses through a folder on the server. To filter a specific part of the filename a regex has to be given. Now in every instance a variable and its value is read out. It is alternatively possible to read out use the regex on the instance's name instead of the variable's value. A part of the vlaue of this variable is now filtered out with a regex. If the part of the filname matches the part of the variable value. the file is attached to the instance. Following that the file can be moved or deleted. | ||
- | ------ | ||
- | ==== Timer Name ==== | ||
- | any \\ | ||
- | ==== Webservice Name ==== | + | ---- |
- | DMSManager \\ | + | |
+ | ==== Timer Name ==== | ||
+ | |||
+ | any | ||
+ | |||
+ | ==== Webservice Name ==== | ||
+ | |||
+ | DMSManager | ||
+ | |||
+ | ==== Webservice Method ==== | ||
+ | |||
+ | addFilesToProcessInstance | ||
- | ==== Webservice Method ==== | ||
- | addFilesToProcessInstance \\ | ||
---- | ---- | ||
+ | |||
---- | ---- | ||
- | ==== Parameter ==== | + | |
+ | ==== Parameter ==== | ||
== Path == | == Path == | ||
- | Explanation (s.[[#example]]) | ||
- | The path for the files that have to be brwosed through has to be given here. On a Windows server slashes (/) and not backslashes (\) have to be used. | ||
- | >> **Attention!** After the file a / or \ has to follow, e.g. C:/temp/ | ||
- | \\ == File Regex == | + | Explanation (s. [[#example|example]]) The path for the files that have to be brwosed through has to be given here. On a Windows server slashes (/) and not backslashes (\) have to be used. >> **Attention!** After the file a / or \ has to follow, e.g. C:/temp/ |
- | The regex after which th part of the filename has to be filtered has to be given here. The wanted part has to given in parentheses ("("). | + | |
- | Explanation (s. [[example]]) | + | == File Regex == |
+ | |||
+ | The regex after which th part of the filename has to be filtered has to be given here. The wanted part has to given in parentheses ("("). Explanation (s. [[#example|example]]) | ||
+ | |||
+ | == Variable Regex == | ||
- | \\ == Variable Regex == | ||
The regex after which the wanted part of the variable's value has to be filtered has to be given here. The wanted part has to given in parentheses ("("). | The regex after which the wanted part of the variable's value has to be filtered has to be given here. The wanted part has to given in parentheses ("("). | ||
- | \\ == Definition name == | + | == Definition name == |
THe definition, which the instances belongs to has to be given here. | THe definition, which the instances belongs to has to be given here. | ||
- | \\ == Variable == | + | == Variable == |
The name of the variable of which the vlaue is to be browsed through has to be given here. If instead of the variable the instance's name should be searched, **processinstance** has to be given instead of the variable name. | The name of the variable of which the vlaue is to be browsed through has to be given here. If instead of the variable the instance's name should be searched, **processinstance** has to be given instead of the variable name. | ||
- | \\ == Deleting == | + | == Deleting == |
Here you have to specify whether the file should be deleted (true) or moved (false). | Here you have to specify whether the file should be deleted (true) or moved (false). | ||
- | \\ == Moving path == | + | == Moving path == |
- | If in the previous parameter "false" is given, the path to which the file should be moved to has to be given here. On a Windows server slashes (/) and not backslashes (\) have to be used. | + | |
- | >> **Attention!** After the file a / or \ has to follow, e.g. C:/temp/ | + | |
- | >> **Attention!** Do not let the last parameter empty. | + | If in the previous parameter "false" is given, the path to which the file should be moved to has to be given here. On a Windows server slashes (/) and not backslashes (\) have to be used. >> **Attention!** After the file a / or \ has to follow, e.g. C:/temp/ |
+ | |||
+ | >> **Attention!** Do not let the last parameter empty. | ||
---- | ---- | ||
Line 48: | Line 59: | ||
Different exmaples for the parameters, or the regex. | Different exmaples for the parameters, or the regex. | ||
- | ==Example 1== | + | == Example 1 == |
This combination browses through the file name as well as the variable value according to the first sequence of numbers and compares them. | This combination browses through the file name as well as the variable value according to the first sequence of numbers and compares them. | ||
- | * C:/tmp/,([0-9]+),([0-9]+),definitionname,applicant,true,C:/tmp/old/ | ||
- | ==Example 2== | + | * C:/tmp/,([0-9]+),([0-9]+),definitionname,applicant,true,C:/tmp/old/ |
+ | |||
+ | == Example 2 == | ||
In this combination the file name and the variable name have to match. | In this combination the file name and the variable name have to match. | ||
- | * C:/tmp/,(.*),(.*),definitionname,applicant,false,C:/tmp/old/ | ||
- | ==Example 3== | + | * C:/tmp/,(.*),(.*),definitionname,applicant,false,C:/tmp/old/ |
+ | |||
+ | == Example 3 == | ||
In this combination the respectively first letter sequence is compared. | In this combination the respectively first letter sequence is compared. | ||
- | * C:/tmp/,([A-Za-z]*),([A-Za-z]*),definitionname,applicant,false,C:/tmp/old/ | ||
- | ==Example 4== | + | * C:/tmp/,([A-Za-z]*),([A-Za-z]*),definitionname,applicant,false,C:/tmp/old/ |
+ | |||
+ | == Example 4 == | ||
This combbination searches for a versioned file with a fixed prefix. In this case "tim_". The prefix with the attached number has to be present in the variable value. e.g.: "tim_24.png" | This combbination searches for a versioned file with a fixed prefix. In this case "tim_". The prefix with the attached number has to be present in the variable value. e.g.: "tim_24.png" | ||
- | * C:/tmp/,(tim_[0-9]+),(tim_[0-9]+),Definitionname,antragsteller,false,C:/tmp/old/ | ||
- | {{ software:tim:timer:addfilestoinstance.png }} | + | * C:/tmp/,(tim_[0-9]+),(tim_[0-9]+),Definitionname,antragsteller,false,C:/tmp/old/ |
+ | |||
+ | {{ :en:software:tim:timer:addfilestoprocessinstance.png?709x610 }} | ||
---- | ---- | ||
+ | |||
==== Dependencies ==== | ==== Dependencies ==== | ||
- | [[software:tim:changelog:tim40|v4.0]] | + | |
+ | [[:software:tim:changelog:tim40|v4.0]] | ||
+ |