PUT /rest/bpm/wle/v1/service/{instanceId}?action={string}[&parts={string}]
POST /rest/bpm/wle/v1/service/{instanceId}?action={string}[&parts={string}]
instanceId
parameter should be specified as the service instance identifier, which is the value that is returned as the key
element
within the ServiceRunModel
response when a service is started.Name | Value Type | Description |
---|---|---|
action | string | A string indicating the specific action to be taken on the service.
This action must be one of the actions defined in the service's
ServiceRunModel parameter value.
Example: ...action=bg0_ok |
Name | Value Type | Description |
---|---|---|
parts | string | A string indicating which parts of the response data should be returned. You can use the following values:
data , all (the default), or none . |
None
The default content type is application/json.
{ "description": "WLE Service Run Model", "type": "object", "properties": { "serviceStatus": {"type": "string", "description": "Status of the service.", "enum": [ "end", "running", "coach", "error", "debug" ] }, "key": {"type": "string", "description": "The ID of the running server or task instance. This is the ID to use when resuming the service or task." }, "step": {"type": "string", "description": "The ID of the current step within the context of the running service." }, "data": {"type": "[object]", "description": "The data (symbol table) associated with the running service." }, "coach": {"type": "string", "description": "If the service status is "coach", this field contains the coach XML data." }, "coachEvals": {"type": "map", "description": "If the service status is "coach", this field contains attribute/value pairs representing evaluated coach values." }, "actions": {"type": "string", "description": "If the service statis is "coach", this field contains a list of available actions (end point)." } "actionsMap": {"type": "map", "description": "If the service status is "coach", this field contains attribute/value representing actions and names" }, } }
{ "status":"200", "data":{ "serviceStatus":"coach", "key":"@2", "step":"Create job requisition", "data":{ "instanceId":null, "currentPosition":{ "replacement":{ } }, "requisition":{ "instanceId":null, "date":"2011-04-28T18:22:34Z" } }, "coach":"<Form xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n <FormTitle>Create Job Requisition</FormTitle>\n\n \n</Form>", "coachEvals":{ }, "actions":{ "bg0_ok" }, "actionsMap":{ "bg0_ok" : "Ok" } } }\n \n \nJob Requisition Information \n\n
\n\n \n\n \n\n \n \nRequisition \n\n
\n\n \n\n \n\n \nSection Title \n\n
\n\n \n\n \n\n <InputText binding=\"tw.local.requisition.reqNum\">\n \n </InputText>\n \n <InputText binding=\"tw.local.requisition.requestor\">\n \n </InputText>\n \n\n \n\n \n \n \n--Select a status-- \nFull time \nPart time \nContract \n <BasedOn type=\"None\" />\n\n \n \n\n \n \n \n--Select a location-- \nBoston \nAustin \nAtlanta \n <BasedOn type=\"None\" />\n\n \n \n\n \n \n \n--Select a position type-- \nNew \nExisting \n <BasedOn type=\"None\" />\n\n \n \n\n \n\n \n <BasedOn />\n \n\n \n\n \n \n \n--Select a department-- \nFinance \nProducts \nMarketing \nSales \nCustomer Service \n <BasedOn type=\"None\" />\n\n \n <InputText binding=\"tw.local.requisition.empNum\">\n \n </InputText>\n \n\n <InputText binding=\"tw.local.currentPosition.jobTitle\">\n \n </InputText>\n \n\n \n\n \n
<?xml version="1.0" encoding="UTF-8"?> <schema targetNamespace="http://rest.bpm.ibm.com/v1/data/service" elementFormDefault="unqualified" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://rest.bpm.ibm.com/v1/data/service" xmlns:pref="http://rest.bpm.ibm.com/v1/data/root" xmlns:cmn="http://rest.bpm.ibm.com/v1/data/common"> <import schemaLocation="Common.xsd" namespace="http://rest.bpm.ibm.com/v1/data/common"/> <import schemaLocation="BPMRestData.xsd" namespace="http://rest.bpm.ibm.com/v1/data/root"/> <!-- This type represents a service model. --> <complexType name="ServiceModel"> <complexContent> <extension base="pref:Data"> <sequence> <!-- This field corresponds to the "header" part of the service model --> <element name="header" type="tns:Header"/> <!-- This field corresponds to the "diagram" part of the service model --> <element name="diagram" type="tns:Diagram"/> <!-- This field corresponds to the "dataModel" part of the service model --> <element name="dataModel" type="tns:DataModel"/> </sequence> </extension> </complexContent> </complexType> <complexType name="Header"> <sequence> <!-- The unique ID of the service --> <element name="UUID" type="string" /> <!-- The type of the service --> <element name="type" type="string" /> <!-- The name of the service --> <element name="name" type="string" /> <!-- The description of the service --> <element name="description" type="string" /> <element name="richDescription" type="string" /> <!-- The snapshot ID of the service --> <element name="snapshotId" type="string" /> <!-- Warning --> <element name="warning" type="string" /> <!-- not used --> <element name="startTaskURL" type="string" /> <!-- not used --> <element name="startServiceURL" type="string" /> </sequence> </complexType> <complexType name="Diagram"> <sequence> <!-- The list of steps associated with the service --> <element name="step" type="tns:ServiceStep" minOccurs="0" maxOccurs="unbounded" /> </sequence> </complexType> <complexType name="DataModel"> <sequence> <!-- The variables (properties) associated with the service The key is the name of the property. The value containing a description of the property: * type (name of the type) * isList * description * richDescription --> <element name="properties" type="cmn:Map" /> <!-- The input variables associated with the service The key is the name of the variable. The value containing a description of the parameter: * type (name of the type) * isList * description * richDescription --> <element name="inputs" type="cmn:Map" /> <!-- The output variables associated with the service The key is the name of the variable. TThe value containing a description of the parameter: * type (name of the type) * isList * description * richDescription --> <element name="outputs" type="cmn:Map" /> <!-- Detailed information about the types referenced by the service. Each type referenced above and nested types are described. The key is the name of the type. The value is an map of information about the type Here are some of the fields: * ID, pattern, properties, isShared, options, min, max, description, fixedLength --> <!-- A structure explaining the data model of the service --> <element name="validation" type="cmn:Map" /> </sequence> </complexType> <!-- This type represents a step associated with a service. --> <complexType name="ServiceStep"> <sequence> <!-- The step ID --> <element name="ID" type="string" /> <!-- The step name --> <element name="name" type="string" /> <!-- The X, Y coordinate of the center point of the step within the diagram --> <element name="x" type="int" /> <element name="y" type="int" /> <!-- The step type --> <element name="type" type="string" /> <!-- Web Service Integration Data --> <element name="data" type="tns:WSIntegrationData" /> <!-- The set of lines extending out from this step within the diagram --> <element name="lines" type="tns:ServiceStepLines" /> </sequence> </complexType> <!-- This type represents webservices integration data --> <complexType name="WSIntegrationData"> <sequence> <element name="wsdlURI" type="string" /> <element name="serviceName" type="string" /> <element name="portName" type="string" /> <element name="operationName" type="string" /> <element name="isProtectedWSDL" type="boolean" /> <element name="isOverrideEndpointAddress" type="boolean" /> <element name="endpointAddressURL" type="string" /> </sequence> </complexType> <!-- This type represents a set of lines associated with a service step --> <complexType name="ServiceStepLines"> <sequence> <element name="stepLine" minOccurs="0" maxOccurs="unbounded" type="tns:ServiceStepLine" /> </sequence> </complexType> <!-- This type represents a single line associated with a service step --> <complexType name="ServiceStepLine"> <sequence> <!-- The ID of the step to which this line extends --> <element name="to" type="string" /> <!-- A string containing a comma-separated list of coordinates through which this line extends. The list of points must contain the first point (coordinate of the "fromPort") and the last point (coordinate of the "toPort"). --> <element name="points" type="string" /> </sequence> </complexType> <!-- This type contains information related to a running service --> <complexType name="ServiceRunModel"> <complexContent> <extension base="pref:Data"> <sequence> <!-- The status of the service; values: "end", "running", "coach", "error", "debug" --> <element name="serviceStatus" type="string" /> <!-- The ID of the running service or task instance. This is the ID to be used when resuming the service or task. --> <element name="key" type="string" /> <!-- The ID of the current step within the context of the running service --> <element name="step" type="string" /> <!-- The flag to determine if it was reset back to a certain step --> <element name="reset" type="boolean" /> <!-- The unique ID of the current step within the context of the running service --> <element name="stepId" type="string" /> <!-- The ID of the PO that implements the step --> <element name="poId" type="string" /> <!-- The ID of the processItem of the step --> <element name="processItemId" type="string" /> <!-- The data (symbol table) associated with the running service --> <element name="data" type="anyType" /> <!-- If the service status is "coach", this field contains the coach XML data --> <element name="coach" type="string" /> <!-- If the service status is "coach", this field contains a Map of evaluated coach values --> <element name="coachEvals" type="cmn:Map" /> <!-- If the service status is "coach", this field contains a list of available actions (end point) --> <element name="actions" type="string" minOccurs="0" maxOccurs="unbounded" /> <!-- If the service status is "coach", this field contains a map of actions and associated labels --> <element name="actionsMap" type="cmn:Map" /> </sequence> </extension> </complexContent> </complexType> <complexType name="CoachEval"> <sequence> <element name="ID" type="string" /> <element name="value" type="string" /> </sequence> </complexType> <!-- This type represents a list of currently running services --> <complexType name="CurrentlyRunning"> <complexContent> <extension base="pref:Data"> <sequence> <!-- A list of keys of services that are currently running for the current user --> <element name="instanceIDs" type="string" minOccurs="0" maxOccurs="unbounded" /> </sequence> </extension> </complexContent> </complexType> <!-- This type represents the result obtained from evaluating a javascript expression within the context of a currently running service --> <complexType name="Result"> <complexContent> <extension base="pref:Data"> <sequence> <element name="result" type="string" minOccurs="0" maxOccurs="1" /> <!-- Data information stored in an actual Map --> <element name="resultMap" type="cmn:Map" minOccurs="0"/> </sequence> </extension> </complexContent> </complexType> </schema>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <bpm:ResponseData xmlns:bpm='http://rest.bpm.ibm.com/v1/data'> <status>200</status> <data xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:svc='http://rest.bpm.ibm.com/v1/data/service' xsi:type='svc:ServiceRunModel'> <serviceStatus>coach</serviceStatus> <key>@1</key> <step>Create job requisition</step> <data xsi:type='cmn:Map' xmlns:cmn='http://rest.bpm.ibm.com/v1/data/common'> <item key='instanceId' /> <item key='currentPosition'> <value xsi:type='cmn:Map'> <item key='replacement'> <value xsi:type='cmn:Map' /> </item> </value> </item> <item key='requisition'> <value xsi:type='cmn:Map'> <item key='instanceId' /> <item key='date'> <value xmlns:ns6='http://www.w3.org/2001/XMLSchema' xsi:type='ns6:string'>2011-04-28T18:19:52Z</value> </item> </value> </item> </data> <coach><Form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <FormTitle>Create Job Requisition</FormTitle> <Layout> <Visibility /> <Section columns="1"> <SectionTitle visible="true">Job Requisition Information</SectionTitle> <Row rows="1"> <Column> <Control col="1" colspan="1" id="Section0" row="1" rowspan="1"> <Visibility /> <Section binding="tw.local.requisition" columns="1"> <SectionTitle visible="false">Requisition</SectionTitle> <Row rows="1"> <Column> <Control col="1" colspan="1" id="section2" row="1" rowspan="1"> <Section columns="2"> <SectionTitle id="sectionTitle" visible="false">Section Title</SectionTitle> <Row rows="5"> <Column width="50%"> <Control col="1" colspan="1" id="InputText3" row="1" rowspan="1"> <Visibility /> <InputText binding="tw.local.requisition.reqNum"> <Label visible="true">Requisition number:</Label> </InputText> </Control> <Control col="1" colspan="1" id="InputText2" row="2" rowspan="1"> <InputText binding="tw.local.requisition.requestor"> <Label visible="true">Hiring manager:</Label> </InputText> </Control> <Control col="1" colspan="1" id="InputText1" row="3" rowspan="1"> <Visibility default="required" overrideParentVisibility="true" /> <SingleSelect binding="tw.local.requisition.status"> <Label visible="true">Employment status:</Label> <StaticOption value="">--Select a status--</StaticOption> <StaticOption value="Full time">Full time</StaticOption> <StaticOption value="Part time">Part time</StaticOption> <StaticOption value="Contract">Contract</StaticOption> <BasedOn type="None" /> <VisualDropDown /> </SingleSelect> </Control> <Control col="1" colspan="1" id="InputText8" row="4" rowspan="1"> <Visibility default="required" overrideParentVisibility="true" /> <SingleSelect binding="tw.local.requisition.location"> <Label visible="true">Location:</Label> <StaticOption value="">--Select a location--</StaticOption> <StaticOption value="Boston">Boston</StaticOption> <StaticOption value="Austin">Austin</StaticOption> <StaticOption value="Atlanta">Atlanta</StaticOption> <BasedOn type="None" /> <VisualDropDown /> </SingleSelect> </Control> <Control col="1" colspan="1" id="InputText4" row="5" rowspan="1"> <Visibility default="required" overrideParentVisibility="true" /> <SingleSelect binding="tw.local.currentPosition.positionType"> <Label visible="true">Position type:</Label> <StaticOption value="">--Select a position type--</StaticOption> <StaticOption value="New">New</StaticOption> <StaticOption value="Existing">Existing</StaticOption> <BasedOn type="None" /> <VisualDropDown /> </SingleSelect> </Control> </Column> <Column width="50%"> <Control col="2" colspan="1" id="DateSelector0" row="1" rowspan="1"> <OutputText binding="tw.local.requisition.date"> <Label visible="true">Date:</Label> <BasedOn /> </OutputText> </Control> <Control col="2" colspan="1" id="InputText7" row="2" rowspan="1"> <Visibility default="required" overrideParentVisibility="true" /> <SingleSelect binding="tw.local.requisition.department"> <Label visible="true">Department:</Label> <StaticOption value="">--Select a department--</StaticOption> <StaticOption value="Finance">Finance</StaticOption> <StaticOption value="Products">Products</StaticOption> <StaticOption value="Marketing">Marketing</StaticOption> <StaticOption value="Sales">Sales</StaticOption> <StaticOption value="Customer Service">Customer Service</StaticOption> <BasedOn type="None" /> <VisualDropDown /> </SingleSelect> </Control> <Control col="2" colspan="1" id="InputText10" row="3" rowspan="1"> <InputText binding="tw.local.requisition.empNum"> <Label visible="true">Number of employees needed:</Label> </InputText> </Control> <Control col="2" colspan="1" id="InputText5" row="4" rowspan="1"> <InputText binding="tw.local.currentPosition.jobTitle"> <Label visible="true">Job title:</Label> </InputText> </Control> <Control col="2" colspan="1" id="bg0" row="5" rowspan="1"> <ButtonGroup> <Label visible="true" /> <Button decisionPoint="true" id="ok"> <Label>Next &gt;&gt;</Label> </Button> </ButtonGroup> </Control> </Column> </Row> </Section> </Control> </Column> </Row> </Section> </Control> </Column> </Row> </Section> </Layout> </Form></coach> <coachEvals /> <actions>bg0_ok</actions> <actionsMap xsi:type='cmn:Map' xmlns:cmn='http://rest.bpm.ibm.com/v1/data/common'> <item key='bg0_ok'> <value xmlns:ns6='http://www.w3.org/2001/XMLSchema' xsi:type='ns6:string'>Ok</value> </item> </actionsMap> </data> </bpm:ResponseData>
The default content type is 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." } } }
<?xml version="1.0" encoding="UTF-8"?> <schema targetNamespace="http://rest.bpm.ibm.com/v1/data/exception" elementFormDefault="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" /> <!-- This type represents an error response. --> <element name="RestRuntimeException"> <complexType> <sequence> <element name="status" type="string"/> <element name="Data" type="tns:ExceptionData"> </element> </sequence> </complexType> </element> <!-- This type contains detailed error information associated with an exception. --> <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"/> <!-- The stacktrace associated with the exception. Note that this will be omitted unless the "server-stacktrace-enabled" property is enabled in the server's 100Custom.xml file. --> <element name="programmersDetails" type="string"></element> <!-- Prior responses. Set if a bulk command was used --> <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>
Code | Description |
---|---|
200 OK | Success completion. |
400 Bad Request | The parameters are not valid or they are missing. |
401 Unauthorized | The caller is not authorized for this request. |
404 Not Found | The service does not exist.
|
406 Not Acceptable | The requested content type or content encoding is not supported. |
500 Internal Server Error | A severe problem has occurred, programmer's details are provided. |
501 Not Implemented | The request is not supported.
|
7.5.0
Parent Topic: Service Resource