setOutputParameter method: ServiceAPI class
Syntax
setOutputParameter(parameter_name,parameter_type)
Description
Use this method to set output value based on parameter defined on the application service.
Parameters
| Parameter | Description |
|---|---|
|
parameter_name |
Specifies the name of the output parameter (as a string). |
|
parameter_type |
Specifies the type of the output parameter (as Any). Values can be the following:
|
Returns
None.
Example
import PTCBAPPLSVCDEFN:ApplicationServiceBase;
class STUDENT extends PTCBAPPLSVCDEFN:ApplicationServiceBase
method invokeService();
end-class;
method invokeService
/+ Extends/implements PTCBAPPLSVCDEFN:ApplicationServiceBase.invokeService +/
Local JsonArray &jsStudentArray;
Local array of string &stud;
&jsStudentArray = CreateJsonArray();
&jsStudentArray.AddElement(&stud [1]);
&jsStudentArray.AddElement(&stud [2]);
%This.ServiceAPI.setOutputParameter("student", &jsStudentArray);
end-method;
Related Topics