LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Executing processes within a BRAIN Graph?

    Employee
    Posted 10-24-2008 09:04

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: awilliams

    As part of a extract process we're developing we compress a file once it has been output by a Delimited node, to make the process simple to understand we would like to do this within the graph, instead of depending on external shell scripts.

    Is it possible to execute a external program within a node in BRAIN? I imagine this could be done via a Python node but i'm wondering if you have a simple way.


  • 2.  RE: Executing processes within a BRAIN Graph?

    Employee
    Posted 10-24-2008 13:00

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ltolleson

    Other than commands related to files (ie, moveFile, renameFile, deleteFile), I don't know of any built in functions or nodes to run system commands. You are correct that it can be done in Python, which is not that difficult.

    I have attached a graph that I created recently to do just that. It does have an input node that controls how many times the Python node executes, but that possibly be removed.

    Let me know if you have any questions about how this works.

    Larry<br><br>Post edited by: ltolleson, at: 2008/10/24 18:00


  • 3.  RE: Executing processes within a BRAIN Graph?

    Employee
    Posted 10-24-2008 16:02

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ltolleson

    Updated BRG file to remove the basic, simple, and complex library references.
    Attachments:
    ExecuteCommand-e084fcdf42a2099f6a5193c8a1c6725f.brg


  • 4.  RE: Executing processes within a BRAIN Graph?

    Employee
    Posted 06-03-2011 12:03

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Delta_V

    Hi Larry,

    I'm trying to use your above example graph to execute a batch file but I keep getting a 32512 returned from the OS. Could this possibly be a permission problem on the files?

    Josh


  • 5.  RE: Executing processes within a BRAIN Graph?

    Employee
    Posted 06-03-2011 12:19

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ltolleson

    Yes, the script file must have permissions to executed from the same user that started the BRAIN Server.


  • 6.  RE: Executing processes within a BRAIN Graph?

    Employee
    Posted 06-03-2011 13:56

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Delta_V

    Okay, I changed the octal on the batch file to 777 but I still can't execute it from BRE. I can run the batch file from the command line with the 'sh' command though so I know the batch file works.

    UPDATE: Nevermind, my mistake; I wasn't passing the path to my batch file correctly. Thanks!