I have a mapreduce task I need to run a script wh...
# suitescript
s
I have a mapreduce task I need to run a script when the task finishes is that possible ?
b
depends on the type of script you need to run
s
as long as it can transform a transfer order to IF
e
in the summary stage of the M/R you can trigger another task - is that what you are looking to do?
or, rather, you can do anything there. but the point is, the summarize step is what you are looking for, right?
s
that might not work
the map/reduce builds assembly, i need to transform a specific transfer order
e
if it is a number of assemblies, followed by a single transform of the TO, yes, summarize. Or, you can create a new task (scheduled script, M/R script, what have you) or you can do whatever in this stage
s
how would the summrize have the internal id of the TO
e
you tell me? how do you determine the TO? You can pass it as a parameter but I don’t really know your process
s
the m/r builds all back-ordered assembly that need to be built for that location
but i dont want a script to fufil all TO for that location
e
need more info, sorry… does the TO exist? can you pass it to the M/R when you schedule it? can you identify it somehow?
s
yes i can pass into the input stage the internal id of TO
e
if it is a script parameter you can read it in any stage, not necessarily only getInputData
👍 1
s
great
e
runtime.getcurrentscript.getparameter
s
yup
so in summrize I would need to call a user event , mr , schedule or any of the above