Help to configure HTTP request trigger(s)

Hi guys !

as the Title says i’m trying to build a workflow using a trigger that will fire when a specific endpoint is called ( Http request), without success…

Here’s what i want to achieve:

i want to update some record in some namespace, but i need that the new “data” is coming from an external system, let’s say i want to update the status of an User ( like online-offline but no so frequent).
My tough was that i can use a webapp to make an http request with the information i need in the body and then i want to “catch” that http req inside the corteza workflow to update the record.

Using an example trigger ( system- onManual) the flow is working fine, now i want to complete it using the Http request trigger but i can’t find any docs ( i found it but regarding the nodejs code witch is fine but not what i’m trying to do now)… any suggestion ?



i find this Link and i managed to make the workflow work close to expectation, now the “only” problem is that i can’t find out how to parse the body of the Request, in the example it uses “payload” as variable, i believe it’s because the endpoint is /example/payload ?
so in my case i’ve /battManag

the full endpoint is $CORTEZA_BASE/api/gateway/battManag

i’ve got this error :
" could not exec workflow: workflow 290874736160800771 step 47 execution failed: expression “battManag” failed: failed to select ‘payload’ on *expr.Vars: no such key ‘battManag’".

any suggestions ?


i’m using “request” as the scope of the function and seems fine but know i got an error during the execution of the js script, somehow it can’t JSON.parse(input) so an error is thrown…i’m using the script in the example linked, so i don’t understand…

Final EDIT:

I found the answer to the problem here, in the new version of Corteza the payload system variable is gone.