tvpl.api

<back to all web services

CreateWorkflowStepRequest

Requires Authentication
The following routes are available for this service:
POST/WorkflowStep/update
import java.math.*
import java.util.*
import net.servicestack.client.*


open class CreateWorkflowStepRequest : WorkflowStep()
{
}

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 WorkflowStepResponse : IResponseRequest
{
    var code:Int? = null
    var message:String? = null
    var insertedId:Int? = null
}

Kotlin CreateWorkflowStepRequest 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.

POST /WorkflowStep/update HTTP/1.1 
Host: etc-api.vsmlab.vn 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	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
				}
			]
		}
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	code: 0,
	message: String,
	insertedId: 0
}