ProgressTask

This operation allows you to update the status of a task.

ProgressTaskRequest

Property

Type

Value

Credentials

Credentials

Authentication information

TaskRef

RecordRef 

References the task which status you wish to modify

Location

Location

Localization information from the task’s creation (mobile)

TaskState

TaskState

Status of the task to which you want to transition. The process must allow the transition from the current status to the new one. LogicId or WorkflowStepRef can be used here, according to the needs.


Examples


Java

ProgressTaskRequest request = new ProgressTaskRequest():

request.setCredentials(credentials); // Request Authentication (sessionId or username/password)

// TaskRef

RecordRef taskRef = new RecordRef();

taskRef.setType(RecordType.TASK);

taskRef.setId(1234); // Can be retrieved with searchRecords or during createTask

request.setTaskRef(taskRef);

// TaskState

TaskState state = new TaskState();

final GregorianCalendar gregorianCalendar = new GregorianCalendar();

gregorianCalendar.setTime(new Date());

state.setDateTime(DatatypeFactory.newInstance().newXMLGregorianCalendar(gregorianCalendar));

state.setLocation(null); // GPS Positioning of the status change (optional)

// Via LogciId

state.setLogicId(200); // 200 = dispatched

// Via RecordRef

RecordRef stepRef = new RecordRef();

stepRef.setType(RecordType.WORKFLOW_STEP);

stepRef.setId(12345); // IDs can be retrieved via a searchRecords

state.setWorkflowStepRef(stepRef);

request.setTaskState(state);

// Operation execution

RecordRef taskStateRef = progressionPortType.progressTask(request).getTaskStateRef();



php 

$progressRequest= newStdClass();

$progressRequest->credentials = $credentials;

$progressRequest->taskRef = newStdClass();

$progressRequest->taskRef->Type = 'TASK';

// Id or UID must be provided to point to the task which needs to be progressed

// N.B.: Progress = Change a task’s status

$progressRequest->taskRef->Id = 677; //Replace with right #

//$progressRequest->taskRef->UID =




$progressRequest->taskState = newStdClass();

$progressRequest->taskState->LogicId = 300; // To progress to step 300

$progressRequest->taskState->WorkflowStepRef = null; // Must be specified even if ‘null’

$progressRequest->taskState->Datetime = newSoapVar(date('Y-m-d'), XSD_STRING, 'string', 'http://www.w3.org/2001/XMLSchema');

// GPS Positioning of the Status change (optional)

$progressRequest->Location = null;




$progressTaskResponse= $service->ProgressTask($progressRequest);




var_dump($progressTaskResponse);