import Foundation
import ServiceStack
public class StartSideStep : Codable
{
public var processID:Int?
public var workflowTaskID:Int?
public var details:SideStepDetails?
required public init(){}
}
public class SideStepDetails : AdhocTransitionDetails
{
public var coordinator:User?
public var comment:WorkflowTaskActionComment?
public var urgent:Bool?
required public init(){ super.init() }
private enum CodingKeys : String, CodingKey {
case coordinator
case comment
case urgent
}
required public init(from decoder: Decoder) throws {
try super.init(from: decoder)
let container = try decoder.container(keyedBy: CodingKeys.self)
coordinator = try container.decodeIfPresent(User.self, forKey: .coordinator)
comment = try container.decodeIfPresent(WorkflowTaskActionComment.self, forKey: .comment)
urgent = try container.decodeIfPresent(Bool.self, forKey: .urgent)
}
public override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
var container = encoder.container(keyedBy: CodingKeys.self)
if coordinator != nil { try container.encode(coordinator, forKey: .coordinator) }
if comment != nil { try container.encode(comment, forKey: .comment) }
if urgent != nil { try container.encode(urgent, forKey: .urgent) }
}
}
public class AdhocTransitionDetails : Codable
{
public var adhocTransitions:[WorkflowTaskAdhocTransition] = []
required public init(){}
}
public class WorkflowTaskAdhocTransition : Codable
{
public var id:String?
public var title:String?
public var assignmentAllowed:Bool?
public var assignmentRequired:Bool?
public var userEnvironment:Int?
public var users:[User] = []
public var groups:[Group] = []
public var delay:WorkflowTaskDelay?
public var reason:WorkflowTaskReason?
public var usersOrGroups:[UserOrGroup] = []
public var value:String?
required public init(){}
}
public class User : UserOrGroup
{
public var image:String?
required public init(){ super.init() }
private enum CodingKeys : String, CodingKey {
case image
}
required public init(from decoder: Decoder) throws {
try super.init(from: decoder)
let container = try decoder.container(keyedBy: CodingKeys.self)
image = try container.decodeIfPresent(String.self, forKey: .image)
}
public override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
var container = encoder.container(keyedBy: CodingKeys.self)
if image != nil { try container.encode(image, forKey: .image) }
}
}
public class UserOrGroup : Codable
{
public var id:Int?
public var title:String?
public var isChecked:Bool?
public var image:String?
required public init(){}
}
public class Group : UserOrGroup
{
public var image:String?
required public init(){ super.init() }
private enum CodingKeys : String, CodingKey {
case image
}
required public init(from decoder: Decoder) throws {
try super.init(from: decoder)
let container = try decoder.container(keyedBy: CodingKeys.self)
image = try container.decodeIfPresent(String.self, forKey: .image)
}
public override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
var container = encoder.container(keyedBy: CodingKeys.self)
if image != nil { try container.encode(image, forKey: .image) }
}
}
public class WorkflowTaskDelay : Codable
{
public var delayDate:Date?
public var reason:String?
required public init(){}
}
public class WorkflowTaskReason : Codable
{
public var reason:String?
public var required:Bool?
required public init(){}
}
public class WorkflowTaskActionComment : Codable
{
public var comment:String?
public var required:Bool?
required public init(){}
}
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"}]}}