Hi Everyone,
Build version M33.104.
We have a scenario where we have to call an asynchronous web service.
From the documentation i understand that the Redwood job will be in status Running until the web service completes.
How does the call back work from the web service to Redwood? How does Redwood know the asynchronous web service job completed?
From the documentation, the per-requisite is:
thanks
Nanda
Hi Nanda,
Basically, you create a RedwoodScript job definition with the following code:
{
//Set completion strategy to external
jcsJobContext.setCompletionStrategy(CompletionStrategyType.External);
}
It needs the following Out parameters:
ServerAddress
JobId
On the Published Web Services tab of the job definition editor dialog, you click Add and then Save, the job definition now has a web service. Go to Scripting > Published Web Services to inspect published web services, UpdateJob1 is available in Scripting > Built-In Web Services. You can retrieve the WSDL and the URL to the web services from there.
Your web service now calls the web service for your RedwoodScript job definition (CPS uses basic authentication), then does its work, finally, when it has finished, it must update the job, it will call the UpdateJob1 web service with the job Id it got back when it initially called your RedwoodScript job and set the status to Completed.
Regards,
HP
Add a comment