Ruby curl not working

Discussion in 'ActionScripts' started by Gary Schultz, Dec 6, 2023.

Tags:
  1. Gary Schultz

    Gary Schultz New Member

    Joined:
    Nov 7, 2023
    Messages:
    14
    Likes Received:
    2
    I have a ruby actionscirpt that is running, but not working. I'm trying to call a Azure Logic App using curl based on the Message Delivery Actionsctipts examples. The actionscipt is called when a file is placed in a filedrop. This is in the activity log:

    {"message":"ActiveJob Actionscript Job Running for Filedrop","filedrop" ...

    I can get this to work from postman. I used postman to get the curl code. Anyone else run into an issue in whcih the actionscript is run, but doesn't peform the actions in the script.

    The system admin email account is receiving this type of message:


    LiquidFiles Actionscript systemFileDropTest.rb, Exit code: 0
    Actionscript output:

    Actionscript: file.rb
    Filedrop: filedrop
    Message ID: mesageID
    Exit Code: 0
    Script Output (stdout):
    Script Error (stderr): % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed

    0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
    100 127 100 127 0 0 330 0 --:--:-- --:--:-- --:--:-- 330
     
    #1 Gary Schultz, Dec 6, 2023
    Last edited: Dec 6, 2023
  2. David

    David Administrator
    Staff Member

    Joined:
    Dec 1, 2015
    Messages:
    801
    Likes Received:
    31
    I expect you configure the Message Delivery Action script: https://docs.liquidfiles.com/actionscripts/message_delivery.html
    From the logs my guess is the message data and probably also the system_file path was not properly get from the JSON output by script, so nothing was sent out to the 3rd party app via the curl.
    In the attachment["system_file"] should be listed the real path to the file stored on the data drive something like: /data/domains/default/files/users/604/20180607_Ok24eOJA1LuaQHFzNV4GMl/01-12345_our_drawings1of2.pdf.
     
  3. Gary Schultz

    Gary Schultz New Member

    Joined:
    Nov 7, 2023
    Messages:
    14
    Likes Received:
    2
    The issue I'm having is that the curl request doesn't make it to the Azure logic app. I tried with generic json formatted data. This is now what I see in the activity log.

    {"message":"ActiveJob Actionscript Job Running for Filedrop","filedrop":"SomeFileDrop","actionscript":"actionScriptTest.rb","message_id":"messageID","log_level":"info"}

    If I could get log_level debug for actionscript that might help, but I can't figure it out.
     
    #3 Gary Schultz, Dec 8, 2023
    Last edited: Dec 8, 2023
  4. Gary Schultz

    Gary Schultz New Member

    Joined:
    Nov 7, 2023
    Messages:
    14
    Likes Received:
    2
    I also tried the SFTP upload example using a known good SFTP server. Same thing, nothing happens.

    We are using the trial licesne, is that an issue?
     
  5. Gary Schultz

    Gary Schultz New Member

    Joined:
    Nov 7, 2023
    Messages:
    14
    Likes Received:
    2
    Just dawn on me to postman to provide the ruby code for my successful request. I used that code and it worked!
     
  6. David

    David Administrator
    Staff Member

    Joined:
    Dec 1, 2015
    Messages:
    801
    Likes Received:
    31
    The trial license does not restrict Action scripts.
    Good it works. Did you find out what was wrong in your script?
     

Share This Page