You can call this operation to query a workflow instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeFlowInstance

The operation that you want to perform. Set the value to DescribeFlowInstance.

Id String Yes FI-7CAF9709CD32****

The ID of the workflow instance.

ProjectId String Yes FP-7A1018ADE917****

The ID of the project.

RegionId String Yes cn-hangzhou

The ID of the region to which your project belongs.

Response parameters

Parameter Type Example Description
ClusterId String C-F32FB31D8295****

The ID of the cluster.

CronExpression String * * * * * ?

The CRON expression of the time-based scheduling of the workflow.

DependencyFlowList

The parent workflows of the workflow.

ParentFlow

A parent workflow of the workflow.

BizDate Long 1540796248000

The execution time of the parent workflow instance.

DependencyFlowId String F-96853646C4559D42

The ID of the parent workflow.

DependencyInstanceId String FI-96853646C4559D42

The ID of the parent workflow instance.

FlowId String F-96853646C4559D49

The ID of the workflow.

FlowInstanceId String FI-96853646C4559D49

The ID of the workflow instance.

ProjectId String FP-96853646C4559D49

The ID of the project.

ScheduleKey String 20191212

The key of the scheduling time of the workflow.

Duration Long 12000

The duration for which the workflow instance ran. Unit: milliseconds.

EndTime Long 1540796248000

The time when the workflow instance stopped.

FlowId String F-35683D0E4573****

The ID of the workflow.

FlowName String flow-hive

The name of the workflow.

GmtCreate Long 1540796248000

The creation time of the workflow.

GmtModified Long 1540796248000

The modification time of the workflow.

Graph String {"nodes":[{"shape":"startControlNode","size":"80*34","spmAnchorId":"0.0.0.i0.766645eb2cmNtQ","x":500,"y":250,"index":0,"id":"48d474ea","attribute":{"type":"START"},"type":"node"},{"shape":"hiveSQLJobNode","size":"170*34","spmAnchorId":"5176.8250060.0.i11.499128d0KWdQvq","x":515,"y":334.5,"index":1,"id":"2f089966","label":"hive-test","attribute":{"jobId":"FJ-C6C794219DE652B9","type":"JOB","jobType":"HIVE_SQL"},"type":"node","config":{"hostName":"","clusterId":""}},{"shape":"endControlNode","size":"80*34","spmAnchorId":"5176.8250060.0.i15.499128d0KWdQvq","x":532,"y":453.5,"index":2,"id":"ac092a54","attribute":{"type":"END"},"type":"node"}],"edges":[{"sourceAnchor":0,"targetAnchor":0,"index":3,"source":"48d474ea","id":"77e6117c","target":"2f089966"},{"sourceAnchor":1,"targetAnchor":0,"index":4,"source":"2f089966","id":"95ba3716","target":"ac092a54"}]}

The information of the directed acyclic graph (DAG) of the workflow.

HasNodeFailed Boolean false

This parameter is unavailable.

Id String FI-7CAF9709CD32****

The ID of the workflow instance.

NodeInstance

The node instances of the workflow instance.

NodeInstance

The information of a node instance.

ClusterId String C-F32FB31D82954C64

The ID of the cluster.

Duration Long 11000

The duration for which the node instance ran.

EndTime Long 1540796248000

The time when the node instance stopped.

ExternalId String application_1540362938289_1858

The external ID of the node instance, such as the ID of the launcher application.

ExternalInfo String empty

The external information of the node instance, such as error diagnosis information.

ExternalStatus String SUCCESS

The external status of the node instance. Valid values:

  • SUBMITTED: The node instance is submitted.
  • RUNNING: The node instance is running.
  • SUCCESS: The execution of the job instance succeeded.
  • FAIL: The execution of the node instance failed.
  • KILL_FAIL: The termination of the node instance failed.
  • KILL_SUCCESS: The termination of the node instance succeeded.
FailAct String STOP

The action to take if the node instance fails. Valid values:

  • STOP: terminates the workflow instance.
  • CONTINUE: skips the node instance.
GmtCreate Long 1540796236000

The creation time of the job.

GmtModified Long 1540796247000

The modification time of the job.

HostName String emr-header-1.cluster-12345

The name of the host on which the node instance runs. The host can be a master host or a gateway host. The hostname is formatted in emr-header-1.cluster-12345. You can use the hostname command to view the value of this parameter.

Id String FNI-9D14A7CCF2687B84

The ID of the node instance.

JobId String FJ-C6C794219DE652B9

The ID of the corresponding job.

JobName String hive-test

The name of the corresponding job.

JobType String HIVE_SQL

The type of the corresponding job.

MaxRetry String 0

The maximum number of retries of running the node instance.

NodeName String 2f089966

The name of the node.

Pending Boolean true

Indicates whether the node instance execution ended.

ProjectId String FP-7A1018ADE9179EE1

The ID of the project.

Retries Integer 0

The number of retries of running the node instance.

RetryInterval String 15

The interval between successive retries of running the node instance. Unit: seconds.

StartTime Long 1540796237000

The time when the node instance started running.

Status String OK

The status of the node instance. Valid values: PREP, SUBMITTING, RUNNING, DONE, OK, FAILED, KILLED, KILL_FAILED, and START_RETRY. PREP indicates that the node instance is being prepared. SUBMITTING indicates that the node instance is being submitted. RUNNING indicates that the node instance is running. DONE indicates that the execution of the node instance completed. OK indicates that the execution of the node instance succeeded. FAILED indicates that the execution of the node instance failed. KILLED indicates that the node instance is terminated. KILL_FAILED indicates that the termination of the node instance failed. START_RETRY indicates that the node instance is restarting.

Type String JOB

The type of the node. Valid values: JOB, CLUSTER, START, and END. These values indicate a job node, a cluster node, the start node, and the end node, respectively.

ProjectId String FP-7A1018ADE917****

The ID of the project.

RequestId String EDF99BA3-F7AF-49B2-ABA1-36430A31F482

The ID of the request.

ScheduleTime Long 1540796236000

The scheduling time of the workflow.

StartTime Long 1540796236000

The time when the workflow instance started running.

Status String SUCCEEDED

The status of the workflow instance. Valid values:

  • PREP: The workflow instance is being prepared.
  • RUNNING: The workflow instance is running.
  • SUCCEEDED: The workflow instance execution succeeded.
  • FAILED: The workflow instance execution failed.
  • Terminated: The workflow instance is terminated.
  • SUSPENDED: The workflow instance is suspended.

Examples

Sample requests


http(s)://[Endpoint]/? Action=DescribeFlowInstance
&Id=FI-7CAF9709CD32****
&ProjectId=FP-7A1018ADE917****
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<DescribeFlowInstanceResponse>
	  <data>
		    <Status>SUCCEEDED</Status>
		    <RequestId>EDF99BA3-F7AF-49B2-ABA1-36430A31F482</RequestId>
		    <EndTime>1540796248000</EndTime>
		    <ClusterId>C-F32FB31D8295****</ClusterId>
		    <GmtModified>1540796247000</GmtModified>
		    <StartTime>1540796236000</StartTime>
		    <ProjectId>FP-7A1018ADE917****</ProjectId>
		    <Duration>12000</Duration>
		    <FlowId>F-35683D0E4573****</FlowId>
		    <GmtCreate>1540796235000</GmtCreate>
		    <Graph>
			      <nodes>
				        <shape>startControlNode</shape>
				        <size>80*34</size>
				        <spmAnchorId>0.0.0.i0.766645eb2c****</spmAnchorId>
				        <x>500</x>
				        <y>250</y>
				        <index>0</index>
				        <id>48d4****</id>
				        <attribute>
					          <type>START</type>
				        </attribute>
				        <type>node</type>
			      </nodes>
			      <nodes>
				        <shape>hiveSQLJobNode</shape>
				        <size>170*34</size>
				        <spmAnchorId>5176.8250060.0.i11.499128d0KW****</spmAnchorId>
				        <x>515</x>
				        <y>334.5</y>
				        <index>1</index>
				        <id>2f089966</id>
				        <label>hive-test</label>
				        <attribute>
					          <jobId>FJ-C6C794219DE6****</jobId>
					          <type>JOB</type>
					          <jobType>HIVE_SQL</jobType>
				        </attribute>
				        <type>node</type>
				        <config>
					          <hostName></hostName>
					          <clusterId></clusterId>
				        </config>
			      </nodes>
			      <nodes>
				        <shape>endControlNode</shape>
				        <size>80*34</size>
				        <spmAnchorId>5176.8250060.0.i15.499128d0KW****</spmAnchorId>
				        <x>532</x>
				        <y>453.5</y>
				        <index>2</index>
				        <id>ac09****</id>
				        <attribute>
					          <type>END</type>
				        </attribute>
				        <type>node</type>
			      </nodes>
			      <edges>
				        <sourceAnchor>0</sourceAnchor>
				        <targetAnchor>0</targetAnchor>
				        <index>3</index>
				        <source>48d474ea</source>
				        <id>77e6****</id>
				        <target>2f089966</target>
			      </edges>
			      <edges>
				        <sourceAnchor>1</sourceAnchor>
				        <targetAnchor>0</targetAnchor>
				        <index>4</index>
				        <source>2f089966</source>
				        <id>95ba****</id>
				        <target>ac092a54</target>
			      </edges>
		    </Graph>
		    <FlowName>flow-hive</FlowName>
		    <Id>FI-7CAF9709CD328EBE</Id>
		    <NodeInstance>
			      <NodeInstance>
				        <FailAct>STOP</FailAct>
				        <Status>OK</Status>
				        <EndTime>1540796236000</EndTime>
				        <ClusterId>C-F32FB31D8295****</ClusterId>
				        <NodeName>:start:</NodeName>
				        <GmtModified>1540796236000</GmtModified>
				        <StartTime>1540796236000</StartTime>
				        <ProjectId>FP-7A1018ADE917****</ProjectId>
				        <Duration>0</Duration>
				        <MaxRetry>0</MaxRetry>
				        <Type>START</Type>
				        <GmtCreate>1540796236000</GmtCreate>
				        <Retries>0</Retries>
				        <Id>FNI-1286C1ED46C4****</Id>
				        <HostName></HostName>
				        <Pending>false</Pending>
			      </NodeInstance>
			      <NodeInstance>
				        <FailAct>STOP</FailAct>
				        <Status>OK</Status>
				        <EndTime>1540796248000</EndTime>
				        <ClusterId>C-F32FB31D8295****</ClusterId>
				        <NodeName>2f089966</NodeName>
				        <ExternalId>application_1540362938289_1858</ExternalId>
				        <JobName>hive-test</JobName>
				        <GmtModified>1540796247000</GmtModified>
				        <StartTime>1540796237000</StartTime>
				        <ProjectId>FP-7A1018ADE917****</ProjectId>
				        <Duration>11000</Duration>
				        <MaxRetry>0</MaxRetry>
				        <ExternalStatus>SUCCESS</ExternalStatus>
				        <Type>JOB</Type>
				        <GmtCreate>1540796236000</GmtCreate>
				        <JobType>HIVE_SQL</JobType>
				        <ExternalInfo></ExternalInfo>
				        <Retries>0</Retries>
				        <RetryInterval>15</RetryInterval>
				        <Id>FNI-9D14A7CCF268****</Id>
				        <HostName>emr-header-1.cluster-500159692</HostName>
				        <JobId>FJ-C6C794219DE6****</JobId>
				        <Pending>false</Pending>
			      </NodeInstance>
			      <NodeInstance>
				        <FailAct>STOP</FailAct>
				        <Status>OK</Status>
				        <EndTime>1540796248000</EndTime>
				        <ClusterId>C-F32FB31D8295****</ClusterId>
				        <NodeName>ac092a54</NodeName>
				        <GmtModified>1540796247000</GmtModified>
				        <StartTime>1540796248000</StartTime>
				        <ProjectId>FP-7A1018ADE917****</ProjectId>
				        <Duration>0</Duration>
				        <MaxRetry>0</MaxRetry>
				        <Type>END</Type>
				        <GmtCreate>1540796247000</GmtCreate>
				        <Retries>0</Retries>
				        <Id>FNI-14C14E312AF9****</Id>
				        <HostName></HostName>
				        <Pending>false</Pending>
			      </NodeInstance>
		    </NodeInstance>
	  </data>
	  <requestId>EDF99BA3-F7AF-49B2-ABA1-36430A31F482</requestId>
</DescribeFlowInstanceResponse>

JSON format

{
	"requestId":"EDF99BA3-F7AF-49B2-ABA1-36430A31F482",
	"data":{
		"NodeInstance":{
			"NodeInstance":[
				{
					"FailAct":"STOP",
					"Retries":0,
					"Type":"START",
					"GmtCreate":1540796236000,
					"GmtModified":1540796236000,
					"HostName":"",
					"Status":"OK",
					"MaxRetry":"0",
					"ClusterId":"C-F32FB31D8295****",
					"Duration":0,
					"Id":"FNI-1286C1ED46C4****",
					"EndTime":1540796236000,
					"StartTime":1540796236000,
					"Pending":false,
					"ProjectId":"FP-7A1018ADE917****",
					"NodeName":":start:"
				},
				{
					"FailAct":"STOP",
					"Retries":0,
					"Type":"JOB",
					"ExternalId":"application_1540362938289_1858",
					"JobName":"hive-test",
					"GmtCreate":1540796236000,
					"GmtModified":1540796247000,
					"HostName":"emr-header-1.cluster-500159692",
					"JobType":"HIVE_SQL",
					"Status":"OK",
					"MaxRetry":"0",
					"RetryInterval":"15",
					"ClusterId":"C-F32FB31D8295****",
					"JobId":"FJ-C6C794219DE6****",
					"Duration":11000,
					"Id":"FNI-9D14A7CCF268****",
					"EndTime":1540796248000,
					"ExternalInfo":"",
					"StartTime":1540796237000,
					"ExternalStatus":"SUCCESS",
					"Pending":false,
					"ProjectId":"FP-7A1018ADE917****",
					"NodeName":"2f089966"
				},
				{
					"FailAct":"STOP",
					"Retries":0,
					"Type":"END",
					"GmtCreate":1540796247000,
					"GmtModified":1540796247000,
					"HostName":"",
					"Status":"OK",
					"MaxRetry":"0",
					"ClusterId":"C-F32FB31D8295****",
					"Duration":0,
					"Id":"FNI-14C14E312AF94FB8",
					"EndTime":1540796248000,
					"StartTime":1540796248000,
					"Pending":false,
					"ProjectId":"FP-7A1018ADE917****",
					"NodeName":"ac092a54"
				}
			]
		},
		"FlowId":"F-35683D0E4573****",
		"GmtCreate":1540796235000,
		"GmtModified":1540796247000,
		"Status":"SUCCEEDED",
		"ClusterId":"C-F32FB31D8295****",
		"FlowName":"flow-hive",
		"RequestId":"EDF99BA3-F7AF-49B2-ABA1-36430A31F482",
		"Duration":12000,
		"Graph":{
			"edges":[
				{
					"id":"77e6****",
					"index":3,
					"source":"48d474ea",
					"sourceAnchor":0,
					"target":"2f089966",
					"targetAnchor":0
				},
				{
					"id":"95ba****",
					"index":4,
					"source":"2f089966",
					"sourceAnchor":1,
					"target":"ac092a54",
					"targetAnchor":0
				}
			],
			"nodes":[
				{
					"id":"48d4****",
					"index":0,
					"spmAnchorId":"0.0.0.i0.766645eb2c****",
					"attribute":{
						"type":"START"
					},
					"shape":"startControlNode",
					"type":"node",
					"y":250,
					"x":500,
					"size":"80*34"
				},
				{
					"id":"2f089966",
					"index":1,
					"spmAnchorId":"5176.8250060.0.i11.499128d0KW****",
					"config":{
						"hostName":"",
						"clusterId":""
					},
					"attribute":{
						"jobType":"HIVE_SQL",
						"jobId":"FJ-C6C794219DE6****",
						"type":"JOB"
					},
					"label":"hive-test",
					"shape":"hiveSQLJobNode",
					"type":"node",
					"y":334.5,
					"x":515,
					"size":"170*34"
				},
				{
					"id":"ac09****",
					"index":2,
					"spmAnchorId":"5176.8250060.0.i15.499128d0KW****",
					"attribute":{
						"type":"END"
					},
					"shape":"endControlNode",
					"type":"node",
					"y":453.5,
					"x":532,
					"size":"80*34"
				}
			]
		},
		"EndTime":1540796248000,
		"Id":"FI-7CAF9709CD328EBE",
		"StartTime":1540796236000,
		"ProjectId":"FP-7A1018ADE917****"
	}
}

Error codes

For a list of error codes, visit the API Error Center.