Ask Your Question

How do I get eventType in shell executor's script

asked 2019-12-13 01:16:55 -0600

lichanghong gravatar image

Now I encounter an issue which is : Each time a record goes through the pipeline , I am going to run a shell script whose parameter is parsed from the record。 when the record has been passed to the javascript evaluator, I parse the record and get the record's id and create a event whose eventType is the id,then an event created。

      In the shell executor, my script need a parameter which is stored in the evenType。

     My problem is that Could I get the eventType data in my shell script ?

     Or this way is workable ?
edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted

answered 2019-12-18 17:55:22 -0600

metadaddy gravatar image

In the executor's Environment tab, configure an environment variable with the expression ${record:eventType()}, like this:

image description

In the Script tab, you can then use that environment variable:

image description

Result of my test:

% cat /tmp/tester
edit flag offensive delete link more

answered 2019-12-18 16:05:12 -0600

khanhtran gravatar image

You can set it as an environment variable on your shell executor configuration.

edit flag offensive delete link more

answered 2019-12-13 03:08:49 -0600

Dean Han gravatar image

write eventype in a file, then you can read it in the shell script

edit flag offensive delete link more


Could U explain it in detail? each Time a event produced,I am going to trigger a shell script whose parameter is the eventtype。

lichanghong gravatar imagelichanghong ( 2019-12-15 22:02:53 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-12-13 01:16:55 -0600

Seen: 101 times

Last updated: Dec 18 '19