| POST | /workflow-step/{StepId}/redo-request |
|---|
import 'package:servicestack/servicestack.dart';
class WorkflowRedoRequestDetail implements IConvertible
{
int? id;
int? documentId;
int? stepId;
String? stepName;
int? requestedBy;
String? requestedByName;
int? approverId;
String? approverName;
int? status;
String? reason;
String? comment;
DateTime? createdAt;
DateTime? actionAt;
WorkflowRedoRequestDetail({this.id,this.documentId,this.stepId,this.stepName,this.requestedBy,this.requestedByName,this.approverId,this.approverName,this.status,this.reason,this.comment,this.createdAt,this.actionAt});
WorkflowRedoRequestDetail.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
documentId = json['documentId'];
stepId = json['stepId'];
stepName = json['stepName'];
requestedBy = json['requestedBy'];
requestedByName = json['requestedByName'];
approverId = json['approverId'];
approverName = json['approverName'];
status = json['status'];
reason = json['reason'];
comment = json['comment'];
createdAt = JsonConverters.fromJson(json['createdAt'],'DateTime',context!);
actionAt = JsonConverters.fromJson(json['actionAt'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'documentId': documentId,
'stepId': stepId,
'stepName': stepName,
'requestedBy': requestedBy,
'requestedByName': requestedByName,
'approverId': approverId,
'approverName': approverName,
'status': status,
'reason': reason,
'comment': comment,
'createdAt': JsonConverters.toJson(createdAt,'DateTime',context!),
'actionAt': JsonConverters.toJson(actionAt,'DateTime',context!)
};
getTypeName() => "WorkflowRedoRequestDetail";
TypeContext? context = _ctx;
}
class WorkflowRedoRequestResponse implements IConvertible
{
int? code;
String? message;
bool? requiresApproval;
WorkflowRedoRequestDetail? request;
WorkflowRedoRequestResponse({this.code,this.message,this.requiresApproval,this.request});
WorkflowRedoRequestResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
code = json['code'];
message = json['message'];
requiresApproval = json['requiresApproval'];
request = JsonConverters.fromJson(json['request'],'WorkflowRedoRequestDetail',context!);
return this;
}
Map<String, dynamic> toJson() => {
'code': code,
'message': message,
'requiresApproval': requiresApproval,
'request': JsonConverters.toJson(request,'WorkflowRedoRequestDetail',context!)
};
getTypeName() => "WorkflowRedoRequestResponse";
TypeContext? context = _ctx;
}
class SubmitWorkflowRedoRequest implements IConvertible
{
int? stepId;
String? reason;
SubmitWorkflowRedoRequest({this.stepId,this.reason});
SubmitWorkflowRedoRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
stepId = json['stepId'];
reason = json['reason'];
return this;
}
Map<String, dynamic> toJson() => {
'stepId': stepId,
'reason': reason
};
getTypeName() => "SubmitWorkflowRedoRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'etc_api.vsmlab.vn', types: <String, TypeInfo> {
'WorkflowRedoRequestDetail': TypeInfo(TypeOf.Class, create:() => WorkflowRedoRequestDetail()),
'WorkflowRedoRequestResponse': TypeInfo(TypeOf.Class, create:() => WorkflowRedoRequestResponse()),
'SubmitWorkflowRedoRequest': TypeInfo(TypeOf.Class, create:() => SubmitWorkflowRedoRequest()),
});
Dart SubmitWorkflowRedoRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /workflow-step/{StepId}/redo-request HTTP/1.1
Host: etc-api.vsmlab.vn
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<SubmitWorkflowRedoRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/tvpl.api.ServiceModel">
<Reason>String</Reason>
<StepId>0</StepId>
</SubmitWorkflowRedoRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<WorkflowRedoRequestResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/tvpl.api.ServiceModel">
<Code>0</Code>
<Message>String</Message>
<Request>
<ActionAt>0001-01-01T00:00:00</ActionAt>
<ApproverId>0</ApproverId>
<ApproverName>String</ApproverName>
<Comment>String</Comment>
<CreatedAt>0001-01-01T00:00:00</CreatedAt>
<DocumentId>0</DocumentId>
<Id>0</Id>
<Reason>String</Reason>
<RequestedBy>0</RequestedBy>
<RequestedByName>String</RequestedByName>
<Status>0</Status>
<StepId>0</StepId>
<StepName>String</StepName>
</Request>
<RequiresApproval>false</RequiresApproval>
</WorkflowRedoRequestResponse>