DigiOffice Gateway Web Services

<back to all web services

SetWorkflowTaskMessage

Requires Authentication
<?php namespace dtos;

use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};


class WorkflowTaskComment implements IComment, JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $WorkflowTaskID=0,
        /** @var int */
        public int $UserID=0,
        /** @var string|null */
        public ?string $TaskTitle=null,
        /** @var string|null */
        public ?string $Connection=null,
        /** @var string|null */
        public ?string $Username=null,
        /** @var string|null */
        public ?string $Text=null,
        /** @var DateTime */
        public DateTime $Date=new DateTime(),
        /** @var bool|null */
        public ?bool $IsMine=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['WorkflowTaskID'])) $this->WorkflowTaskID = $o['WorkflowTaskID'];
        if (isset($o['UserID'])) $this->UserID = $o['UserID'];
        if (isset($o['TaskTitle'])) $this->TaskTitle = $o['TaskTitle'];
        if (isset($o['Connection'])) $this->Connection = $o['Connection'];
        if (isset($o['Username'])) $this->Username = $o['Username'];
        if (isset($o['Text'])) $this->Text = $o['Text'];
        if (isset($o['Date'])) $this->Date = JsonConverters::from('DateTime', $o['Date']);
        if (isset($o['IsMine'])) $this->IsMine = $o['IsMine'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->WorkflowTaskID)) $o['WorkflowTaskID'] = $this->WorkflowTaskID;
        if (isset($this->UserID)) $o['UserID'] = $this->UserID;
        if (isset($this->TaskTitle)) $o['TaskTitle'] = $this->TaskTitle;
        if (isset($this->Connection)) $o['Connection'] = $this->Connection;
        if (isset($this->Username)) $o['Username'] = $this->Username;
        if (isset($this->Text)) $o['Text'] = $this->Text;
        if (isset($this->Date)) $o['Date'] = JsonConverters::to('DateTime', $this->Date);
        if (isset($this->IsMine)) $o['IsMine'] = $this->IsMine;
        return empty($o) ? new class(){} : $o;
    }
}

class SetWorkflowTaskMessage implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $ID=0,
        /** @var int */
        public int $UserID=0,
        /** @var string|null */
        public ?string $Message=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ID'])) $this->ID = $o['ID'];
        if (isset($o['UserID'])) $this->UserID = $o['UserID'];
        if (isset($o['Message'])) $this->Message = $o['Message'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ID)) $o['ID'] = $this->ID;
        if (isset($this->UserID)) $o['UserID'] = $this->UserID;
        if (isset($this->Message)) $o['Message'] = $this->Message;
        return empty($o) ? new class(){} : $o;
    }
}

PHP SetWorkflowTaskMessage DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /json/reply/SetWorkflowTaskMessage HTTP/1.1 
Host: dogw.klokgroep.nl 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"ID":0,"UserID":0,"Message":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"WorkflowTaskID":0,"UserID":0,"TaskTitle":"String","Connection":"String","Username":"String","Text":"String","Date":"0001-01-01T00:00:00.0000000","IsMine":false}