tencent cloud

Cloud Infinite

Task Callback

PDF
フォーカスモード
フォントサイズ
最終更新日: 2025-09-08 16:56:48

Feature Description

Cloud Infinite supports customizing a callback URL. After task completion, the system sends an HTTP POST request to this URL with notification content in the request body. You can confirm it by the configured callback URL to promptly learn about task processing progress and status so that you can perform other business operations.

Callback Content

After task completion, the system will send the callback content to the callback URL you have set, showing the complete node data as follows:
<Response>
<EventName>TaskFinish</EventName>
<JobsDetail>
<Code>Success</Code>
<CreationTime>2022-07-18T15:16:43+0800</CreationTime>
<EndTime>2022-07-18T15:16:44+0800</EndTime>
<Input>
<BucketId>test-1234567890</BucketId>
<Object>input/deer.jpg</Object>
<Region>ap-chongqing</Region>
</Input>
<JobId>c93984**********2084</JobId>
<Message/>
<Operation>
<Output>
<Bucket>test-1234567890</Bucket>
<Object>output/out.jpg</Object>
<Region>ap-chongqing</Region>
</Output>
<PicProcessResult>
<ObjectName>output/out.jpg</ObjectName>
<OriginalInfo>
<Etag>"d5a491cd3d8d071e3212c3478e8e35a1"</Etag>
<ImageInfo>
<Ave>0xc64847</Ave>
<Format>JPEG</Format>
<Height>417</Height>
<Orientation>0</Orientation>
<Quality>68</Quality>
<Width>500</Width>
</ImageInfo>
</OriginalInfo>
<ProcessResult>
<Etag/>
<Format>JPEG</Format>
<Height>500</Height>
<Quality>68</Quality>
<Size>24911</Size>
<Width>417</Width>
</ProcessResult>
</PicProcessResult>
<TemplateId>t1046**********0381</TemplateId>
<TemplateName>test</TemplateName>
<UserData>This is my PicProcess job.</UserData>
<JobLevel>0</JobLevel>
</Operation>
<QueueId>p2911**********5cc774</QueueId>
<StartTime>2022-07-18T15:16:44+0800</StartTime>
<State>Success</State>
<Tag>PicProcess</Tag>
</JobsDetail>
</Response>
The data are as follows:
Node Name (Keyword)
Parent Node
Description
Type
Response
None.
Container for saving results
Container
Container node Response content:
Node Name (Keyword)
Parent Node
Description
Type
EventName
Response
Fixed Value, TaskFinish
String
JobsDetail
Response
Submit the image processing task interface Response.JobsDetail
Container array
If the task is triggered by a workflow, Response.JobsDetail.Input will also include the CosHeaders node, with a data type of Container array.
Container node CosHeaders content:
Node Name (Keyword)
Parent Node
Description
Type
Key
Response.JobsDetail.Input.CosHeaders
Name of the custom Header
String
Value
Response.JobsDetail.Input.CosHeaders
Value of the custom Header
String
If the task is triggered by a workflow, Response.JobsDetail will also include the Workflow node, with a data type of Container.
Container node Workflow content:
Node Name (Keyword)
Parent Node
Description
Type
RunId
Response.Workflow
workflow instance ID
String
WorkflowId
Response.Workflow
workflow ID
String
WorkflowName
Response.Workflow
workflow name
String
Name
Response.Workflow
workflow node name
String

Practical Case

Case 1: Task Callback Triggered by Task Interface

<Response>
<EventName>TaskFinish</EventName>
<JobsDetail>
<Code>Success</Code>
<CreationTime>2022-07-18T15:16:43+0800</CreationTime>
<EndTime>2022-07-18T15:16:44+0800</EndTime>
<Input>
<BucketId>test-1234567890</BucketId>
<Object>input/deer.jpg</Object>
<Region>ap-chongqing</Region>
</Input>
<JobId>c93***********084</JobId>
<Message/>
<Operation>
<Output>
<Bucket>test-1234567890</Bucket>
<Object>output/out.jpg</Object>
<Region>ap-chongqing</Region>
</Output>
<PicProcessResult>
<ObjectName>output/out.jpg</ObjectName>
<OriginalInfo>
<Etag>"d5a4**********35a1"</Etag>
<ImageInfo>
<Ave>0xc64847</Ave>
<Format>JPEG</Format>
<Height>417</Height>
<Orientation>0</Orientation>
<Quality>68</Quality>
<Width>500</Width>
</ImageInfo>
</OriginalInfo>
<ProcessResult>
<Etag/>
<Format>JPEG</Format>
<Height>500</Height>
<Quality>68</Quality>
<Size>24911</Size>
<Width>417</Width>
</ProcessResult>
</PicProcessResult>
<TemplateId>t1046**********0381</TemplateId>
<TemplateName>test</TemplateName>
<UserData>This is my PicProcess job.</UserData>
<JobLevel>0</JobLevel>
</Operation>
<QueueId>p2911**********5cc774</QueueId>
<StartTime>2022-07-18T15:16:44+0800</StartTime>
<State>Success</State>
<Tag>PicProcess</Tag>
</JobsDetail>
</Response>

Case 2: Task Callback Triggered by Workflow

<Response>
<EventName>TaskFinish</EventName>
<JobsDetail>
<Code>Success</Code>
<CreationTime>2022-07-18T15:16:43+0800</CreationTime>
<EndTime>2022-07-18T15:16:44+0800</EndTime>
<Input>
<BucketId>test-1234567890</BucketId>
<Object>input/deer.jpg</Object>
<Region>ap-chongqing</Region>
<CosHeaders>
<Key>Content-Type</Key>
<Value>image/jpeg</Value>
</CosHeaders>
<CosHeaders>
<Key>x-cos-request-id</Key>
<Value>NjJiZD**********ZhYzY5</Value>
</CosHeaders>
<CosHeaders>
<Key>EventName</Key>
<Value>cos:ObjectCreated:Put</Value>
</CosHeaders>
<CosHeaders>
<Key>Size</Key>
<Value>1024</Value>
</CosHeaders>
</Input>
<JobId>c939**********d2084</JobId>
<Message/>
<Operation>
<Output>
<Bucket>test-1234567890</Bucket>
<Object>output/out.jpg</Object>
<Region>ap-chongqing</Region>
</Output>
<PicProcessResult>
<ObjectName>output/out.jpg</ObjectName>
<OriginalInfo>
<Etag>"d5a4**********e35a1"</Etag>
<ImageInfo>
<Ave>0xc64847</Ave>
<Format>JPEG</Format>
<Height>417</Height>
<Orientation>0</Orientation>
<Quality>68</Quality>
<Width>500</Width>
</ImageInfo>
</OriginalInfo>
<ProcessResult>
<Etag/>
<Format>JPEG</Format>
<Height>500</Height>
<Quality>68</Quality>
<Size>24911</Size>
<Width>417</Width>
</ProcessResult>
</PicProcessResult>
<TemplateId>t10461f**********e0381</TemplateId>
<TemplateName>test</TemplateName>
<UserData>This is my PicProcess job.</UserData>
<JobLevel>0</JobLevel>
</Operation>
<QueueId>p291191**********cc774</QueueId>
<StartTime>2022-07-18T15:16:44+0800</StartTime>
<State>Success</State>
<Tag>PicProcess</Tag>
<Workflow>
<Name>PicProcess_1581665960537</Name>
<RunId>ic90e**********3c59f</RunId>
<WorkflowId>web6a**********03be9</WorkflowId>
<WorkflowName>workflow-test</WorkflowName>
</Workflow>
</JobsDetail>
</Response>

Case 3: Task Callback Triggered by Workflow in JSON Format

{
"EventName": "TaskFinish",
"JobsDetail": [{
"Code": "Success",
"CreationTime": "2022-07-18T15:16:43+0800",
"EndTime": "2022-07-18T15:16:44+0800",
"Input": {
"BucketId": "test-1234567890",
"Object": "input/deer.jpg",
"Region": "ap-chongqing",
"CosHeaders": [{
"Key": "Content-Type",
"Value": "image/jpeg"
},
{
"Key": "x-cos-request-id",
"Value": "NjJiZD**********ZhYzY5"
},
{
"Key": "EventName",
"Value": "cos:ObjectCreated:Put"
},
{
"Key": "Size",
"Value": "1024"
}
]
},
"JobId": "c939847**********d2084",
"Operation": {
"Output": {
"Bucket": "test-1234567890",
"Object": "output/out.jpg",
"Region": "ap-chongqing"
},
"PicProcessResult": {
"ObjectName": "output/out.jpg",
"OriginalInfo": {
"Etag": "\\"d5a491**********e35a1\\"",
"ImageInfo": {
"Ave": "0xc64847",
"Format": "JPEG",
"Height": "417",
"Orientation": "0",
"Quality": "68",
"Width": "500"
}
},
"ProcessResult": {
"Format": "JPEG",
"Height": "500",
"Quality": "68",
"Size": "24911",
"Width": "417"
}
},
"TemplateId": "t1046**********0381",
"TemplateName": "test",
"UserData": "This is my PicProcess job.",
"JobLevel": 0
},
"QueueId": "p2911**********5cc774",
"StartTime": "2022-07-18T15:16:44+0800",
"State": "Success",
"Tag": "PicProcess",
"Workflow": {
"Name": "PicProcess_1581665960537",
"RunId": "ic90ed**********3c59f",
"WorkflowId": "web6a*********3be9",
"WorkflowName": "workflow-test"
}
}]
}


ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック