import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class WorkflowTaskAction:
id: int = 0
title: Optional[str] = None
type: Optional[str] = None
use_dialog: bool = False
connection_i_d: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class WorkflowTask:
id: int = 0
document_i_d: Optional[str] = None
title: Optional[str] = None
description: Optional[str] = None
context_title: Optional[str] = None
project: Optional[str] = None
relation: Optional[str] = None
image_key: Optional[str] = None
urgent: bool = False
is_read: bool = False
assignment_date: Optional[datetime.datetime] = None
completion_date: Optional[datetime.datetime] = None
number_of_comments: int = 0
extra_field: Optional[str] = None
has_preview: bool = False
extension: Optional[str] = None
is_informative: bool = False
has_pending_side_steps: bool = False
actions: Optional[List[WorkflowTaskAction]] = None
can_accept: bool = False
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetWorkflowTask(IHasVersion):
id: int = 0
version: int = 0
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /jsv/reply/GetWorkflowTask HTTP/1.1
Host: doapigw.baasbv.nl
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
ID: 0,
Version: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ID: 0,
Title: String,
Description: String,
ContextTitle: String,
Project: String,
Relation: String,
ImageKey: String,
Urgent: False,
IsRead: False,
AssignmentDate: 0001-01-01,
CompletionDate: 0001-01-01,
NumberOfComments: 0,
ExtraField: String,
HasPreview: False,
Extension: String,
IsInformative: False,
HasPendingSideSteps: False,
Actions:
[
{
ID: 0,
Title: String,
Type: String,
UseDialog: False
}
],
CanAccept: False
}