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
You can run the Job command with a timeout parameter, and check if the job has really started with the $TEST variable :
USER> JOB ##class(TestFramework.API.E2E.Service).RunCases()::0
USER> Write $TEST
Should be 1 if the classmethod was started, 0 if the job timed out and did not start
In the second case it can be a license problem, check https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GSA_license#GSA_license_capacity
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.
You can't pass object via JOB command.
Yes child process in getting created but its not passing the object to the next job
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.
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)?