OL Learn

How to pass jobinfo var from workflow to designer template

Hi,

is it possible to pass a jobinfo variable from workflow (Set Job Infos and Variables) and get its value in a template script (Create Print Content)? An important detail is that I need it after the datamapping process.

In designer/template I tried to get the jobinfo in a script through automation.jobInfos.JobInfo1 but the result is always empty.

Is there a way to achieve this?

Thanks in advance

Hi Dave,

Have you read THIS. Also note that the field used to receive the data from Workflow will always be empty when in the designer. It will only pass the value to the field once processed in Workflow. That is why we add default values to the field in designer/mapper for design purposes.

Using automation.jobInfos.JobInfo1 in a script in the template will also be a empty jobinfo variable until the template is run in Workflow and Workflow sends the value to the templates script.

Regards,

S

Hi,

thanks for your answer. I already saw this webpage but this is almost only about getting jobinfos in datamapper. However the last chapter says:

“Job Infos, no data mapping required
So, one last thing to note: It’s wholly possible to use JobInfos without having a data mapping configuration loaded. This is only true for Web contexts, when using 0 as the Record ID in the Create Email Contents task. However, these can only be used in Scripts, using automation.jobInfos.JobInfo1 to automation.jobInfos.JobInfo9.”

Practically, even through workflow (which I already tested before) the value is always empty. Even more if I set a fixed value in the template script before using it, it’s still empty:

automation.jobInfos.JobInfo1 = “test”;

myField = automation.jobInfos.JobInfo1;

Thanks in advance for your response

Dave