Update Job
With this node you can update the information in a Job.
It has the following configuration options:
- Activity: here you can select the information to change.
Options:
- Add Files: if you select this option, you can add new files to the Job.
- Add Folder: if you select this option, you can add a new folder to the Job.
- Add Versions: if you select this option, you can add new versions of the file(s) to the Job.
- Remove Files: if you select this option, you can remove files from the Job.
- Remove Folder: if you select this option, you can remove a folder from the Job. This option does not affect the folder on disk.
- Move Files: if you select this option, you can move or rename files in the Job. This option does not affect the files on disk.
- Move Folder: if you select this option, you can move or rename a folder in the Job. This option does not affect the folder on disk.
- Set Next States: if you select this option, you can define the possible next states for the Job.
- Set State: if you select this option, you can set the state of the Job.
- Set Data: if you select this option, you can set the data of the Job.
- Set Preview: if you select this option, you can assign a preview to the Job.
- Set Form Name: if you select this option, you can change the Job form.
- Link to sub job: if you select this option, you can link a sub Job to the Job.
- Unlink to sub job: if you select this option, you can unlink a sub Job from the Job.
- Mark final: if you select this option, you can mark the Job as final. A final Job can no longer be edited.
- Job: here you can select a Job to update. In most cases you can
leave this field blank because in most cases you don't need to explicitly select a Job.
For example, a Job will be linked to this workable if this workable passed a
Create Job node or if the workable was created from a
Start From Job node. However, in some cases you want to update (another) Job or a Job from different setups. In that case you can select this Job with this parameter. There are two ways to select the Job:
- By Job ID: you can specify here the Job ID of the Job you want to update. This is the ID that is automatically assigned to the Job by CLOUDFLOW when you create the Job.
- By Identifier: you can also specify the Identifier you assigned yourself to the Job when you created it.
CLOUDFLOW will automatically recognize the method you are using, and load the correct Job.
In case Activity is set to Add Files
- Files: here you can select the (set) of files to add to the Job.
- Files Tag: here you can specify a tag to assign to the added files. In case all the files in your Job have the same meaning you can leave this blank.
- Assign Tag from enclosing job folder: if you select this checkbox, the tag of the enclosing folder is automatically assigned to the added file. First a job folder is searched that encloses the new file. Then the tag assigned to that folder is used to assign as tag to the new added file. If more than one folder encloses the file, the folder that does not enclose any of the other enclosing folders is selected. If no enclosing folder is found, no tag will be assigned. This option overrules the tag specified in the parameter Files Tag.
- Reject files outside job folder: if you select this checkbox, files that are outside a Job folder will be rejected.
- Update Existing: if you select this checkbox, existing files in the Job are replaced if it matches the specified URL(s). If you don't select this checkbox, files are added (and not replaced), even if the specified URL(s) already exist in the Job.
In case Activity is set to Add Folder
- Folder: here you can select the folder to add to the Job.
- Folder Tag: here you can specify a tag to assign to the added folder. In case all the folders in your Job have the same meaning you can leave this blank.
- Update Existing: if you select this checkbox, existing folders in the Job are replaced if it matches the specified URL(s). If you don't select this checkbox, folders are added (and not replaced), even if the specified URL(s) already exist in the Job.
In case Activity is set to Add Versions
- Files: here you can select the (set) of files to add to the Job.
- Files Tag: here you can specify a tag to assign to the added files. In case all the files in your Job have the same meaning you can leave this blank.
- Previous Versions of Files: here you can select the previous
versions of the file (Files specifies the new version of the
file). Make sure to set Previous Versions of Files to the URL of
the previous file the way it is named on disk and Files to the
URL of the current/new file the way it is named on disk.
If: Then: The previous file version still has the same name and the new file version has a new name. - The file that corresponds to the specified previous version will be searched.
- The versions in that entry will be updated.
- The references in that entry will be changed to the new URL.
The previous file version has been moved/renamed and the new file version has same name as the before. - The file that corresponds to the specified new version will be searched.
- The versions in that entry will be updated.
In case Activity is set to Remove Files
- Files: here you can select the (set) of files to remove from the Job.
- Files Tag: here you can specify a tag to assign to the removed files. In case all the files in your Job have the same meaning you can leave this blank.
In case Activity is set to Remove Folder
- Folder: here you can select the folder to remove from the Job.
- Folder Tag: here you can specify a tag to assign to the removed folder. In case all the folders in your Job have the same meaning you can leave this blank.
In case Activity is set to Move Files
- Previous Location of Files: here you can specify the location where the files used to be located.
In case Activity is set to Move Folder
- Previous Location of Folder: here you can specify the location where the folder used to be located.
- Also update all files inside the moved folder: if you select this checkbox, the files inside a moved folder are also moved. If you leave this checkbox unselected, the files inside a moved folder are not moved and you have to move the files yourself. This can for example be the case if you want to keep the references to the file(s).
In case Activity is set to Set Next States
- Possible Next States: if you select +, you can define possible next states. Select the pencil to open Expression Builder. The possible next states are visible in the DATA tab in the Job details. If you select one of the states, this state will be set to the Job.
- Also allow other states: if you select this checkbox, other states that are not specified in Possible next States are also allowed. This can be needed for example when a job should be reset to an earlier state if in case of a problem.
In case Activity is set to Set State
- State: here you can specify the state to assign to the Job.
- Force Events: if you select this checkbox, workables are created in the Start From Job node, even if changes are not actually applied. Normally, no workable will be created when you use Set State and when the new value for the state is the same as the current value. However,if you select this option, a workable will be created in all cases.
In case Activity is set to Set Data
With this option you can set or update specific Job data in the database. You can save data in any location in the Job, but you should always save non-standard data in custom sections.
In case you have used a template that also contains (custom) data, the specified data will overwrite any data from the used template, but will be overwritten by direct parameters in this node (for example Name, Identifier...).
Select + to specify the path and the value of the data you want to
set or update.
- Path : the path to the data. You need to use a dot notation to reach specific data in the database.
- Value: the value you want to set or add to the specified data path.
Example
Path | Value |
---|---|
custom.cusname | CustomerX |
custom.cusID | 12345 |
identifier | Job_442542 |
This will result in the following JSON file in the
database:
{
"identifier" : "Job_442542",
"custom" : {
"cusname" : "CustomerX",
"cusID" : "12345",
}
}
- In case the fields cusname or cusID do not exist, they will be created.
- In case the fields do exist but contain different values, the values of the fields will be updated.
In case Activity is set to Set Preview
- Preview file: here you can select a file to use as preview for the Job.
In case Activity is set to Set Form Name
- Form Type: here you can select the form type. Options:
- List Edit: if you select this option, the form Job data are displayed and can be edited in the Job's list view.
- Form Edit: if you select this option, the form Job data are displayed and can be edited in the Job's details view.
- Form Name: here you can specify the form you want to use. See Handle Form for more information on Job forms.
In case Activity is set to Link to sub job
- Project ID: here you can define the project ID of the sub Job to link to this Job to.
- Project Tag: here you can define an optional tag to assign to the linked sub Job.
In case Activity is set to Unlink sub job
- Project ID: here you can define the project ID of the sub Job to unlink to this Job from.
- Project Tag: here you can define an optional tag to assign to the unlinked sub Job.
In case Activity is set to Mark final
- Make Final: if you select this checkbox, the Job is marked as final. In this case, the Job can not be edited anymore.