This example shows you how to create a simple job that outputs the text "Hello, World!" in the browser. The text will be created by means of a FlowForce expression. You will be able to trigger the job on demand by clicking a link in the browser (that is, the job will be exposed as a Web service).
•Required licenses: FlowForce Server
•FlowForce Server must be running at the configured network address and port (see Setting the Network Address and Port)
•You have a FlowForce Server user account with permissions to one of the containers (by default, the /public container used in this example is accessible to any authenticated user).
1.Log on to FlowForce Server and navigate to a container where you have permission to create new jobs (this example uses the default /public container).
1.Click Create, and then select Create job.
2.Enter the job title and description.
3.Add a new execution step which calls the built-in function /system/compute.
4.In the Expression field, enter the text 'Hello, World', enclosed within single quotes. The content of this field represents a FlowForce Server expression.
5.Declare the execution result as string.
6.Select the Make this job available via HTTP... check box and type "HelloWorldService" as service name. For more information, see Exposing Jobs as Web Services.
7.Under "Credentials", select an existing credential record or specify a local credential. For more information, see Credentials.
You have now finished creating a job that computes the string value "Hello, World!" and returns it as the job result. To test the job, enter http://127.0.0.1:4646/service/HelloWorldService in the browser's address bar, provided that FlowForce Server runs at the default host and port name. If you have defined other host and port settings in the Configuration page, change the address accordingly. If prompted for credentials when accessing the Web service, supply the same credentials you use to log on to FlowForce Server.
If you set the optional Host name field of FlowForce Server from the Setup Page, you can execute the web service call in a new window, by clicking the button adjacent to the Make this job available via HTTP check box. The button is not displayed otherwise.
If you use Internet Explorer to test FlowForce Server jobs exposed as Web services, you may need to disable the "Show friendly HTTP error messages" option in the Advanced tab.
If the job executes successfully, the browser displays the output of the job:
If the job fails, the browser displays a "Service execution failed" message. In this case, check the log of the job in FlowForce Server to identify the error, see Viewing the Job Log.