ExecuteTask
This method executes a task. This means that the task received from the server can be edited by the client by set input fields or parameters and then post back the information to the server, this means the entire task. The server will execute the information of the task and then return the task again with initialized next action.
Example of how to edit an input field in XML
<InputFieldObj>
<Id>SomeInputField</Id>
<Value>Some text... that is edited...</Value>
<Type>Text</Type>
<Policy />
<ReadOnly>false</ReadOnly>
<ValueList />
<FunctionList />
</InputFieldObj>
Example of how to edit an input field in JSON
{
"Id": "SomeInputField",
"Value": "Some text... that is edited...",
"Type": "Text",
"Policy": null,
"ReadOnly": "false",
"ValueList": null,
"FunctionList": null
}
Parameters
- SessionId
-
The current session id as base64-string. This type is mandatory.
- Task
-
The entire task that has been updated on the client. This type is mandatory.
- Count
-
The current call-count of the session. This must be a numeric value. This type is mandatory.
SOAP implementation
- Content type
-
text/xml; charset="utf-8";
- Header
-
Action: "http://www.pointsharp.com/netid/server/portal/IServiceSoap/ExecuteTask"
- Request
-
<?xml version="1.0" encoding="utf-8"?> <s:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <ExecuteTask xmlns="http://www.pointsharp.com/netid/server/portal"> <Info> <SessionId></SessionId> <Task>...</Task> <Count>2</Count> </Info> </ExecuteTask> </s:Body> </s:Envelope> - Response
-
The response will contain the current task with updated action list (current action has new status "Completed" and the next action has the new status "InProgress").
REST implementation
- Content type
-
application/json; charset="utf-8";
- Method
-
POST
- URI
-
/api/task/execute
- Request
-
{ "SessionId": "", "Task": "...", "Count": "2" } - Response
-
The response will contain the current task with updated action list (current action has new status "Completed" and the next action has the new status "InProgress").