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.  Execute BRX with BrainScript parameter

    Employee
    Posted 11-16-2017 04:07

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

    Originally posted by: jdeehan

    I wish to run graph B within graph A.

    To do this, I am using an Execute BRX node and passing in my fields as static data as below:

    field1, field2, field3...
    value1, value2, value3...

    field 1 is to be used in a filter node within graph B as BrainScript code. It is written as such:

    emit *
    {{*field1*}}

    I am able to enter value1 manually into graph B as a run time parameter that is BrainScript, text or a string that gets compiled as BrainScript in my filter node and execute it manually.

    However, when I save my graph as an Executable (BRX). It won't allow me to have an inherited parameter within the filter node that is to be used as BrainScript. It gives the message:

    Unexpected character ({) at line 2.

    This error occurs whether I leave the run time parameter blank or I populate it.
    Yet it still saves, just causing an error in the Execute BRX node.

    I have tried calling this parameter with {{$field1$}}, {{*field1*}} and {{^field1^}} but the same error occurs.

    I have also tried having the Parameters 1 inheriting from the run time parameter and have the filter node call the Parameter 1 instead.

    The thing that makes me believe this is possible is that graph B executes when I manually enter a value for the run time parameter and execute it manually.

    Is there any logic in the BrainScript of the filter that would stop this error being thrown or a BrainScript wrapper? Or any features to the Execute BRX node that would allow the BRX to Execute with this parameter being compiled by the filter node?

    Cheers,

    James


  • 2.  RE: Execute BRX with BrainScript parameter

    Employee
    Posted 11-16-2017 07:34

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

    Originally posted by: gmullin

    The BRX expects parameters to be a piece of string and nothing more. You can't put BRAINScript in a Run parameter and have it run dynamically like that. It will work when you execute through BRE but not as BRX. You'll have to modify your filter to treat the parameter as a piece of string only. For example if you had field1 set to: where color == "Red" you will have to change the filter to say: where color == "{{^field1^}}" and set field1 to Red.


  • 3.  RE: Execute BRX with BrainScript parameter

    Employee
    Posted 11-17-2017 05:43

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

    Originally posted by: jdeehan

    Ah, that's a shame. I was hoping to find a work-around for the manual stages in Lavastorm so I could automate my graph by Executing a BRX with a Brainscirpt parameter generated as an output by an earlier node. Thank you for the help