Condition Ignored

Questions and answers on how to get the most out of FFAStrans
Post Reply
MichaelDW96
Posts: 5
Joined: Fri Apr 14, 2023 4:12 am

Condition Ignored

Post by MichaelDW96 »

Can someone tell me what I'm doing wrong here?

I want my worflow to only continue if the filename of the input file contains "CWA" - but other files are getting through.

Image

Image

Here's the contents of the JSON for my workflow:

Code: Select all

{
  "workflow": {
    "wf_name": "Telco Processor - CWA A",
    "description": "",
    "general": {
      "sleep": 5
    },
    "variable": {
      "wf_size": 200
    },
    "maintainance": {
      "keep_all_workdir": false,
      "keep_failed_workdir": false,
      "cleanup_time": "04:00",
      "records_age": 5,
      "run_on_days": 2345671
    },
    "special": {
      "file_debug": true,
      "force_32bit": false,
      "read_timecode": false,
      "protected": false,
      "password": ""
    },
    "nodes": [
      {
        "id": "20180924-112305-968-10ea8af403ec",
        "name": "Watch Folder",
        "execute_on": "success",
        "bypass": false,
        "type": "mon_folder",
        "start_proc": true,
        "properties": {
          "folder": "D:\\Programing\\Telco\\New Episodes",
          "accept_files": "",
          "deny": {
            "files": "",
            "folders": "",
            "attributes": {
              "read": false,
              "arch": false,
              "sys": false,
              "hidden": false
            }
          },
          "recurse": false,
          "localize": false,
          "create_folder": false,
          "growing_files": true,
          "forget_missing": false,
          "file_limit": "None",
          "skip_verify": false,
          "file_size_mod": "continuously"
        },
        "pos_x": 75,
        "pos_y": 75,
        "outbounds": [
          {
            "type": "enc_av_mp4",
            "id": "20181108-151705-942-a5abdc48c3ce"
          }
        ],
        "description": "Edit this node to set your watch folder.",
        "preset": {
          "name": "(custom)",
          "id": null
        }
      },
      {
        "id": "20181108-151705-942-a5abdc48c3ce",
        "name": "Folder",
        "execute_on": "success",
        "bypass": false,
        "type": "dest_folder",
        "start_proc": false,
        "pos_x": 1275,
        "pos_y": 75,
        "outbounds": [],
        "description": "",
        "preset": {
          "name": "(custom)",
          "id": null
        },
        "properties": {
          "folder": "C:\\Users\\midso\\Desktop\\Ready for indexing",
          "suffix": "coffee_a_ready-for-indexing",
          "prefix": "",
          "overwrite": true,
          "unique": false,
          "case": "None",
          "drop_name": true,
          "drop_ext": false,
          "move": true,
          "padding": "None"
        }
      },
      {
        "id": "20230413-2252-5562-92a2-8bbcc736400e",
        "type": "op_cond",
        "custom_proc_guid": "",
        "name": "Conditional",
        "slots": 1,
        "hosts_group": 0,
        "bypass": false,
        "start_proc": true,
        "pos_x": 675,
        "pos_y": 75,
        "execute_on": "success",
        "preset": {
          "name": "(custom)",
          "id": null
        },
        "properties": {
          "dispel": true,
          "conditionals": [
            {
              "expression_1": "%s_original_name%",
              "operator": "equal to (=), regex",
              "expression_2": "CWA",
              "decide": "Then"
            }
          ]
        },
        "outbounds": []
      }
    ],
    "farming": {
      "hosts": [],
      "include": true
    },
    "wf_id": "20230413-2219-0016-931d-50040dd8c772",
    "wf_folder": "",
    "updated": "2023-04-13T23:16:35.916-05:00",
    "updated_by": "midso@DESKTOP-JBN9UQ2",
    "version": "1.3.0.38"
  }
}
Appreciate any help!
ThomasM
Site Admin
Posts: 227
Joined: Wed Feb 22, 2017 6:36 am

Re: Condition Ignored

Post by ThomasM »

Hi MichaelDW96,

Use wildcards. In your case

Code: Select all

CWA*


You can do soalso by populating your Monitor-Folder-Node with

Accept files: CWA*.* or CWA*.MOV or whatever format you want to let through.

Deny files is the same. Just use wildcards. Also note the Help-explanations behind the Question-Mark...


Screenshot (50).png
Screenshot (50).png (16.1 KiB) Viewed 1400 times


cheers,
Thomas
MichaelDW96
Posts: 5
Joined: Fri Apr 14, 2023 4:12 am

Re: Condition Ignored

Post by MichaelDW96 »

Thanks, appreciate the quick response! It still isn't working as expected though.

I drop AH160H.MPG into my watch folder and it gets processed and makes it through to the final step to get moved and renamed, even though my condition says CWA* (see image below)

Image
emcodem
Posts: 1649
Joined: Wed Sep 19, 2018 8:11 am

Re: Condition Ignored

Post by emcodem »

You can or better should use webinterface for debugging, i built the log viewer for the purpose of supporting workflow administrators while they build their workflow.

What you see in webinterface is that the conditional processor is not even executed because it is not connected (the little circles with numbers top left on processors indicate the execution count):
nocon.png
nocon.png (6.19 KiB) Viewed 1384 times
Also:
Welcome to the forum and thank you for using FFAStrans :D
emcodem, wrapping since 2009 you got the rhyme?
ThomasM
Site Admin
Posts: 227
Joined: Wed Feb 22, 2017 6:36 am

Re: Condition Ignored

Post by ThomasM »

Hi MichaelDW96,

just checked it. Strange behaviour - I will examine this and come back later.

cheers,
Thomas

@emcodem was faster... as most of the time! :D
MichaelDW96
Posts: 5
Joined: Fri Apr 14, 2023 4:12 am

Re: Condition Ignored

Post by MichaelDW96 »

Thank you both very much! I appreciate the help. Definitely feel a little dumb missing that 😅 - Is working now, will use the WebUI if any future debugging is needed.
emcodem
Posts: 1649
Joined: Wed Sep 19, 2018 8:11 am

Re: Condition Ignored

Post by emcodem »

No worries, we have all been there.
The connection lines in the workflow editor should be drawn "on top" over processors so users can see when this kind of thing happens. Unfortunately steinar is the only one who is working on such stuff in ffastrans and the list of stuff to be improved in ffastrans does not get smaller every day...
emcodem, wrapping since 2009 you got the rhyme?
MichaelDW96
Posts: 5
Joined: Fri Apr 14, 2023 4:12 am

Re: Condition Ignored

Post by MichaelDW96 »

Totally understand that. I definitely very much appreciate you and your colleague's efforts, and the efforts of everyone who builds awesome free tools, and especially going a step further and actively supporting it. Thanks for being awesome and keeping the dream alive for tinkerers like myself!
Post Reply