เนื้อหาในหน้านี้

เอกสารอ้างอิง API: การจำลองกระบวนการ

การจำลองกระบวนการช่วยให้คุณทดลองสถานการณ์สมมติบนโมเดลกระบวนการได้ คุณกำหนดเวลาประมวลผล การจัดสรรทรัพยากร และอัตราการมาถึง เพื่อคาดการณ์พฤติกรรมของกระบวนการได้.

แสดงรายการการจำลองของกระบวนการ

Endpoint: GET /v1/tenant/{tenantId}/processes/{processId}/simulations

การยืนยันตัวตน: API key ที่จำกัดขอบเขตตาม tenant · read scope

พารามิเตอร์:

ชื่อ ประเภท ตำแหน่ง จำเป็น คำอธิบาย
tenantId string path ใช่ รูปแบบ: uuid
processId string path ใช่ รูปแบบ: uuid
limit integer query ไม่ จำนวนรายการสูงสุดที่ส่งกลับ
offset integer query ไม่ จำนวนรายการที่ข้าม

การตอบกลับ (200):

รายการการจำลอง

[
	{
		"id": "00000000-0000-0000-0000-000000000000",
		"displayName": "string",
		"datasetName": "string",
		"startTime": "2024-03-15T16:30:00Z",
		"endTime": "2024-03-15T16:30:00Z",
		"useWarmUp": true
	}
]

ข้อผิดพลาด:

  • 400 คำขอไม่ถูกต้อง เช่น นิพจน์ตัวกรองไม่ถูกต้อง กระบวนการไม่มีโมเดล ประเภทไฟล์ที่อัปโหลดไม่รองรับ หรือไม่มีฟิลด์ที่จำเป็น
  • 401 ไม่มี API key, API key ไม่ถูกต้อง ถูกปิดใช้งาน หรือหมดอายุ
  • 404 ไม่พบทรัพยากร

สร้างการจำลอง (หากระบุ id การเรียกซ้ำจะไม่สร้างรายการซ้ำ)

Endpoint: POST /v1/tenant/{tenantId}/processes/{processId}/simulations

การยืนยันตัวตน: API key ที่จำกัดขอบเขตตาม tenant · write scope

พารามิเตอร์:

ชื่อ ประเภท ตำแหน่ง จำเป็น คำอธิบาย
tenantId string path ใช่ รูปแบบ: uuid
processId string path ใช่ รูปแบบ: uuid

เนื้อหาคำขอ:

{
	"id": "00000000-0000-0000-0000-000000000000",
	"displayName": "string",
	"datasetName": "string",
	"startTime": "2024-03-15T16:30:00Z",
	"endTime": "2024-03-15T16:30:00Z",
	"useWarmUp": true
}
ฟิลด์ ประเภท จำเป็น คำอธิบาย
id string ไม่ id สำหรับส่งคำขอซ้ำโดยไม่สร้างรายการซ้ำ (ต้องเป็น UUID)
รูปแบบ: uuid
displayName string ไม่ ชื่อการจำลอง
ค่าเริ่มต้น: New Simulation
datasetName string ไม่ ชื่อชุดข้อมูลที่ใช้เรียกใช้การจำลอง
startTime string ไม่ เวลาเริ่มการจำลอง
รูปแบบ: date-time
endTime string ไม่ เวลาสิ้นสุดการจำลอง
รูปแบบ: date-time
useWarmUp boolean ไม่ ระบุว่าจะไม่นำช่วงวอร์มอัปมาคำนวณหรือไม่
ค่าเริ่มต้น: false

การตอบกลับ (201):

สร้างการจำลองแล้ว

{
	"simulation": {
		"id": "00000000-0000-0000-0000-000000000000",
		"displayName": "string"
	},
	"message": "string"
}
ฟิลด์ ประเภท จำเป็น คำอธิบาย
simulation object ใช่
message string ใช่

ข้อผิดพลาด:

  • 400 คำขอไม่ถูกต้อง เช่น นิพจน์ตัวกรองไม่ถูกต้อง กระบวนการไม่มีโมเดล ประเภทไฟล์ที่อัปโหลดไม่รองรับ หรือไม่มีฟิลด์ที่จำเป็น
  • 401 ไม่มี API key, API key ไม่ถูกต้อง ถูกปิดใช้งาน หรือหมดอายุ
  • 404 ไม่พบทรัพยากร
  • 409 คำขอขัดแย้งกับสถานะปัจจุบัน (เช่น ติดข้อจำกัดจำนวนที่นั่งผู้ใช้ หรือใช้ id ซ้ำ)

ดูการจำลองพร้อมการตั้งค่าองค์ประกอบ คุณลักษณะ และทรัพยากร

Endpoint: GET /v1/tenant/{tenantId}/processes/{processId}/simulations/{simulationId}

การยืนยันตัวตน: API key ที่จำกัดขอบเขตตาม tenant · read scope

พารามิเตอร์:

ชื่อ ประเภท ตำแหน่ง จำเป็น คำอธิบาย
tenantId string path ใช่ รูปแบบ: uuid
processId string path ใช่ รูปแบบ: uuid
simulationId string path ใช่ รูปแบบ: uuid

การตอบกลับ (200):

รายละเอียดการจำลอง

{
	"simulation": {
		"id": "00000000-0000-0000-0000-000000000000",
		"displayName": "string",
		"datasetName": "string",
		"startTime": "2024-03-15T16:30:00Z",
		"endTime": "2024-03-15T16:30:00Z",
		"useWarmUp": true
	},
	"elementSettings": [
		{
			"simulationId": "00000000-0000-0000-0000-000000000000",
			"modelElementId": "00000000-0000-0000-0000-000000000000",
			"settings": {
				"processingTimeDistribution": [
					{
						"timeslot": {
							"periodicity": "Always"
						},
						"conditions": [
							{
								"type": "Values",
								"attribute": "string",
								"values": [
									"string"
								]
							}
						],
						"distribution": {
							"type": "Fixed",
							"value": 0
						},
						"timeUnit": "seconds",
						"rateUnit": "perTimeSlot"
					}
				],
				"processingTimeUnit": "seconds",
				"updateAttributeRules": [
					{
						"id": "string",
						"attributeId": "00000000-0000-0000-0000-000000000000",
						"timeslot": {
							"periodicity": "Always"
						},
						"conditions": [
							{
								"type": "Values",
								"attribute": "string",
								"values": [
									"string"
								]
							}
						],
						"newValue": "string",
						"isEnabled": true
					}
				],
				"requiredResources": [
					{
						"resourceId": "00000000-0000-0000-0000-000000000000",
						"amount": 0
					}
				],
				"caseStartsDistribution": [
					{
						"timeslot": {
							"periodicity": "Always"
						},
						"conditions": [
							{
								"type": "Values",
								"attribute": "string",
								"values": [
									"string"
								]
							}
						],
						"distribution": {
							"type": "Fixed",
							"value": 0
						},
						"timeUnit": "seconds",
						"rateUnit": "perTimeSlot"
					}
				],
				"caseStartsTimeUnit": "perTimeSlot",
				"capacityInterval": "perHour",
				"skipChanceDistribution": [
					{
						"timeslot": {
							"periodicity": "Always"
						},
						"conditions": [
							{
								"type": "Values",
								"attribute": "string",
								"values": [
									"string"
								]
							}
						],
						"distribution": {
							"type": "Fixed",
							"value": 0
						},
						"timeUnit": "seconds",
						"rateUnit": "perTimeSlot"
					}
				],
				"queueStrategy": "fifo",
				"chanceToTakeDistribution": [
					{
						"timeslot": {
							"periodicity": "Always"
						},
						"conditions": [
							{
								"type": "Values",
								"attribute": "string",
								"values": [
									"string"
								]
							}
						],
						"distribution": {
							"type": "Fixed",
							"value": 0
						},
						"timeUnit": "seconds",
						"rateUnit": "perTimeSlot"
					}
				]
			}
		}
	],
	"attributes": [
		{
			"id": "00000000-0000-0000-0000-000000000000",
			"simulationId": "00000000-0000-0000-0000-000000000000",
			"displayName": "string",
			"valueDistribution": {
				"type": "Number",
				"numberDistributions": [
					{
						"timeslot": {
							"periodicity": "Always"
						},
						"conditions": [
							{
								"type": "Values",
								"attribute": "string",
								"values": [
									"string"
								]
							}
						],
						"distribution": {
							"type": "Fixed",
							"value": 0
						},
						"timeUnit": "seconds",
						"rateUnit": "perTimeSlot",
						"id": "string",
						"isEnabled": true,
						"isDefault": true
					}
				],
				"textDistributions": [
					{
						"id": "string",
						"timeslot": {
							"periodicity": "Always"
						},
						"isEnabled": true,
						"isDefault": true,
						"mode": "list",
						"textValues": [
							{
								"id": "string",
								"value": "string",
								"chance": 0
							}
						]
					}
				]
			},
			"simulationAttributeType": "string"
		}
	],
	"resources": [
		{
			"id": "00000000-0000-0000-0000-000000000000",
			"simulationId": "00000000-0000-0000-0000-000000000000",
			"displayName": "string",
			"levelDistribution": [
				{
					"timeslot": {
						"periodicity": "Always"
					},
					"conditions": [
						{
							"type": "Values",
							"attribute": "string",
							"values": [
								"string"
							]
						}
					],
					"distribution": {
						"type": "Fixed",
						"value": 0
					},
					"timeUnit": "seconds",
					"rateUnit": "perTimeSlot"
				}
			],
			"attributeId": "00000000-0000-0000-0000-000000000000"
		}
	]
}
ฟิลด์ ประเภท จำเป็น คำอธิบาย
simulation object ใช่ ข้อมูลสรุปการจำลอง
elementSettings object[] ใช่ การตั้งค่าการจำลองแยกตามองค์ประกอบ
attributes object[] ใช่ คุณลักษณะที่จำลอง
resources object[] ใช่ กลุ่มทรัพยากร

ข้อผิดพลาด:

  • 400 คำขอไม่ถูกต้อง เช่น นิพจน์ตัวกรองไม่ถูกต้อง กระบวนการไม่มีโมเดล ประเภทไฟล์ที่อัปโหลดไม่รองรับ หรือไม่มีฟิลด์ที่จำเป็น
  • 401 ไม่มี API key, API key ไม่ถูกต้อง ถูกปิดใช้งาน หรือหมดอายุ
  • 404 ไม่พบทรัพยากร

อัปเดตการจำลอง (ฟิลด์และ/หรือการตั้งค่าองค์ประกอบ)

Endpoint: PUT /v1/tenant/{tenantId}/processes/{processId}/simulations/{simulationId}

การยืนยันตัวตน: API key ที่จำกัดขอบเขตตาม tenant · write scope

พารามิเตอร์:

ชื่อ ประเภท ตำแหน่ง จำเป็น คำอธิบาย
tenantId string path ใช่ รูปแบบ: uuid
processId string path ใช่ รูปแบบ: uuid
simulationId string path ใช่ รูปแบบ: uuid

เนื้อหาคำขอ:

{
	"displayName": "string",
	"datasetName": "string",
	"startTime": "2024-03-15T16:30:00Z",
	"endTime": "2024-03-15T16:30:00Z",
	"useWarmUp": true,
	"elementSettings": [
		{
			"modelElementId": "00000000-0000-0000-0000-000000000000",
			"settings": {
				"caseStartsDistribution": [
					{
						"timeslot": {
							"periodicity": "Always"
						},
						"conditions": [
							{
								"type": "Values",
								"attribute": "string",
								"values": [
									"string"
								]
							}
						],
						"distribution": {
							"type": "Fixed",
							"value": 0
						},
						"timeUnit": "seconds",
						"rateUnit": "perTimeSlot"
					}
				],
				"processingTimeDistribution": [
					{
						"timeslot": {
							"periodicity": "Always"
						},
						"conditions": [
							{
								"type": "Values",
								"attribute": "string",
								"values": [
									"string"
								]
							}
						],
						"distribution": {
							"type": "Fixed",
							"value": 0
						},
						"timeUnit": "seconds",
						"rateUnit": "perTimeSlot"
					}
				]
			}
		}
	]
}
ฟิลด์ ประเภท จำเป็น คำอธิบาย
displayName string ไม่ ชื่อการจำลอง
datasetName string ไม่ ชื่อชุดข้อมูลที่ใช้ในการจำลอง
startTime string ไม่ เวลาเริ่มการจำลอง
รูปแบบ: date-time
endTime string ไม่ เวลาสิ้นสุดการจำลอง
รูปแบบ: date-time
useWarmUp boolean ไม่ ระบุว่าจะตัดช่วงอุ่นเครื่องออกหรือไม่
elementSettings object[] ไม่ การตั้งค่าที่ใช้แทนค่าของแต่ละองค์ประกอบ

คำตอบ (200):

อัปเดตการจำลองแล้ว

{
	"message": "string"
}
ฟิลด์ ประเภท จำเป็น คำอธิบาย
message string ใช่

ข้อผิดพลาด:

  • 400 คำขอไม่ถูกต้อง เช่น นิพจน์ตัวกรองไม่ถูกต้อง กระบวนการไม่มีโมเดล ประเภทไฟล์ที่อัปโหลดไม่รองรับ หรือไม่มีฟิลด์ที่จำเป็น
  • 401 ไม่มี API key, API key ไม่ถูกต้อง ถูกปิดใช้งาน หรือหมดอายุ
  • 404 ไม่พบทรัพยากร

ลบการจำลองอย่างถาวร

Endpoint: DELETE /v1/tenant/{tenantId}/processes/{processId}/simulations/{simulationId}

การยืนยันตัวตน: API key ที่กำหนดขอบเขตตาม tenant · write scope

พารามิเตอร์:

ชื่อ ประเภท ตำแหน่ง จำเป็น คำอธิบาย
tenantId string path ใช่ รูปแบบ: uuid
processId string path ใช่ รูปแบบ: uuid
simulationId string path ใช่ รูปแบบ: uuid

คำตอบ (200):

ลบการจำลองแล้ว

{
	"message": "string"
}
ฟิลด์ ประเภท จำเป็น คำอธิบาย
message string ใช่

ข้อผิดพลาด:

  • 400 คำขอไม่ถูกต้อง เช่น นิพจน์ตัวกรองไม่ถูกต้อง กระบวนการไม่มีโมเดล ประเภทไฟล์ที่อัปโหลดไม่รองรับ หรือไม่มีฟิลด์ที่จำเป็น
  • 401 ไม่มี API key, API key ไม่ถูกต้อง ถูกปิดใช้งาน หรือหมดอายุ
  • 404 ไม่พบทรัพยากร

Endpoint เหล่านี้ใช้ AI สร้างการตั้งค่าการจำลองโดยอัตโนมัติตามโมเดลกระบวนการ.

สร้างการตั้งค่าการจำลองด้วย AI (ทำงานแบบ async และตรวจสอบสถานะผ่าน endpoint)

Endpoint: POST /v1/tenant/{tenantId}/processes/{processId}/simulations/{simulationId}/generate-settings

การยืนยันตัวตน: API key ที่กำหนดขอบเขตตาม tenant · write scope · จำกัดอัตรา 2 req/s (สูงสุดชั่วขณะ 4)

พารามิเตอร์:

ชื่อ ประเภท ตำแหน่ง จำเป็น คำอธิบาย
tenantId string path ใช่ รูปแบบ: uuid
processId string path ใช่ รูปแบบ: uuid
simulationId string path ใช่ รูปแบบ: uuid

เนื้อหาคำขอ:

{
	"processDescription": "string",
	"additionalContext": "string"
}
ฟิลด์ ประเภท จำเป็น คำอธิบาย
processDescription string ไม่
additionalContext string ไม่

คำตอบ (200):

เริ่มสร้างแล้ว / ผลลัพธ์

{
	"message": "string"
}
ฟิลด์ ประเภท จำเป็น คำอธิบาย
message string ใช่

ข้อผิดพลาด:

  • 400 คำขอไม่ถูกต้อง เช่น นิพจน์ตัวกรองไม่ถูกต้อง กระบวนการไม่มีโมเดล ประเภทไฟล์ที่อัปโหลดไม่รองรับ หรือไม่มีฟิลด์ที่จำเป็น
  • 401 ไม่มี API key, API key ไม่ถูกต้อง ถูกปิดใช้งาน หรือหมดอายุ
  • 404 ไม่พบทรัพยากร

ตรวจสอบสถานะการสร้างการตั้งค่าการจำลอง

Endpoint: GET /v1/tenant/{tenantId}/processes/{processId}/simulations/{simulationId}/generate-settings/status

การยืนยันตัวตน: API key ที่กำหนดขอบเขตตาม tenant · write scope

พารามิเตอร์:

ชื่อ ประเภท ตำแหน่ง จำเป็น คำอธิบาย
tenantId string path ใช่ รูปแบบ: uuid
processId string path ใช่ รูปแบบ: uuid
simulationId string path ใช่ รูปแบบ: uuid

คำตอบ (200):

สถานะการสร้าง

{
	"message": "string"
}
ฟิลด์ ประเภท จำเป็น คำอธิบาย
message string ใช่

ข้อผิดพลาด:

  • 400 คำขอไม่ถูกต้อง เช่น นิพจน์ตัวกรองไม่ถูกต้อง กระบวนการไม่มีโมเดล ประเภทไฟล์ที่อัปโหลดไม่รองรับ หรือไม่มีฟิลด์ที่จำเป็น
  • 401 ไม่มี API key, API key ไม่ถูกต้อง ถูกปิดใช้งาน หรือหมดอายุ
  • 404 ไม่พบทรัพยากร

เริ่มการจำลอง (ทำงานแบบ async และบันทึกผลลัพธ์ใน datatables ของกระบวนการ)

Endpoint: POST /v1/tenant/{tenantId}/processes/{processId}/simulations/{simulationId}/run

การยืนยันตัวตน: API key ที่กำหนดขอบเขตตาม tenant · write scope · จำกัดอัตรา 5 req/s (สูงสุดชั่วขณะ 10)

พารามิเตอร์:

ชื่อ ประเภท ตำแหน่ง จำเป็น คำอธิบาย
tenantId string path ใช่ รูปแบบ: uuid
processId string path ใช่ รูปแบบ: uuid
simulationId string path ใช่ รูปแบบ: uuid

คำตอบ (200):

เริ่มการจำลองแล้ว

{
	"message": "string"
}
ฟิลด์ ประเภท จำเป็น คำอธิบาย
message string ใช่

ข้อผิดพลาด:

  • 400 คำขอไม่ถูกต้อง เช่น นิพจน์ตัวกรองไม่ถูกต้อง กระบวนการไม่มีโมเดล ประเภทไฟล์ที่อัปโหลดไม่รองรับ หรือไม่มีฟิลด์ที่จำเป็น
  • 401 ไม่มี API key, API key ไม่ถูกต้อง ถูกปิดใช้งาน หรือหมดอายุ
  • 404 ไม่พบทรัพยากร

ดูสถานะการจำลองครั้งล่าสุด (อ้างอิงจาก datatable ผลลัพธ์)

Endpoint: GET /v1/tenant/{tenantId}/processes/{processId}/simulations/{simulationId}/run/status

การยืนยันตัวตน: API key ที่กำหนดขอบเขตตาม tenant · read scope

พารามิเตอร์:

ชื่อ ประเภท ตำแหน่ง จำเป็น คำอธิบาย
tenantId string path ใช่ รูปแบบ: uuid
processId string path ใช่ รูปแบบ: uuid
simulationId string path ใช่ รูปแบบ: uuid

คำตอบ (200):

สถานะการทำงาน

{
	"state": "notStarted",
	"startedAt": "2024-03-15T16:30:00Z",
	"completedAt": "2024-03-15T16:30:00Z",
	"step": "string",
	"casesSimulated": 0,
	"targetCases": 0,
	"eventsGenerated": 0,
	"errorMessage": "string",
	"simulationId": "00000000-0000-0000-0000-000000000000"
}
ฟิลด์ ประเภท จำเป็น คำอธิบาย
state notStarted | running | processing | ready | error ใช่ ค่าที่อนุญาต: notStarted, running, processing, ready, error
startedAt string ไม่ รูปแบบ: date-time
completedAt string ไม่ รูปแบบ: date-time
step string ไม่
casesSimulated number ไม่
targetCases number ไม่
eventsGenerated number ไม่
errorMessage string ไม่
simulationId string ใช่ รูปแบบ: uuid

ข้อผิดพลาด:

  • 400 คำขอไม่ถูกต้อง เช่น นิพจน์ตัวกรองไม่ถูกต้อง กระบวนการไม่มีโมเดล ประเภทไฟล์ที่อัปโหลดไม่รองรับ หรือไม่มีฟิลด์ที่จำเป็น
  • 401 ไม่มี API key, API key ไม่ถูกต้อง ถูกปิดใช้งาน หรือหมดอายุ
  • 404 ไม่พบทรัพยากร

ออกแบบกระบวนการให้ดีขึ้น วางโครงสร้างที่เชื่อมโยงกัน และควบคุมได้.

เริ่มใช้งานได้ทันที ไม่ต้องใช้บัตรเครดิตและไม่ต้องรอ เปลี่ยนวิธีทำงานขององค์กรให้เป็นแบบจำลองกระบวนการที่ชัดเจนและเชื่อมโยงกัน.

สร้างสถาปัตยกรรมกระบวนการ กำหนดเจ้าของและการควบคุม พร้อมจัดบทบาทและความรับผิดชอบให้สอดคล้องกันในทุกระดับ.

เริ่มทดลองใช้ฟรี แล้วสร้างรากฐานที่เชื่อถือได้สำหรับกำกับดูแล จัดการ และปรับปรุงกระบวนการอย่างต่อเนื่อง.