BPD 相關資源的 REST 介面-程序實例資源-PUT (評估 JavaScript 表示式) 方法

使用此方法來執行 JavaScript 表示式,並傳回產生的程序實例詳細資料。

方法呼叫範例

PUT /rest/bpm/wle/v1/process/{instanceId}?action={string}&script={string}

替代方法呼叫

POST /rest/bpm/wle/v1/process/{instanceId}?action={string}&script={string}

使用注意事項

參數

必要的參數
名稱值類型說明
動作 String
要對程序實例執行的動作。
說明
JS
在程序實例的環境定義中執行 JavaScript 表示式。
Script String
JavaScript 表示式。

要求內容

回應內容

Javascript 評估傳回資料 (JSReturnData complexType)。

預設內容類型為application/json.

MIME 類型 :application/json


綱目
{"description": "WLE Javascript Response" , 
   "type": "object",
   "properties":
   { 
      "items": 
      [{"type": "object" ,
            "description": "Attributes and values of up the result of the javascript expression evaluation."
         }
      ]
   }
}

MIME 類型 :application/xml


綱目
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://rest.bpm.ibm.com/v1/data/process"
        elementForm預設值 = "unqualified" xmlns= "http://www.w3.org/2001/XMLSchema"
        xmlns:tns = "http://rest.bpm.ibm.com/v1/data/process"
        xmlns:pref = "http://rest.bpm.ibm.com/v1/data/root"
        xmlns:common = "http://rest.bpm.ibm.com/v1/data/common"
        xmlns:execution = "http://rest.bpm.ibm.com/v1/data/execution"
        xmlns:task = "http://rest.bpm.ibm.com/v1/data/task" 
        xmlns:activity = "http://rest.bpm.ibm.com/v1/data/activity"
        xmlns:relationship = "http://rest.bpm.ibm.com/v1/data/relationship">

    <import schemaLocation="BPMRestData.xsd" namespace="http://rest.bpm.ibm.com/v1/data/root" />

    <import schemaLocation="Common.xsd" namespace="http://rest.bpm.ibm.com/v1/data/common"/>
    <import schemaLocation="Task.xsd" namespace="http://rest.bpm.ibm.com/v1/data/task"></import>
    <import schemaLocation="ExecutionTree.xsd" namespace="http://rest.bpm.ibm.com/v1/data/execution"></import>
    <import schemaLocation="Activity.xsd" namespace="http://rest.bpm.ibm.com/v1/data/activity"/>
    <import schemaLocation="Relationship.xsd" namespace="http://rest.bpm.ibm.com/v1/data/relationship"/>

	<complexType name="ProcessSearchResult">
		<complexContent>
			<extension base="pref:Data">
				<sequence>
					<element name="overview" type="common:Map"/>				
					<element name="processes" type="tns:ProcessSummary" maxOccurs="unbounded" minOccurs="0" />
				</sequence>
			</extension>
		</complexContent>
	</complexType>

    <complexType name="ProcessSummary">
        <complexContent>
            <extension base="pref:Data">
                <sequence>
                    <!-- The process instance ID -->
                    <element name="piid" type="string" />
                 
                    <!-- The name of the process -->
                    <element name="name" type="string" />

                    <!-- The name of the BPD -->
                    <element name="bpdName" type="string" />
                    
                    <!-- The snapshot ID -->
                    <element name="snapshotID" type="string" nillable="true" />
                    
                    <!-- The project ID -->
                    <element name="projectID" type="string" nillable="true" />

                    <!-- The due date associated with the process -->
                    <element name="dueDate" type="dateTime" />

                    <!-- The at risk date associated with the process -->
                    <element name="atRiskDate" type="dateTime" />
                    
                    <!-- The current status of the process instance 
                         有效值為:
                          "作用中" ,
                          "Completed" ,
                          "失敗" ,
                          "已暫停" ,
                          "已終止" -->
                    <element name="executionState" type="string" />
                    
                    <!-- Error message for failed process instance -->
                    <element name="instanceError" type="string" />
                    
					<!-- The timestamp for when the process instance was created -->
                	<element name="creationDate" type="dateTime" />                    
                    
                    <!-- The timestamp when the process was last modified -->
                    <element name="lastModificationTime" type="dateTime" />
                    
                    <!-- The timestamp when the process instance was closed-->
                    <element name="closedDate" type="dateTime" />
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    
    <!--
        此類型包含與程序實例相關的詳細資料。
    -->
    <complexType name="ProcessDetails">
        <complexContent>
            <extension base="pref:Data">
                <sequence>

                    <!-- The timestamp when the process instance was created -->
                    <element name="creationTime" type="dateTime" />

                    <!-- The description of the process -->
                    <element name="description" type="string" nillable="true" />
                    <element name="richDescription" type="string" nillable="true" />
                    
                    <!-- The current status of the process instance 
                         有效值為:
                          "作用中" ,
                          "Completed" ,
                          "失敗" ,
                          "已暫停" ,
                          "已終止" -->
                    <element name="executionState" type="string" />
                    
                    <!-- The current state of the process instance. -->
                    <element name="state" type="string" />

                    <!-- The timestamp when the process was last modified -->
                    <element name="lastModificationTime" type="dateTime" />

                    <!-- The name of the process -->
                    <element name="name" type="string" />

                    <!-- The process instance ID -->
                    <element name="piid" type="string" />

                    <!-- The case folder ID -->
                    <element name="caseFolderID" type="string" />
                    
                    <!-- The case folder server name -->
                    <element name="caseFolderServerName" type="string" nillable="true"/>

                    <!-- The process template (BPD) ID -->
                    <element name="processTemplateID" type="string" />

                    <!-- The process template (BPD) name -->
                    <element name="processTemplateName" type="string" />

                    <!-- The name of the process application -->
                    <element name="processAppName" type="string" nillable="true" />

                    <!-- The process application acronym -->
                    <element name="processAppAcronym" type="string" nillable="true" />

                    <!-- The ID of the process app -->
                    <element name="processAppID" type="string" nillable="true" />
                    <!-- The name of the snapshot -->

                    <!-- The result of script execution -->
                    <element name="result" type="string" nillable="true" />

                    <element name="snapshotName" type="string" nillable="true" />

                    <!-- The snapshot ID -->
                    <element name="snapshotID" type="string" nillable="true" />

                    <!-- The branch (track) ID -->
                    <element name="branchID" type="string" />

                    <!-- The name of the branch (track) -->
                    <element name="branchName" type="string" />

                    <!-- The snapshot tip -->
                    <element name="snapshotTip" type="boolean" />

                    <!-- The starting document ID -->
                    <element name="startingDocumentID" type="string" />
                    
                    <!-- The starting document server name -->
                    <element name="startingDocumentServerName" type="string" nillable="true"/>
                    
                    <!-- The parent case ID -->
                    <element name="parentCaseId" type="string" nillable="true"/>
                    
                    <!-- The parent activity ID -->
                    <element name="parentActivityId" type="string" nillable="true"/>
                    
                    <!-- The workflow application -->
                    <element name="workflowApplication" type="string" nillable="true"/>
                    
                    <!-- The case identifier -->
                    <element name="caseIdentifier" type="string" nillable="true"/>
                    
                    <!-- The case type id -->
                    <element name="caseTypeId" type="string" nillable="true"/>
                    
                    <!-- The case stage status -->
                    <element name="caseStageStatus" type="string" nillable="true"/>
                    
                    <!-- The case process type location -->
                    <element name="caseProcessTypeLocation" type="string" nillable="true"/>

                    <!-- Error message for failed process instance -->
                    <element name="instanceError" type="string" />

                    <!-- The due date associated with the process -->
                    <element name="dueDate" type="dateTime" />

                    <!-- The predicted due date associated with the process -->
                    <element name="predictedDueDate" type="dateTime" />

                    <!-- Comments associated with the process instance -->
                    <element name="comments" type="tns:CommentsType" maxOccurs="unbounded" minOccurs="0" />

                    <!-- A list of zero or more tasks associated with the process -->
                    <element name="tasks" type="task:TaskDetails" maxOccurs="unbounded" minOccurs="0"/>

                    <!-- A list of zero or more documents associated with the process -->
                    <element name="documents" type="tns:documentsType" maxOccurs="unbounded" minOccurs="0"/>

                    <!-- The details of the action performed if applicable -->
                    <element name="actionDetails" type="tns:ActionDetails" minOccurs="0" />

                    <!--
                         與程序實例相關聯的資料,以 json 字串表示。
                         若要瞭解此情況,您將需要與 BPD 相關聯的資料模型。
                    -->
                    <element name="data" type="string" />

                    <!--
                     儲存在實際對映中的資料資訊,例如 TaskDetails 資訊
                    -->
                    <element name="variables" type="common:Map" />
                    
                    <!--
                        參照此特定程序實例作為目標或來源的所有關係清單。 
                     -->
                    <element name="relationship" type="relationship:RelationshipDetails"  maxOccurs="unbounded" minOccurs="0"/>

                    <!--
                     儲存為變數清單的商業資料資訊。
                    -->		
                    <element name="businessData" type="common:Variable" maxOccurs="unbounded" />

                    <!-- The execution tree associated with the process -->
                    <element name="executionTree" type="execution:ExecutionTree" />

                    <!-- The diagram associated with the process instance -->
                    <element name="diagram" type="tns:DiagramType" />

                    <!-- The list of applicable actions of the process instance  -->
                    <element name="actions" type="string"  maxOccurs="unbounded" minOccurs="0"/>

                    <!-- The name of the BPD -->
                    <element name="bpdName" type="string" />

                    <!--  The Id of the User who started the process instance -->
                    <element name="starterId" type="string" />
                </sequence>
            </extension>
        </complexContent>
    </complexType>

	<!-- This type is used to return a list of process details. -->
	<complexType name="ProcessDetailsList">
		<complexContent>
			<extension base="pref:Data">
				<sequence>
					<!-- This is a list of zero or more process details. -->
					<element name="processInstance" type="tns:ProcessDetails" minOccurs="0" maxOccurs="unbounded" />
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	
	<complexType name="ProcessBusinessDataList">
		<complexContent>
			<extension base="pref:Data">
				<sequence>
					<!-- A list of zero or more failed operations -->
                    <element name="failedOperations" type="tns:FailedOperations"  minOccurs="0" maxOccurs="unbounded" />
                    
				    <element name="processBusinessData" type="tns:ProcessBusinessData"  minOccurs="0" maxOccurs="unbounded" />
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	
	<complexType name="ProcessBusinessData">
		<complexContent>
			<extension base="pref:Data">
				<sequence>
					<!-- The process instance ID -->
                    <element name="piid" type="string" />
					<!-- Business data information stored as list of variables.-->		
                    <element name="businessData" type="common:Variable" maxOccurs="unbounded" />
				</sequence>
			</extension>
		</complexContent>
	</complexType>

    <!--
        此類型包含「商業程序定義模型」的相關資訊。
    -->
    <complexType name="BPDModel">
        <complexContent>
            <extension base="pref:Data">
                <sequence>
                    <element name="Header" type="tns:HeaderType"/>
                    <element name="DataModel" type="tns:DataModelType"/>
                    <element name="Diagram" type="tns:DiagramType"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>

    <!--
         此類型包含與「BPD 模型」相關聯的「標頭」類型資訊。
    -->
    <complexType name="HeaderType">
        <sequence>

            <!-- The BPD ID -->
            <element name="ID" type="string"/>

            <!-- The BPD name -->
            <element name="name" type="string"/>

            <!-- The BPD description -->
            <element name="description" type="string"/>
            <element name="richDescription" type="string"/>
        </sequence>
    </complexType>

    <!--
         此類型包含 BPD 的「資料模型」相關資訊。
         這包括與 BPD 相關聯的輸入及輸出。
    -->
    <complexType name="DataModelType">
        <sequence>

            <!-- A list of variables that are defined by the BPD model -->
            <element name="properties" type="common:Map"/>

            <!-- A list of inputs to the process -->
            <element name="inputs" type="common:Map"/>

            <!-- A list of outputs produced by the process -->
            <element name="outputs" type="common:Map"/>

            <!-- A structure explaining the BPD's data model -->
            <element name="validation" type="common:Map"/>
        </sequence>
    </complexType>

    <!--
         此類型包含相關聯圖表的相關資訊
         具有 BPD 或「程序」實例。
    -->
    <complexType name="DiagramType">
        <sequence>

            <!-- The process application ID (short name) -->
            <element name="processAppID" type="string"/>

            <!--
                 與處理程序相關聯的零個以上階段清單。
                 階段代表程序執行的階段。
            -->
            <element name="milestone" type="tns:milestoneType" minOccurs="0" maxOccurs="unbounded"/>

            <!-- A list of zero or more steps associated with the process -->
            <element name="step" type="tns:stepType" maxOccurs="unbounded" minOccurs="0"/>

            <!--
                 與程序相關聯的零個以上線道清單。
                 「線道」通常代表商業組織內的部門。
            -->
            <element name="lanes" type="tns:lanesType" maxOccurs="unbounded" minOccurs="0"/>
                <!--
                 與處理程序相關聯但不與特定步驟或附加元素相關聯的零個以上記號的清單。
            -->
            <element name="orphaned" type="tns:orphanType" maxOccurs="unbounded" minOccurs="0"/>
        </sequence>
    </complexType>

    <!--
         此類型代表「階段」,它會建立
         程序內執行的階段。
    -->
    <complexType name="milestoneType">
        <sequence>

            <!-- The name of the phase -->
            <element name="name" type="string"/>

            <!-- The "width" of the phase (in pixels) -->
            <element name="width" type="int"/>
        </sequence>
    </complexType>

    <!--
         此類型包含與處理程序內「步驟」相關聯的詳細資訊。
    -->
    <complexType name="stepType">
        <sequence>

            <!-- The step ID -->
            <element name="ID" type="string"/>

            <!-- The name of the step -->
            <element name="name" type="string"/>

            <!--
                 與此步驟相關聯的步驟類型。
                 範例: 事件、閘道、活動等。
            -->
            <element name="type" type="string"/>

            <!--
                 如果類型是 "activity" ,這個欄位會指定活動的類型。
                 範例: 作業、 externalActivity、 subBpd等。
            -->
            <element name="activityType" type="string" minOccurs="0" />

            <!--
                 如果活動類型為 "subBpd" ,則 externalID 是「處理程序 ID」
                 subBpd。
                 如果活動類型為 "task" ,則 externalID 是作業服務的服務 ID。
                 如果活動類型是 "externalTask" ,則 externalID 是
                 外部作業。
            -->
            <element name="externalID" type="string" minOccurs="0" />

            <!-- A diagram for subprocesses -->
            <element name="diagram" type="tns:DiagramType" minOccurs="0"/>

            <!--  The name of the phase to which the step belongs. -->
            <element name="milestone" type="string"/>

            <!-- The name of the lane to which the step belongs -->
            <element name="lane" type="string"/>

            <!-- The X,Y coordinate of the centerpoint of this step within the diagram -->
            <element name="x" type="int"/>
            <element name="y" type="int"/>

            <!-- The color associated with the step within the diagram -->
            <element name="color" type="string"/>

            <!-- A list of zero or more timers attached to this step -->
            <element name="attachedTimer" type="tns:attachedTimerType" maxOccurs="unbounded" minOccurs="0"/>

            <!-- An optional pre-tracking point attached to this step -->
            <element name="preTrackingPoint" type="tns:trackingPointType" maxOccurs="1" minOccurs="0"/>
            
            <!-- An optional post-tracking point attached to this step -->
            <element name="postTrackingPoint" type="tns:trackingPointType" maxOccurs="1" minOccurs="0"/>
            
            <!-- A list of zero or more event handler attached to this step -->
            <element name="attachedEventHandler" type="tns:attachedEventHandlerType" maxOccurs="unbounded" minOccurs="0"/>
            <!-- A list of zero of more lines which extend out from this step in the diagram -->
            <element name="lines" type="tns:linesType" maxOccurs="unbounded" minOccurs="0"/>

            <!-- A list of token IDs associated with this step -->
            <element name="tokenID" type="string" maxOccurs="unbounded" minOccurs="0"/>

            <!-- Task ID associated with this step if there is any associated task -->
            <element name="taskID" type="string" maxOccurs="1" minOccurs="0"/>

        </sequence>
    </complexType>

    <!--
    -->
    <complexType name="attachedTimerType">
        <sequence>
            <element name="ID" type="string"/>
            <element name="name" type="string"/>
            <element name="description" type="string"/>
            <element name="richDescription" type="string"/>
            <element name="tokenID" type="string" maxOccurs="unbounded" minOccurs="0"/>
        </sequence>
    </complexType>
    
    <!-- 
     -->
     <complexType name="trackingPointType">
     	<sequence>
     		<element name="ID" type="string"/>
     		<element name="name" type="string"/>
     		<element name="description" type="string"/>
     		<element name="richDescription" type="string"/>
            <element name="tokenID" type="string" maxOccurs="unbounded" minOccurs="0"/>
            <element name="eventID" type="string"/>
     	</sequence>
     </complexType>

    <!--
    -->
    <complexType name="attachedEventHandlerType">
        <sequence>
            <element name="ID" type="string"/>
            <element name="name" type="string"/>
            <element name="description" type="string"/>
            <element name="richDescription" type="string"/>
            <!-- Type of event message end message or intermediate message -->
            <element name="eventType" type="string" minOccurs="0" />
            <element name="tokenID" type="string" maxOccurs="unbounded" minOccurs="0"/>
        </sequence>
    </complexType>

    <!--
         此類型代表從 BPD 圖表內特定步驟延伸出的單一線條。
    -->
    <complexType name="linesType">
        <sequence>

            <!-- The step ID of the step to which this line extends -->
            <element name="to" type="string"/>

            <!--
                 包含以逗點區隔的座標清單的字串,這一行會透過該清單延伸。
                 點清單必須包含第一個點 ("fromPort" 的座標)
                 及最後一個點 ("toPort" 的座標)。
            -->
            <element name="points" type="string"/>
            <element name="tokenID" type="string" maxOccurs="unbounded" minOccurs="0"/>
            <element name="name" type="string"/>
        </sequence>
    </complexType>

    <!--
         此類型代表與 BPD 圖表相關聯的線道。
    -->
    <complexType name="lanesType">
        <sequence>

            <!-- The name of the lane -->
            <element name="name" type="string"/>

            <!-- The height of the lane (in pixels) -->
            <element name="height" type="int"/>

            <!-- Indicates whether or not this lane is a "system" lane -->
            <element name="system" type="boolean"/>
        </sequence>
    </complexType>

    <!--
         此類型代表與 BPD 圖表相關聯的孤立記號。
    -->
    <complexType name="orphanType">
        <sequence>

            <!-- A token IDs associated with this process instance -->
            <element name="tokenID" type="string" maxOccurs="unbounded" minOccurs="0"/>
                <element name="snapshotID" type="string" nillable="true" />
                <element name="bpdID" type="string"/>
                <element name="stepID" type="string"/>
                <element name="step" type="tns:stepType" maxOccurs="1" minOccurs="0"/>
        </sequence>
    </complexType>
    <!--
         此類型代表與程序實例相關聯的註解。
    -->
    <complexType name="CommentsType">
        <sequence>

            <!-- The username of the user that entered the comment -->
            <element name="who" type="string"/>

            <!-- The fullName of the user that entered the comment -->
            <element name="whoFullName" type="string"/>

            <!-- The email address of the user that entered the comment -->
            <element name="whoEmail" type="string"/>
            
            <!-- The timestamp when the comment was entered -->
            <element name="date" type="dateTime"/>

            <!-- The message associated with the comment -->
            <element name="message" type="string"/>
        </sequence>
    </complexType>

    <!--
         此類型代表與程序實例相關聯的文件。
    -->
    <complexType name="documentsType">
        <sequence>

            <!-- The ID associated with the document; this is used for "update" and "delete" -->
            <element name="ID" type="string"/>

            <!-- The ECM ID associated with the document; this is used for Content Integration steps -->
            <element name="ecmID" type="string"/>

            <!-- The name of the document -->
            <element name="name" type="string"/>

            <!-- The content type of the document (file, url) -->
            <element name="type" type="string"/>

            <!-- The timestamp when the document was added -->
            <element name="date" type="dateTime"/>

            <!-- The length (in bytes) of the document content -->
            <element name="length" type="int"/>

            <!--
                 對於 "url" 類型的文件,這會指定與文件相關聯的 URL。
                 請注意,對於 "url" 類型文件,我們會儲存 URL ,而不是文件
                 內容。
            -->
            <element name="url" type="string"/>

            <!-- The version of the document -->
            <element name="version" type="int"/>
        </sequence>
    </complexType>

    <!--
         此類型用來從 "sendMessage" 動作傳回狀態。
    -->
    <complexType name="SendMessageStatus">
        <complexContent>
            <extension base="pref:Data">
                <sequence>

                    <!-- A flag which indicates whether or not the message was successfully sent -->
                    <element name="messageSent" type="boolean"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>

    <!--
         此類型用來傳回評估 JavaScript 表示式的結果。
    -->
    <complexType name="JSReturnData">
        <complexContent>
            <extension base="pref:Data">
                <sequence>

                    <!-- The "result" consists of a list of attribute/value pairs -->
                    <element name="result" type="string"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>

    <!-- Trigger Action Hander Result -->
    <complexType name="ActionResult">
        <complexContent>
            <extension base="pref:Data">
                <sequence>
                    <element name="tkiid" type="string" maxOccurs="unbounded" />
                </sequence>
            </extension>
        </complexContent>
    </complexType>

    <!-- Actions may have specific details -->
    <complexType name="ActionDetails">
        <complexContent>
            <extension base="pref:Data">
                <sequence>
                    <element name="actionName" type="string"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>

   <!-- Adhoc Action Details-->
    <complexType name="AdhocActionDetails">
        <complexContent>
            <extension base="tns:ActionDetails">
                <sequence>
                    <element name="createdTaskIDs" type="string" maxOccurs="unbounded" />
                </sequence>
            </extension>
        </complexContent>
    </complexType>

    <complexType name="diagramInstanceType">
        <sequence>
            <element name="diagram" type="tns:DiagramType"/>
            <element name="tokenID" type="string"/>
            <element name="taskID" type="string"/>
        </sequence>
    </complexType>

    <complexType name="Action">
        <sequence>
            <element name="ID" type="string"/>
            <element name="displayName" type="string"/>
            <element name="description" type="string"/>
            <element name="richDescription" type="string"/>
        </sequence>
    </complexType>

    <complexType name="Event">
        <complexContent>
            <extension base="pref:Data">
                <sequence>
                    <sequence>
                        <element name="actions" type="tns:Action" minOccurs="0" maxOccurs="unbounded" />
                    </sequence>
                    <sequence>
                        <element name="standardActions" type="string" minOccurs="0" maxOccurs="unbounded" />
                    </sequence>
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    
    <!-- 
	 此類型包含可用於特定程序實例的可用動作清單。
    -->
    <complexType name="tProcessWithActions">
          	<sequence>
            	<!-- The process instance ID -->
	    		<element name="piid" type="string" />
	    		<!-- A list of zero or more available actions associated with the process instance -->
                <sequence>
                  	<element name="actions" type="string" minOccurs="0" maxOccurs="unbounded" />
                </sequence>
         	</sequence>
    </complexType>
    
    <complexType name="ProcessActions">
        <complexContent>
            <extension base="pref:Data">
                <sequence>
                  	<!-- 
			 			此欄位指定程序實例的主要 ID; 
					 	這將設為 "piid"。
		    	  	-->
		    		<element name="identifier" type="string" />
		    		<!-- A list of zero or more "ProcessWithActions" structures -->
                    <element name="process" type="tns:tProcessWithActions" minOccurs="0" maxOccurs="unbounded" />
                  </sequence>
            </extension>
        </complexContent>
    </complexType>

    <!--
        此類型說明大量處理程序相關作業期間失敗的作業。
    -->
    <complexType name="FailedOperations">
        <sequence>
            <!-- The process instance ID -->
            <element name="instanceId" type="string" />

            <!-- The error message prefix associated with the error -->
            <element name="errorNumber" type="string" />

            <!-- The error message associated with the error -->
            <element name="errorMessage" type="string" />
        </sequence>
    </complexType>

    <!--
         此類型用於傳回在多個程序實例上執行大量作業的結果。
    -->
    <complexType name="ProcessBulkOperationResponse">
        <complexContent>
            <extension base="pref:Data">
                <sequence>
                    <!-- A list of zero or more failed operations -->
                    <element name="failedOperations" type="tns:FailedOperations"  minOccurs="0" maxOccurs="unbounded" />

                    <!-- A list of zero or more objects which contain the updated process details
                         在執行作業之後。 -->
                    <element name="processDetails" type="tns:ProcessDetails"  minOccurs="0" maxOccurs="unbounded" />

                    <!-- Gives the count of instances upon which we successfully took the requested action -->
                    <element name="succeeded" type="int" minOccurs="0" maxOccurs="1"/>
                    
                     <!-- Gives the count of instances upon which we failed to take the requested action  --> 
                    <element name="failed" type="int" minOccurs="0" maxOccurs="1"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>


	<complexType name="ProcessBulkOperationCountOnlyResponse">
        <complexContent>
            <extension base="tns:ProcessBulkOperationResponse">
                <sequence>                   
                     <!-- Gives the count of instances --> 
                    <element name="instanceCount" type="long" minOccurs="0" maxOccurs="1"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>

    <!--
         此類型用來代表與單一程序實例相關聯的執行時期錯誤資訊。
    -->
    <complexType name="RuntimeError">
        <complexContent>
            <extension base="pref:Data">
                <sequence>

                    <element name="instanceId" type="string"  minOccurs="0" maxOccurs="1" />
                    <element name="taskId" type="string"  minOccurs="0" maxOccurs="1" />
                    <element name="errorMessage" type="string"  minOccurs="0" maxOccurs="1" />
                    <element name="javaTrace" type="string"  minOccurs="0" maxOccurs="1" />
                    <element name="jsTrace" type="string"  minOccurs="0" maxOccurs="1" />
                    <element name="twTrace" type="string"  minOccurs="0" maxOccurs="1" />
                    <element name="timestamp" type="dateTime"  minOccurs="0" maxOccurs="1" />
                    <element name="branchId" type="string"  minOccurs="0" maxOccurs="1" />
                    <element name="snapshotId" type="string"  minOccurs="0" maxOccurs="1" />
                    <element name="rootSnapshotId" type="string"  minOccurs="0" maxOccurs="1" />
                    <element name="sourceGuid" type="string"  minOccurs="0" maxOccurs="1" />
                    <element name="errorCode" type="string"  minOccurs="0" maxOccurs="1" />
                    <element name="errorData" type="string"  minOccurs="0" maxOccurs="1" />
                    <element name="BPMN2Style" type="boolean"  minOccurs="0" maxOccurs="1" />
                </sequence>
            </extension>
        </complexContent>
    </complexType>

    <!--
         此類型用來傳回一或多個實例 ID 的執行時期錯誤詳細資料。
    -->
    <complexType name="RuntimeErrorResponse">
        <complexContent>
            <extension base="pref:Data">
                <sequence>
                    <!-- A list of zero or more failed operations -->
                    <element name="failedOperations" type="tns:FailedOperations"  minOccurs="0" maxOccurs="unbounded" />

                    <!-- A list of zero or more objects containing runtime error information for a process instance  -->
                    <element name="runtimeErrors" type="tns:RuntimeError"  minOccurs="0" maxOccurs="unbounded" />
                </sequence>
            </extension>
        </complexContent>
    </complexType>

    <!--
         此類型代表目前執行中處理程序的清單
    -->
    <complexType name="CurrentlyExecuting">
        <complexContent>
            <extension base="pref:Data">
                <sequence>

                    <!-- A list of processes IDs are currently executing -->
                    <element name="instanceIDs" type="string" minOccurs="0" maxOccurs="unbounded" />
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    
    <!-- A list of ad hoc activities. -->
    <complexType name="adHocActivities">
        <complexContent>
            <extension base="pref:Data">
                <sequence>
                    <element name="activities" type="activity:Activity" minOccurs="0" maxOccurs="unbounded"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>
</schema>

MIME 類型 :application/x-javascript

錯誤回應內容

詳細錯誤資訊。

預設內容類型為application/json.

MIME 類型 :application/json


綱目
{"description": "WLE Error Response" , 
   "type": "object",
   "properties":
   {"status": {"type": "string" ,
         "description": "The status of the previous API call."
      },
      "exceptionType": {"type": "string" ,
         "description": "The classname associated with the exception."
      },
      "errorNumber": {"type": "string" ,
         "description": "Message ID of the exception."
      },
      "errorMessage": {"type": "string" ,
         "description": "Message text of the exception."
      },
      "errorMessageParameters": {"type": ["string"] , "optional": true ,
         "description": "Message text parameters of the exception."
      },
      "programmersDetails": {"type": "object" , "optional": true ,
         "description": "Additional exception details , for example , a stack trace."
      }
   }
} 

MIME 類型 :application/xml


綱目
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://rest.bpm.ibm.com/v1/data/exception"
	elementForm預設值 = "unqualified" xmlns= "http://www.w3.org/2001/XMLSchema"
	xmlns:tns = "http://rest.bpm.ibm.com/v1/data/exception"
	xmlns:dat = "http://rest.bpm.ibm.com/v1/data/root">

    <import schemaLocation="BPMRestData.xsd" namespace="http://rest.bpm.ibm.com/v1/data/root" />
    
    <!--
	此類型代表錯誤回應。
    -->    
    <element name="RestRuntimeException">
	<complexType>
	    <sequence>
		<element name="status" type="string"/>
		<element name="Data" type="tns:ExceptionData">
    		</element>
	    </sequence>
	</complexType>
    </element>

    <!-- 
	 此類型包含與異常狀況相關聯的詳細錯誤資訊。
    -->
    <complexType name="ExceptionData">
	<sequence>
	    <element name="status" type="string"/>

	    <!-- This specifies the java class name of the exception -->
	    <element name="exceptionType" type="string"/>

	    <!-- The message ID of the error message -->
	    <element name="errorNumber" type="string" minOccurs="0"/>

	    <!-- The complete error message -->
	    <element name="errorMessage" type="string"/>

	    <!-- The list of strings inserted into the error message -->
	    <element name="errorMessageParameters" type="string" minOccurs="0" maxOccurs="unbounded"/>

	    <!-- 
		 與異常狀況相關聯的堆疊追蹤。
		 請注意,除非 "server-stacktrace-enabled" 內容
		 在伺服器的 100Custom.xml 檔案中啟用。
	    -->     
	    <element name="programmersDetails" type="string"></element>
	    
	    <!-- Prior responses.  設定是否使用大量指令 -->
	    <element name="responses" type="dat:BulkCommandResponses" minOccurs="0"></element>

            <element name="errorData" type="tns:ErrorData" minOccurs="0" />
	</sequence>
    </complexType>

    <complexType name="ErrorData">
        <sequence>
            <element name="code" type="string" />
            <element name="data" type="string" minOccurs="0" />
        </sequence>
    </complexType>
    
</schema>

MIME 類型 :application/x-javascript

狀態碼

此方法會傳回下列其中一個狀態碼:
代碼說明
200 正常成功完成。
400 不當的要求參數無效或遺漏。
401 未獲授權呼叫者未獲授權發出此要求。
406 不可接受不支援所要求的內容類型或內容編碼。
500 內部伺服器錯誤發生嚴重問題,提供程式設計師的詳細資料。

自下列時間開始可用

7.5.0

上層主題: 程序實例資源