tvpl.api

<back to all web services

GetWorkflowStepRequest

Requires Authentication
The following routes are available for this service:
GET/WorkflowStep/by-workflow
import java.math.*
import java.util.*
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*


open class GetWorkflowStepRequest
{
    var workflowId:Int? = null
}

open class GetWorkflowStepResponse : IResponseRequest
{
    var code:Int? = null
    var message:String? = null
    @SerializedName("data") var Data:ArrayList<WorkflowStepDetail> = ArrayList<WorkflowStepDetail>()
}

open class WorkflowStepDetail : WorkflowStep()
{
    var departments:ArrayList<Category> = ArrayList<Category>()
    var coDepartments:ArrayList<Category> = ArrayList<Category>()
    var basisDocuments:ArrayList<SimpleDocumentRelation> = ArrayList<SimpleDocumentRelation>()
    var referenceDocuments:ArrayList<SimpleDocumentRelation> = ArrayList<SimpleDocumentRelation>()
    var mainAssignees:ArrayList<WorkFlowProfile> = ArrayList<WorkFlowProfile>()
    var supportingAssignees:ArrayList<WorkFlowProfile> = ArrayList<WorkFlowProfile>()
    var statusKey:String? = null
    var statusText:String? = null
    @Ignore()
    var canRead:Boolean? = null

    @Ignore()
    var canWrite:Boolean? = null

    @Ignore()
    var canUpload:Boolean? = null

    var reasonReturn:String? = null
    var returnDate:Date? = null
}

open class WorkflowStep
{
    var id:Int? = null
    @References(Document.class)
    var workflowId:Int? = null

    var stepOrder:Int? = null
    var statusId:Int? = null
    @Required()
    @StringLength(255)
    var stepName:String? = null

    @Required()
    var isRequired:Boolean? = null

    var slaLegalValue:Int? = null
    var slaLegalIsByDay:Boolean? = null
    var slaInternalValue:Int? = null
    var slaInternalIsByDay:Boolean? = null
    var requireAttachment:Boolean? = null
    var isUsingForm:Boolean? = null
    @Required()
    var description:String? = null

    var createdBy:Int? = null
    @Ignore()
    var departmentIds:ArrayList<Int> = ArrayList<Int>()

    @Ignore()
    var mainAssigneeIds:ArrayList<Int> = ArrayList<Int>()

    @Ignore()
    var coDepartmentIds:ArrayList<Int> = ArrayList<Int>()

    @Ignore()
    var supportingAssigneeIds:ArrayList<Int> = ArrayList<Int>()

    @Ignore()
    var stepBasisDocumentIds:ArrayList<Int> = ArrayList<Int>()

    @Ignore()
    var attachedDocuments:ArrayList<StepAttached> = ArrayList<StepAttached>()
}

open class StepAttached
{
    var id:Int? = null
    var documentCode:String? = null
    var title:String? = null
    var isSequentialSigning:Boolean? = null
    var pendingSignFile:UploadedFiles? = null
    var originalFile:UploadedFiles? = null
    var signerConfigs:ArrayList<SignerConfigDetail> = ArrayList<SignerConfigDetail>()
}

open class UploadedFiles : BasicUploadedFile()
{
    var id:Long? = null
    var uploadedFile:String? = null
    var subDocumentId:Int? = null
    var stepId:Int? = null
    var code:Int? = null
}

open class BasicUploadedFile
{
    var fileName:String? = null
    var filekey:String? = null
    var fileUrl:String? = null
    var checksum:String? = null
    var eTag:String? = null
    var fileSize:Long? = null
}

open class SignerConfigDetail : SignerConfig()
{
    var profile:WorkFlowProfile? = null
    var role:Roles? = null
}

open class SignerConfig : BasicSignerConfig()
{
    var id:Int? = null
    var documentId:Int? = null
    var stepId:Int? = null
}

open class BasicSignerConfig
{
    var subDocumentId:Int? = null
    var departmentId:Int? = null
    var signerType:Short? = null
    var signerRefId:Int? = null
    @Ignore()
    var signerRefText:String? = null

    var actionType:Short? = null
    var orderIndex:Int? = null
}

open class WorkFlowProfile
{
    var id:Int? = null
    var name:String? = null
    var fullName:String? = null
    var email:String? = null
    var departmentId:Int? = null
    var avatar:String? = null
    var telephone:String? = null
    var birthday:Date? = null
    var confirmStatus:Int? = null
    var confirmStatusText:String? = null
    var signAt:Date? = null
    var signedFileId:Long? = null
    var originalFileId:Int? = null
    var signedFileName:String? = null
    var isSigned:Boolean? = null
    var signStatusText:String? = null
}

open class Roles
{
    var id:Int? = null
    @StringLength(50)
    var name:String? = null

    var createdAt:Date? = null
    var deletedAt:Date? = null
    var updatedAt:Date? = null
    var updatedBy:Int? = null
    var deletedBy:Int? = null
    var createdBy:Int? = null
    @Ignore()
    var permission:ArrayList<String> = ArrayList<String>()
}

open class Category : CreateCategoryModel()
{
    var id:Int? = null
    var level:Int? = null
    var key:String? = null
    var sortOrder:Int? = null
    var lastUpdate:Date? = null
    @Ignore()
    var children:ArrayList<Category> = ArrayList<Category>()
}

open class CreateCategoryModel
{
    var name:String? = null
    var description:String? = null
    @SerializedName("type") var Type:CategoryTypes? = null
    var isParty:Boolean? = null
    @Ignore()
    var childList:ArrayList<Int> = ArrayList<Int>()
}

enum class CategoryTypes
{
    Department,
    PartyGroup,
    DocGroup,
    DocType,
    IssuingAgency,
    Status,
    Subjects,
    Workflow,
    WorkStatus,
    StepStatus,
    SignStatus,
}

open class SimpleDocumentRelation
{
    var id:Int? = null
    var title:String? = null
    var documentCode:String? = null
    var publicationDate:Date? = null
    var isSequentialSigning:Boolean? = null
    var statusText:String? = null
    var documentTypeId:Int? = null
}

Kotlin GetWorkflowStepRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /WorkflowStep/by-workflow HTTP/1.1 
Host: etc-api.vsmlab.vn 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	code: 0,
	message: String,
	data: 
	[
		{
			departments: 
			[
				{
					id: 0,
					level: 0,
					key: String,
					sortOrder: 0,
					lastUpdate: "0001-01-01T00:00:00.0000000+07:06",
					children: 
					[
						{
							id: 0,
							level: 0,
							key: String,
							sortOrder: 0,
							lastUpdate: "0001-01-01T00:00:00.0000000+07:06",
							children: 
							[
								{
									id: 0,
									level: 0,
									key: String,
									sortOrder: 0,
									lastUpdate: "0001-01-01T00:00:00.0000000+07:06",
									name: String,
									description: String,
									type: Department,
									isParty: False,
									childList: 
									[
										0
									]
								}
							],
							name: String,
							description: String,
							type: Department,
							isParty: False,
							childList: 
							[
								0
							]
						}
					],
					name: String,
					description: String,
					type: Department,
					isParty: False,
					childList: 
					[
						0
					]
				}
			],
			coDepartments: 
			[
				{
					id: 0,
					level: 0,
					key: String,
					sortOrder: 0,
					lastUpdate: "0001-01-01T00:00:00.0000000+07:06",
					children: 
					[
						{
							id: 0,
							level: 0,
							key: String,
							sortOrder: 0,
							lastUpdate: "0001-01-01T00:00:00.0000000+07:06",
							children: 
							[
								{
									id: 0,
									level: 0,
									key: String,
									sortOrder: 0,
									lastUpdate: "0001-01-01T00:00:00.0000000+07:06",
									name: String,
									description: String,
									type: Department,
									isParty: False,
									childList: 
									[
										0
									]
								}
							],
							name: String,
							description: String,
							type: Department,
							isParty: False,
							childList: 
							[
								0
							]
						}
					],
					name: String,
					description: String,
					type: Department,
					isParty: False,
					childList: 
					[
						0
					]
				}
			],
			basisDocuments: 
			[
				{
					id: 0,
					title: String,
					documentCode: String,
					publicationDate: "0001-01-01T00:00:00.0000000+07:06",
					isSequentialSigning: False,
					statusText: String,
					documentTypeId: 0
				}
			],
			referenceDocuments: 
			[
				{
					id: 0,
					title: String,
					documentCode: String,
					publicationDate: "0001-01-01T00:00:00.0000000+07:06",
					isSequentialSigning: False,
					statusText: String,
					documentTypeId: 0
				}
			],
			mainAssignees: 
			[
				{
					id: 0,
					name: String,
					fullName: String,
					email: String,
					departmentId: 0,
					avatar: String,
					telephone: String,
					birthday: "0001-01-01T00:00:00.0000000+07:06",
					confirmStatus: 0,
					confirmStatusText: String,
					signAt: "0001-01-01T00:00:00.0000000+07:06",
					signedFileId: 0,
					originalFileId: 0,
					signedFileName: String,
					isSigned: False,
					signStatusText: String
				}
			],
			supportingAssignees: 
			[
				{
					id: 0,
					name: String,
					fullName: String,
					email: String,
					departmentId: 0,
					avatar: String,
					telephone: String,
					birthday: "0001-01-01T00:00:00.0000000+07:06",
					confirmStatus: 0,
					confirmStatusText: String,
					signAt: "0001-01-01T00:00:00.0000000+07:06",
					signedFileId: 0,
					originalFileId: 0,
					signedFileName: String,
					isSigned: False,
					signStatusText: String
				}
			],
			statusKey: String,
			statusText: String,
			canRead: False,
			canWrite: False,
			canUpload: False,
			reasonReturn: String,
			returnDate: "0001-01-01T00:00:00.0000000+07:06",
			id: 0,
			workflowId: 0,
			stepOrder: 0,
			statusId: 0,
			stepName: String,
			isRequired: False,
			slaLegalValue: 0,
			slaLegalIsByDay: False,
			slaInternalValue: 0,
			slaInternalIsByDay: False,
			requireAttachment: False,
			isUsingForm: False,
			description: String,
			createdBy: 0,
			departmentIds: 
			[
				0
			],
			mainAssigneeIds: 
			[
				0
			],
			coDepartmentIds: 
			[
				0
			],
			supportingAssigneeIds: 
			[
				0
			],
			stepBasisDocumentIds: 
			[
				0
			],
			attachedDocuments: 
			[
				{
					id: 0,
					documentCode: String,
					title: String,
					isSequentialSigning: False,
					pendingSignFile: 
					{
						id: 0,
						uploadedFile: String,
						subDocumentId: 0,
						stepId: 0,
						code: 0,
						fileName: String,
						filekey: String,
						fileUrl: String,
						checksum: String,
						eTag: String,
						fileSize: 0
					},
					originalFile: 
					{
						id: 0,
						uploadedFile: String,
						subDocumentId: 0,
						stepId: 0,
						code: 0,
						fileName: String,
						filekey: String,
						fileUrl: String,
						checksum: String,
						eTag: String,
						fileSize: 0
					},
					signerConfigs: 
					[
						{
							profile: 
							{
								id: 0,
								name: String,
								fullName: String,
								email: String,
								departmentId: 0,
								avatar: String,
								telephone: String,
								birthday: "0001-01-01T00:00:00.0000000+07:06",
								confirmStatus: 0,
								confirmStatusText: String,
								signAt: "0001-01-01T00:00:00.0000000+07:06",
								signedFileId: 0,
								originalFileId: 0,
								signedFileName: String,
								isSigned: False,
								signStatusText: String
							},
							role: 
							{
								id: 0,
								name: String,
								createdAt: "0001-01-01T00:00:00.0000000+07:06",
								deletedAt: "0001-01-01T00:00:00.0000000+07:06",
								updatedAt: "0001-01-01T00:00:00.0000000+07:06",
								updatedBy: 0,
								deletedBy: 0,
								createdBy: 0,
								permission: 
								[
									String
								]
							},
							id: 0,
							documentId: 0,
							stepId: 0,
							subDocumentId: 0,
							departmentId: 0,
							signerType: 0,
							signerRefId: 0,
							signerRefText: String,
							actionType: 0,
							orderIndex: 0
						}
					]
				}
			]
		}
	]
}