Jump task#
A Jump is the "if" of a job. It compares two values and sends the run one way or the other: PDF files here and everything else there; go on if files were found, stop if not.
A Jump has two dots, true and false, and no others. Draw a line from each to the task that shall follow.
Fields#
| Field | What it does |
|---|---|
| the first value, the comparison, the second value | the condition. Each value is text and may hold variables. "Leave both fields blank to always be a true condition." |
| Make Jump act like if/else scenario passing all items. | changes how the items are handed on: see below |
| On True condition, On False condition | the tasks to go to, by name: the way CrushFTP 11 wrote it. In CrushMFT 27 the lines say it; a job from 11 has its lines drawn from these names. |
The comparisons: Equals, Doesn't Equal, Contains, Doesn't Contain, Matches Pattern, Doesn't Match Pattern, Greater Than, Greater Than Or Equal, Less Than, Less Than Or Equal. How each one compares is in Conditions on a task.
Two ways to work#
Splitting the list (the box unticked). The condition is tried for every item. The items for which it is true go down the true line, the others down the false line, and both paths run at the same time.
| First | Comparison | Second | The true line gets |
|---|---|---|---|
{ext} |
Equals | .pdf |
the PDF files |
{size} |
Greater Than | 104857600 |
files over 100 MB |
{name} |
Matches Pattern | URGENT_* |
the urgent ones |
A line that would get no items is not taken. The two paths can be brought together again by a Wait / Joiner.
Deciding for the whole list (the box ticked): "Jump using if/else logic passing all items if there is any true result instead of passing just the true items to the true task, and just the false items to the false task. If there are no true items, then pass all items to the false scenario."
So with the box ticked, all items go one way: down the true line if the condition is true for at least one item, else down the false line. Use it for questions about the run and not about a file:
| First | Comparison | Second | Asks |
|---|---|---|---|
{items_count} |
Greater Than | 0 |
was anything found? |
{HH} |
Less Than | 12 |
is it morning? |
{task_error} |
Contains | timed out |
was the last failure a time-out? |
{fetched} |
Equals | yes |
did an earlier task set this variable? |
With an empty list the condition is tried once, so a Jump on {items_count} works when nothing was found.
Grouping#
A Jump can also sort the list into groups and run the true line once per group, each time with that group's items:
| First | Comparison | Second |
|---|---|---|
GROUPBY |
Matches Pattern | what to group by: {ext}, {parent_path}, {-yyyy}{-MM} |
With {ext}, the task behind the true line is called once with all .csv files, once with all .pdf files, and so on, in the order the groups were first seen. A Zip there, to …/{ext}.zip, makes one archive per kind.
What it hands on#
Down each line, the items that belong there. A Jump has no line of its own that goes on "afterwards": what shall happen after both ways is drawn behind them, with a joiner where they meet.
In the log#
Checking the condition report.pdf equals .pdf results in: false
Found 2 matching the condition {ext} equals .pdf
Jumping to task … with the "true" items (count=2).
Each different check is logged once, with the values as they were after the variables were filled in. That line is the first place to look when a Jump goes the wrong way: it shows what was really compared.
Things to know#
- Text is compared exactly.
.PDFdoes not equal.pdf. Compare a small-letter copy:{lower_start}{ext}{lower_end}. - A number comparison on something that is not a number puts the item on neither line.
- Comparisons need an Enterprise licence. Without one the log says "Conditionals only apply for Enterprise licenses.", and no item is treated as matching.
- More than two ways. Chain Jumps, or use a Branch with a filter on each dot when the choice goes by the file's address.
- A jump into another job, as CrushFTP 11 had it, is the Link task now.