REST API - startPageFlow

The table summarizes the REST API - startPageFlow.

Request

Format
POST <baseurl>/pageflow/start/<modulename>/<processname>/<version>
Path parameters
  • modulename: Name of the module that contains the pageflow process.
  • processname: Name of the pageflow process.
  • version: Version number of the pageflow process.

moduleName, processName and version can be obtained by using listPageFlows.

Query parameters responsetype=string (optional, default = JSON): Enumerated value defining the format of the data payload to be used in the response message - either XML or JSON.
Body formalParams element (required if the pageflow has formal parameters): Specifies the page data for the formal parameters associated with the processname pageflow.
Note: You cannot determine the names of these formal parameters programmatically. Instead, you must obtain them by examining the process in TIBCO Business Studio.

Also, if the data payload contains ComplexSpec parameters, you can view their structure in TIBCO Business Studio. There is no API to determine the structure. To view the structure in TIBCO Business Studio, you must export the XML schema, which shows the structure to which the data must conform. For information, see Obtaining Information from TIBCO Business Studio.

Do not supply a Body element if the pageflow has no formal parameters.

Response

JSON Returns a JSON representation of the contents of a startPageFlowResponse element.
XML Returns the contents of a startPageFlowResponse element (from the PageFlowService schema).

Example

Request
POST <baseurl>/pageflow/start/%2FRestSample1%2FProcessPackages%2FRestSample1.xpdl/GetInfoFromCustomer/1.0.0.201301031722
Request body
<formalParams payloadMode="XML">
   <XmlPayload>
      <inouts name="CustName" optional="false" type="String">
         <simpleSpec>
            <value>Mr Johnson</value>
         </simpleSpec>
      </inouts>
   </XmlPayload>
</formalParams>
Response
{
    "xml-fragment": {
        "@executionState": "IN_PROGRESS",
        "context": {
            "pageFlowTemplate": {
                "@moduleName": "/RestSample1/ProcessPackages/RestSample1.xpdl",
                "@processName": "GetInfoFromCustomer",
                "@version": "1.0.0.201301031722"
            },
            "processReference": {
                "id": "pvm:0a10k",
                "name": "GetInfoFromCustomer"
            }
        },
        "pageData": {
            "pageReference": {
                "@activityId": "pvm:001gk.3",
                "@activityName": "UserTask",
                "@activityModelId": "_M7STYD-XEeKt5tOzeWVpqg",
                "@moduleName": "/RestSample1/ProcessPackages/RestSample1.xpdl",
                "@moduleVersion": "1.0.0.201301031722",
                "@processName": "GetInfoFromCustomer"
            },
            "payload": {
                "@payloadMode": "JSON",
                "serializedPayload": "{\"items\":[{\"$param\":\"Field\",\"$value\":[],\"type\":\"String\",\"mode\":\"INOUT\"},{\"$param\":\"Field2\",\"$value\":[],\"type\":\"String\",\"mode\":\"INOUT\"}]}"
            }
        }
    }
}