tvpl.api

<back to all web services

GetWorkflowStepRequest

Requires Authentication
The following routes are available for this service:
GET/WorkflowStep/by-workflow
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports tvpl.api.ServiceModel
Imports tvpl.data.Models
Imports tvpl.data.Constant

Namespace Global

    Namespace tvpl.api.ServiceModel

        Public Partial Class GetWorkflowStepRequest
            Public Overridable Property WorkflowId As Integer
        End Class

        Public Partial Class GetWorkflowStepResponse
            Implements IResponseRequest
            Public Sub New()
                Data = New List(Of WorkflowStepDetail)
            End Sub

            Public Overridable Property Code As Integer
            Public Overridable Property Message As String
            Public Overridable Property Data As List(Of WorkflowStepDetail)
        End Class
    End Namespace

    Namespace tvpl.data.Constant

        Public Enum AccessType
            Public
            Restricted
        End Enum

        Public Enum CategoryTypes
            Department
            PartyGroup
            DocGroup
            DocType
            IssuingAgency
            Status
            Subjects
            Workflow
        End Enum
    End Namespace

    Namespace tvpl.data.Models

        Public Partial Class BasicUploadedFile
            Public Overridable Property FileName As String
            Public Overridable Property Filekey As String
            Public Overridable Property FileUrl As String
            Public Overridable Property Checksum As String
            Public Overridable Property ETag As String
            Public Overridable Property FileSize As Long
        End Class

        Public Partial Class Category
            Inherits CreateCategoryModel
            Public Sub New()
                Children = New List(Of Category)
            End Sub

            Public Overridable Property Id As Integer
            Public Overridable Property Level As Integer
            Public Overridable Property SortOrder As Integer
            Public Overridable Property LastUpdate As Nullable(Of Date)
            <Ignore>
            Public Overridable Property Children As List(Of Category)
        End Class

        Public Partial Class CreateCategoryModel
            Public Sub New()
                ChildList = New List(Of Integer)
            End Sub

            Public Overridable Property Name As String
            Public Overridable Property Description As String
            Public Overridable Property Type As CategoryTypes
            Public Overridable Property IsParty As Boolean
            <Ignore>
            Public Overridable Property ChildList As List(Of Integer)
        End Class

        Public Partial Class SimpleDocumentRelation
            Public Overridable Property Id As Integer
            Public Overridable Property Title As String
            Public Overridable Property DocumentCode As String
            Public Overridable Property PublicationDate As Nullable(Of Date)
        End Class

        Public Partial Class UploadedFileAttach
            Inherits UploadedFileModel
            Public Overridable Property FileType As String
            Public Overridable Property SubDocumentId As Nullable(Of Integer)
            Public Overridable Property StepId As Nullable(Of Integer)
        End Class

        Public Partial Class UploadedFileModel
            Inherits BasicUploadedFile
            Public Overridable Property Id As Long
            Public Overridable Property AccessType As AccessType
            Public Overridable Property CreatedBy As Integer
            Public Overridable Property CreatedDate As Date
        End Class

        Public Partial Class WorkFlowProfile
            Public Overridable Property Id As Integer
            Public Overridable Property FullName As String
            Public Overridable Property Email As String
            Public Overridable Property DepartmentId As Nullable(Of Integer)
            Public Overridable Property Avatar As String
            Public Overridable Property Telephone As String
            Public Overridable Property Birthday As Nullable(Of Date)
            Public Overridable Property ConfirmStatus As Nullable(Of Integer)
        End Class

        Public Partial Class WorkflowStep
            Public Sub New()
                DepartmentIds = New List(Of Integer)
                StepBasisDocumentIds = New List(Of Integer)
                StepAttachedIds = New List(Of Integer)
                MainAssigneeIds = New List(Of Integer)
            End Sub

            Public Overridable Property Id As Integer
            <References(GetType(Document))>
            Public Overridable Property WorkflowId As Integer

            Public Overridable Property StepOrder As Nullable(Of Integer)
            <Required>
            <StringLength(255)>
            Public Overridable Property StepName As String

            <Required>
            Public Overridable Property IsRequired As Boolean

            Public Overridable Property SLALegalValue As Nullable(Of Integer)
            Public Overridable Property SLALegalIsByDay As Nullable(Of Boolean)
            Public Overridable Property SLAInternalValue As Nullable(Of Integer)
            Public Overridable Property SLAInternalIsByDay As Nullable(Of Boolean)
            Public Overridable Property RequireAttachment As Boolean
            <Required>
            Public Overridable Property Description As String

            Public Overridable Property CreatedBy As Integer
            <Ignore>
            Public Overridable Property DepartmentIds As List(Of Integer)

            <Ignore>
            Public Overridable Property StepBasisDocumentIds As List(Of Integer)

            <Ignore>
            Public Overridable Property StepAttachedIds As List(Of Integer)

            <Ignore>
            Public Overridable Property MainAssigneeIds As List(Of Integer)
        End Class

        Public Partial Class WorkflowStepDetail
            Inherits WorkflowStep
            Public Sub New()
                Departments = New List(Of Category)
                BasisDocuments = New List(Of SimpleDocumentRelation)
                AttachedDocuments = New List(Of SimpleDocumentRelation)
                ReferenceDocuments = New List(Of SimpleDocumentRelation)
                MainAssignees = New List(Of WorkFlowProfile)
                AttachFiles = New List(Of UploadedFileAttach)
            End Sub

            Public Overridable Property Departments As List(Of Category)
            Public Overridable Property BasisDocuments As List(Of SimpleDocumentRelation)
            Public Overridable Property AttachedDocuments As List(Of SimpleDocumentRelation)
            Public Overridable Property ReferenceDocuments As List(Of SimpleDocumentRelation)
            Public Overridable Property MainAssignees As List(Of WorkFlowProfile)
            Public Overridable Property AttachFiles As List(Of UploadedFileAttach)
        End Class
    End Namespace
End Namespace

VB.NET 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,
					sortOrder: 0,
					lastUpdate: "0001-01-01T00:00:00.0000000+07:06",
					children: 
					[
						{
							id: 0,
							level: 0,
							sortOrder: 0,
							lastUpdate: "0001-01-01T00:00:00.0000000+07:06",
							children: 
							[
								{
									id: 0,
									level: 0,
									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"
				}
			],
			attachedDocuments: 
			[
				{
					id: 0,
					title: String,
					documentCode: String,
					publicationDate: "0001-01-01T00:00:00.0000000+07:06"
				}
			],
			referenceDocuments: 
			[
				{
					id: 0,
					title: String,
					documentCode: String,
					publicationDate: "0001-01-01T00:00:00.0000000+07:06"
				}
			],
			mainAssignees: 
			[
				{
					id: 0,
					fullName: String,
					email: String,
					departmentId: 0,
					avatar: String,
					telephone: String,
					birthday: "0001-01-01T00:00:00.0000000+07:06",
					confirmStatus: 0
				}
			],
			attachFiles: 
			[
				{
					fileType: String,
					subDocumentId: 0,
					stepId: 0,
					id: 0,
					accessType: Public,
					createdBy: 0,
					fileName: String,
					filekey: String,
					fileUrl: String,
					checksum: String,
					eTag: String,
					fileSize: 0
				}
			],
			id: 0,
			workflowId: 0,
			stepOrder: 0,
			stepName: String,
			isRequired: False,
			slaLegalValue: 0,
			slaLegalIsByDay: False,
			slaInternalValue: 0,
			slaInternalIsByDay: False,
			requireAttachment: False,
			description: String,
			createdBy: 0,
			departmentIds: 
			[
				0
			],
			stepBasisDocumentIds: 
			[
				0
			],
			stepAttachedIds: 
			[
				0
			],
			mainAssigneeIds: 
			[
				0
			]
		}
	]
}