GET | /api/processes/{ProcessID} |
---|
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 ProcessDetails(SideStepDetails):
show_coordinator_field: Optional[bool] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetProcessDetails:
process_i_d: Optional[int] = None
workflow_task_i_d: Optional[int] = None
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.
GET /api/processes/{ProcessID} HTTP/1.1 Host: digiofficeapigateway.deltares.nl Accept: text/jsv
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { ShowCoordinatorField: False, Coordinator: { Image: Icons/User, ID: 0, Title: String, IsChecked: False }, Comment: { Comment: String, Required: False }, Urgent: False, AdhocTransitions: [ { 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-01, 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 String" } ] }