Framework API

<back to all web services

GetWorkflowData

Retrieves Updated workflow data to be saved to Framework

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};


// @ApiResponse(Description="Eros workflow data for synching to Framework")
class GetWorkflowDataResponse implements JsonSerializable
{
    public function __construct(
        /** @description Bin Row Version of the last update */
        // @ApiMember(Description="Bin Row Version of the last update")
        /** @var ByteArray|null */
        public ?ByteArray $BinRowVersion=null,

        /** @description XML string containing the workflow Data */
        // @ApiMember(Description="XML string containing the workflow Data")
        /** @var string|null */
        public ?string $WorkflowData=null,

        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['BinRowVersion'])) $this->BinRowVersion = JsonConverters::from('ByteArray', $o['BinRowVersion']);
        if (isset($o['WorkflowData'])) $this->WorkflowData = $o['WorkflowData'];
        if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->BinRowVersion)) $o['BinRowVersion'] = JsonConverters::to('ByteArray', $this->BinRowVersion);
        if (isset($this->WorkflowData)) $o['WorkflowData'] = $this->WorkflowData;
        if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
        return empty($o) ? new class(){} : $o;
    }
}

/** @description Retrieves Updated workflow data to be saved to Framework */
// @Api(Description="Retrieves Updated workflow data to be saved to Framework")
class GetWorkflowData implements ISubscription, JsonSerializable
{
    public function __construct(
        /** @description Bin Row Version of the last update */
        // @ApiMember(DataType="byte[]", Description="Bin Row Version of the last update", Name="BinRowVersion")
        /** @var ByteArray|null */
        public ?ByteArray $BinRowVersion=null,

        /** @description Suite Data Source Instance Id to determine which licensees data to retrieve. */
        // @ApiMember(DataType="Guid", Description="Suite Data Source Instance Id to determine which licensees data to retrieve.", Name="SuiteDataSourceInstanceId")
        /** @var string */
        public string $SuiteDataSourceInstanceId='',

        /** @var bool|null */
        public ?bool $IgnoreValidation=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['BinRowVersion'])) $this->BinRowVersion = JsonConverters::from('ByteArray', $o['BinRowVersion']);
        if (isset($o['SuiteDataSourceInstanceId'])) $this->SuiteDataSourceInstanceId = $o['SuiteDataSourceInstanceId'];
        if (isset($o['IgnoreValidation'])) $this->IgnoreValidation = $o['IgnoreValidation'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->BinRowVersion)) $o['BinRowVersion'] = JsonConverters::to('ByteArray', $this->BinRowVersion);
        if (isset($this->SuiteDataSourceInstanceId)) $o['SuiteDataSourceInstanceId'] = $this->SuiteDataSourceInstanceId;
        if (isset($this->IgnoreValidation)) $o['IgnoreValidation'] = $this->IgnoreValidation;
        return empty($o) ? new class(){} : $o;
    }
}

PHP GetWorkflowData DTOs

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

HTTP + OTHER

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

POST /jsonl/reply/GetWorkflowData HTTP/1.1 
Host: gatewayframeworkapi.pstpf.com.au 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"BinRowVersion":"AA==","IgnoreValidation":true}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"BinRowVersion":"AA==","WorkflowData":"String","ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}