| POST | /workflow |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class CreateWorkflowRequest
{
public String title = null;
public String description = null;
public String documentCode = null;
public Integer documentTypeId = null;
public Boolean isInstance = null;
public Integer mainId = null;
public String getTitle() { return title; }
public CreateWorkflowRequest setTitle(String value) { this.title = value; return this; }
public String getDescription() { return description; }
public CreateWorkflowRequest setDescription(String value) { this.description = value; return this; }
public String getDocumentCode() { return documentCode; }
public CreateWorkflowRequest setDocumentCode(String value) { this.documentCode = value; return this; }
public Integer getDocumentTypeId() { return documentTypeId; }
public CreateWorkflowRequest setDocumentTypeId(Integer value) { this.documentTypeId = value; return this; }
public Boolean getIsInstance() { return isInstance; }
public CreateWorkflowRequest setIsInstance(Boolean value) { this.isInstance = value; return this; }
public Integer getMainId() { return mainId; }
public CreateWorkflowRequest setMainId(Integer value) { this.mainId = value; return this; }
}
public static class Workflow
{
public Integer id = null;
@Required()
@StringLength(500)
public String title = null;
@StringLength(4000)
public String description = null;
@StringLength(100)
public String documentCode = null;
public Integer documentTypeId = null;
public Boolean isInstance = null;
public Integer mainId = null;
public Boolean isActive = null;
public Integer statusId = null;
public Integer accountId = null;
public Integer departmentId = null;
@Ignore()
public Integer scopeType = null;
@StringLength(500)
public String createdBy = null;
public Date createdAt = null;
@StringLength(500)
public String updatedBy = null;
public Date updatedAt = null;
public Integer getId() { return id; }
public Workflow setId(Integer value) { this.id = value; return this; }
public String getTitle() { return title; }
public Workflow setTitle(String value) { this.title = value; return this; }
public String getDescription() { return description; }
public Workflow setDescription(String value) { this.description = value; return this; }
public String getDocumentCode() { return documentCode; }
public Workflow setDocumentCode(String value) { this.documentCode = value; return this; }
public Integer getDocumentTypeId() { return documentTypeId; }
public Workflow setDocumentTypeId(Integer value) { this.documentTypeId = value; return this; }
public Boolean getIsInstance() { return isInstance; }
public Workflow setIsInstance(Boolean value) { this.isInstance = value; return this; }
public Integer getMainId() { return mainId; }
public Workflow setMainId(Integer value) { this.mainId = value; return this; }
public Boolean getIsActive() { return isActive; }
public Workflow setIsActive(Boolean value) { this.isActive = value; return this; }
public Integer getStatusId() { return statusId; }
public Workflow setStatusId(Integer value) { this.statusId = value; return this; }
public Integer getAccountId() { return accountId; }
public Workflow setAccountId(Integer value) { this.accountId = value; return this; }
public Integer getDepartmentId() { return departmentId; }
public Workflow setDepartmentId(Integer value) { this.departmentId = value; return this; }
public Integer getScopeType() { return scopeType; }
public Workflow setScopeType(Integer value) { this.scopeType = value; return this; }
public String getCreatedBy() { return createdBy; }
public Workflow setCreatedBy(String value) { this.createdBy = value; return this; }
public Date getCreatedAt() { return createdAt; }
public Workflow setCreatedAt(Date value) { this.createdAt = value; return this; }
public String getUpdatedBy() { return updatedBy; }
public Workflow setUpdatedBy(String value) { this.updatedBy = value; return this; }
public Date getUpdatedAt() { return updatedAt; }
public Workflow setUpdatedAt(Date value) { this.updatedAt = value; return this; }
}
}
Java CreateWorkflowRequest 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 HTTP/1.1
Host: qlcn-api.vsmlab.vn
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CreateWorkflowRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/tvpl.api.ServiceModel">
<Description>String</Description>
<DocumentCode>String</DocumentCode>
<DocumentTypeId>0</DocumentTypeId>
<IsInstance>false</IsInstance>
<MainId>0</MainId>
<Title>String</Title>
</CreateWorkflowRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <Workflow xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/tvpl.data.Models"> <AccountId>0</AccountId> <CreatedAt>0001-01-01T00:00:00</CreatedAt> <CreatedBy>String</CreatedBy> <DeletedAt>0001-01-01T00:00:00</DeletedAt> <DeletedBy>String</DeletedBy> <DepartmentId>0</DepartmentId> <Description>String</Description> <DocumentCode>String</DocumentCode> <DocumentTypeId>0</DocumentTypeId> <Id>0</Id> <IsActive>false</IsActive> <IsDeleted>false</IsDeleted> <IsInstance>false</IsInstance> <MainId>0</MainId> <StatusId>0</StatusId> <Title>String</Title> <UpdatedAt>0001-01-01T00:00:00</UpdatedAt> <UpdatedBy>String</UpdatedBy> </Workflow>