Page 1 of 1

insert private Data

Posted: Wed Jul 09, 2014 9:44 am
by Joerg Schober
Hi,

for creation of private Data (Job.PrivateData) it is necessary to use a script element, right?



Kind regards,

Jörg

insert private Data

Posted: Wed Jul 09, 2014 10:25 am
by freddyp
Yes. Or a script expression.



Freddy

insert private Data

Posted: Wed Jul 09, 2014 10:29 am
by Joerg Schober
Thanks, Freddy.

Do you have an example for a script expression?



insert private Data

Posted: Wed Jul 09, 2014 11:29 am
by dkelly
job.setPrivateData("key", "value");

insert private Data

Posted: Fri Aug 08, 2014 9:00 pm
by Danny
I'm trying to set the private data to the current job state. Could you please give an example of this?



I would need a script element for this, correct?



Thank you!

insert private Data

Posted: Fri Aug 08, 2014 9:25 pm
by gabrielp
Danny wrote: I'm trying to set the private data to the current job state. Could you please give an example of this?



I would need a script element for this, correct?



Thank you!


I think so. This should do it:



var jobstate = job.getJobState();

job.setPrivateData('YourKey', jobstate);

job.sendToSingle( job.getPath() );

insert private Data

Posted: Fri Aug 08, 2014 9:37 pm
by Danny
Works perfect. That's exactly what I was trying to do. Thank you very much!