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 UserOrGroup:
id: Optional[int] = None
title: Optional[str] = None
is_checked: Optional[bool] = None
image: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class User(UserOrGroup):
image: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Group(UserOrGroup):
image: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class WorkflowTaskDelay:
delay_date: Optional[datetime.datetime] = None
reason: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class WorkflowTaskReason:
reason: Optional[str] = None
required: Optional[bool] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class WorkflowTaskAdhocTransition:
id: Optional[str] = None
title: Optional[str] = None
assignment_allowed: Optional[bool] = None
assignment_required: Optional[bool] = None
user_environment: Optional[int] = None
users: Optional[List[User]] = None
groups: Optional[List[Group]] = None
delay: Optional[WorkflowTaskDelay] = None
reason: Optional[WorkflowTaskReason] = None
users_or_groups: Optional[List[UserOrGroup]] = None
value: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AdhocTransitionDetails:
adhoc_transitions: Optional[List[WorkflowTaskAdhocTransition]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class WorkflowTaskActionComment:
comment: Optional[str] = None
required: Optional[bool] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SideStepDetails(AdhocTransitionDetails):
coordinator: Optional[User] = None
comment: Optional[WorkflowTaskActionComment] = None
urgent: Optional[bool] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class StartSideStep:
process_i_d: Optional[int] = None
workflow_task_i_d: Optional[int] = None
details: Optional[SideStepDetails] = None
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /csv/oneway/StartSideStep HTTP/1.1
Host: digiofficeapigateway.deltares.nl
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"ProcessID":0,"WorkflowTaskID":0,"Details":{"Coordinator":{"Image":"Icons/User","ID":0,"Title":"String","IsChecked":false},"Comment":{"Comment":"String","Required":false},"Urgent":false,"AdhocTransitions":[{"ID":"00000000-0000-0000-0000-000000000000","Title":"String","AssignmentAllowed":false,"AssignmentRequired":false,"UserEnvironment":0,"Users":[{"Image":"Icons/User","ID":0,"Title":"String","IsChecked":false}],"Groups":[{"Image":"Icons/Group","ID":0,"Title":"String","IsChecked":false}],"Delay":{"DelayDate":"0001-01-01T00:00:00.0000000","Reason":"String"},"Reason":{"Reason":"String","Required":false},"UsersOrGroups":[{"__type":"IDB.API.DTO.User, IDB.API.DTO","Image":"Icons/User","ID":0,"Title":"String","IsChecked":false},{"__type":"IDB.API.DTO.Group, IDB.API.DTO","Image":"Icons/Group","ID":0,"Title":"String","IsChecked":false}],"Value":"String\r\nString"}]}}