Question Suman Samanta · Jun 24, 2019

Calling JOB from one REST service

I have one REST service extending %CSP.REST

I am trying to call one method using JOB, its not getting called does anyone have any idea if i am doing anything wrong here.

works : do ##class(TestFramework.API.E2E.Service).RunCases()

does not work : JOB ##class(TestFramework.API.E2E.Service).RunCases()

Comments

Suman Samanta  Jun 26, 2019 to Danny Wijnschenk

Ok i found something here. I am calling like below

job ##class(TestFramework.API.E2E.Service).RunCases(oResults,pRunSessionId)

Here oResults is a listofobjects , and this is not getting passed to the object. New job is getting created but as the list of objects is not not getting passed hence the failure.

0
Eduard Lebedyuk  Jun 26, 2019 to Suman Samanta

You can't pass object via JOB command.

0
Suman Samanta  Jun 26, 2019 to Eduard Lebedyuk

Yes child process in getting created but its not passing the object to the next job

0
Danny Wijnschenk  Jun 26, 2019 to Suman Samanta

You cannot pass an object (oref) as a parameter using Job.

You have to save its properties to a variable/array and pass that, or save the object and pass its id.

0
Eduard Lebedyuk · Jun 25, 2019

What do you mean not getting called?

Is the child process created (check with $zchild/$test)?

Does it start work (set some global in the beginning)?

0