<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    網(wǎng)路冷眼@BlogJava

    熙熙攘攘一閑人 以冷靜的眼光觀察技術(shù)
    posts - 88, comments - 193, trackbacks - 0, articles - 28
      BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

    Chapter 14. REST API

    Table of Contents

    Repository(倉庫)
    Get Deployments(獲取部署)
    Get Deployment Resource(獲取部署資源)
    Delete Deployment(刪除一個(gè)部署)
    Delete Deployments(刪除多個(gè)部署)
    Engine(引擎)
    Get Process Engine(獲取流程引擎)
    Processes(流程)
    List Process Definitions(列出多個(gè)流程定義)
    Get Process Definition(獲取流程定義)
    Get Process Definition Form(獲取流程定義的格式)
    Start Process Instance(啟動流程實(shí)例)
    Tasks(任務(wù))
    Get Task Summary(獲取任務(wù)概要)
    List Tasks(列出多個(gè)任務(wù))
    Get Task(獲取一個(gè)任務(wù))
    Get Task Form(獲取任務(wù)格式)
    Perform Task Operation(執(zhí)行任務(wù)操作)
    Identity(身份認(rèn)證)
    Login(登錄)
    Get User(獲取一個(gè)用戶)
    List User's Groups(列表用戶所在的組)
    Get Group(獲取用戶組)
    List Group Users(列表多個(gè)組用戶)
    Management(管理)
    List Jobs(列出多個(gè)作業(yè))
    Get Job(獲取一個(gè)作業(yè))
    Execute Job(執(zhí)行一個(gè)作業(yè))
    Execute Jobs(執(zhí)行多個(gè)作業(yè))
    List Database Tables(列表顯示數(shù)據(jù)庫表)
    Get Table Meta Data(獲取庫表元數(shù)據(jù))
    Get Table Data(獲取庫表數(shù)據(jù))

    <EXPERIMENTAL> ... the whole REST interface is still experimental

    <EXPERIMENTAL> ...整個(gè)REST接口仍處于實(shí)驗(yàn)性階段。

    Activiti includes a REST API to the engine that will be deployed to your server when you run the setup script. The REST API uses JSON format (http://www.json.org) and is built upon the Spring Webscripts (http://www.springsurf.org).

    當(dāng)你運(yùn)行setup腳本時(shí),Activiti包括了可以部署到服務(wù)器上的引擎REST API。REST API使用JSON格式(http://www.json.org)并在Spring Webscripts((http://www.springsurf.org)上構(gòu)建。

    It is possible to browse the REST API if you point your browser to http://localhost:8080/activiti-rest/service/index and login as one of the admin users (kermit). If you click the "Browse by Web Script Package" link you will get an overview of the packages that are deployed on the server and you can easily navigate into a package to see the REST API calls that are defined for that package. The "Alfresco JavaScript Debugger" can be ignored since Java is used instead of JavaScript to implement the logic.

    如果你把瀏覽器指向http://localhost:8080/activiti-rest/service/index 并登錄為一個(gè)管理員用戶(kermi),可能瀏覽REST API。如果你點(diǎn)擊“Browse by Web Script Package“連接,你將得到那些部署到服務(wù)器山包的概要,你能夠輕易地瀏覽定義在那個(gè)包的REST API調(diào)用。因?yàn)槭褂肑ava替代Javascript實(shí)現(xiàn)這個(gè)邏輯,所以能夠忽略 "Alfresco JavaScript Debugger" 。

    Each REST API call has its individual authorization level and you must be logged in as a user to invoke a REST API call (except for the /login service). Authentication is done using Basic HTTP Authentication, so if you logged in as an admin (i.e. kermit) to browse the REST API, as described above, you should be able to perform all calls as described below.

    每個(gè)REST API調(diào)用具有它單個(gè)的認(rèn)證級別,為了調(diào)用REST API方法,你必須一個(gè)用戶登錄(除了/login服務(wù))。因?yàn)槭褂没镜腍TTP認(rèn)證( Basic HTTP Authentication)來完成,所以如果你以一個(gè)管理員登錄(例如kermit)可以瀏覽以上的REST API,那么你應(yīng)當(dāng)能夠完成如下的所有的調(diào)用。

    The API follows normal REST API conventions using GET for read operations, POST for creating objects, PUT for updating and performing operations on already created objects and finally DELETE for deleting objects. When performing a call that affects multiple objects POST is used on all such operations for consistency and making sure that an unlimited number of objects may be used. The reason for using POST is that the HTTP DELETE method doesn't implicitly allow request bodies and therefore, a call using DELETE, in theory, could get it's request body stripped out by a proxy. So to be certain this doesn't happen we use POST, even when PUT could have been used to update multiple objects, for consistency.

    API遵從通常的REST API約定:用GET讀取操作,用POST建立對象,用PUT在已經(jīng)建立的對象上更新和執(zhí)行操作,最后用DELETE刪除對象。為了一致性,并且可以使用無限的對象,當(dāng)執(zhí)行影響多個(gè)對象的調(diào)用時(shí),使用POST。使用POST的原因,是HTTP DELETE方法不允許顯式使用請求包體。理論上使用DELETE的調(diào)用可能得到被代理裁剪的請求包體。所以,在某種程度上,我們使用POST就不會發(fā)生這種情況。甚至當(dāng)當(dāng)可能使用PUT來更新多個(gè)對象時(shí),為了保證一致性,也采用POST。

    The base URL for invoking a REST call is http://localhost:8080/activiti-rest/service/. So for example to list the process definitions in the engine point your browser to: http://localhost:8080/activiti-rest/service/process-engine

    調(diào)用REST方法的基本URL是http://localhost:8080/activiti-rest/service/。所以,為了列出引擎里面的流程定義,請將瀏覽器指向:http://localhost:8080/activiti-rest/service/process-engine

    Please look below to see what REST API calls that currently are available. Please consider the "API" sections as a "one line hint" to what functionality of the core API that is used to implement the REST API call.

    請查看下面的當(dāng)前可獲得的REST API調(diào)用。請參考"API"部分作為對core API具有的功能性的“一行提示(one line hint)"。核心API用來實(shí)現(xiàn)REST API 調(diào)用。

    Repository(倉庫)

    Get Deployments(獲取部署)

    Returns a paginated list deployments that can be sorted by "id", "name" or "deploymentTime".

    返回可以以分頁列表顯示的部署。部署能夠以"id", "name"或 or "deploymentTime"排序

    • Request: GET /deployments?start={start=0}&size={size=10}&sort={sort=id}&order={order=asc}

    • API: ProcessEngines.getProcessEngine(configuredProcessEngineName).getRepositoryService().createDeploymentQuery().listPage()

    • Response:

      {
          "data": [
          {
          "id": "10",
          "name": "activiti-examples.bar",
          "deploymentTime": "2010-10-13T14:54:26.750+02:00"
          }
          ],
          "total": 1,
          "start": 0,
          "sort": "id",
          "order": "asc",
          "size": 1
          }
    Get Deployment Resource(獲取部署資源)

    Returns a resource from the deployment. Example: /deployment/10/resource/org/activiti/examples/bpmn/usertask/FinancialReportProcess.bpmn20.xml

    從部署獲取資源。例如:/deployment/10/resource/org/activiti/examples/bpmn/usertask/FinancialReportProcess.bpmn20.xml

    • Request: GET /deployment/{deploymentId}/resource/{resourceName}

    • API: ProcessEngines.getProcessEngine(configuredProcessEngineName).getRepositoryService().getResourceAsStream(deploymentId, resourceName)

    • Response:

      I.e a .bpmn20.xml file, an image or whatever type of file the deployment resource contained.
    Delete Deployment(刪除一個(gè)部署)

    Deletes a deployment.

    刪除一個(gè)部署.

    • Request: DELETE /deployment/{deploymentId}?cascade={cascade?}

    • API: ProcessEngines.getProcessEngine(configuredProcessEngineName).getRepositoryService().deleteDeployment(deploymentId)

    • Response:

      {
          "success": true
          }
    Delete Deployments(刪除多個(gè)部署)

    Deletes multiple deployment.

    刪除多個(gè)部署。

    • Request: POST /deployments?cascade={cascade?}

      {
          "deploymentIds": [ "10", "11" ]
          }
    • API: ProcessEngines.getProcessEngine(configuredProcessEngineName).getRepositoryService().deleteDeployment(deploymentId)

    • Response:

      {
          "success": true
          }

    Engine(引擎)

    Get Process Engine(獲取流程引擎)

    Returns the process engine initialization details. If something went wrong during startup, details about the error will be given in the "exception" attribute in the response.

    返回流程引擎初始化過程的細(xì)節(jié)。如果在啟動階段有錯(cuò),細(xì)節(jié)將顯示在響應(yīng)里面的"異常"屬性。

    • Request: GET /process-engine

    • API: ProcessEngines.getProcessEngine(configuredProcessEngineName)

    • Response:

      {
          "name": "default",
          "resourceUrl": "jar:file:\//<path-to-deployment>\/activiti-cfg.jar!\/activiti.properties",
          "exception": null,
          "version": "5.0-SNAPSHOT"
          }

    Processes(流程)

    List Process Definitions(列出多個(gè)流程定義)

    Returns details about the deployed process definitions that can be sorted by "id", "name", "version" or "deploymentTime". The name of the BPMN2.0 XML process diagram is given in the "resourceName" attribute and can, in combination with the "deploymentId" attribute, be retrieved from the GET Deployment Resource REST API call above. If the process has a start form it is given in the "startFormResourceKey" attribute. The start form for a process can be retrieved from the GET Start Process Form REST API call.

    返回有關(guān)已部署流程定義的細(xì)節(jié)。流程定義能夠按"id", "name", "version" 或 "deploymentTime"排序。和“deploymentId"屬性組合,在“resourceName"屬性給定的BPMN 2.0 XML流程圖的名稱能夠從GET Deployment Resource REST API 。以上的調(diào)用檢索出來。一個(gè)流程的開始格式能夠從GET Start Process Form REST Form REST API 調(diào)用檢索出來。

    • Paginated Request: GET /process-definitions?start={start=0}&size={size=10}&sort={sort=id}&order={order=asc}

    • API: ProcessEngines.getProcessEngine(configuredProcessEngineName).getProcessService().findProcessDefinitions()

    • Paginated Response:

      {
          "data": [
          {
          "id": "financialReport:1",
          "key": "financialReport",
          "version": 1,
          "name": "Monthly financial report",
          "resourceName": "org/activiti/examples/bpmn/usertask/FinancialReportProcess.bpmn20.xml",
          "deploymentId": "10",
          "startFormResourceKey": null
          }
          ],
          "total": 1,
          "start": 0,
          "sort": "id",
          "order": "asc",
          "size": 1
          }
    Get Process Definition(獲取流程定義)

    Returns details about a deployed process definition.

    獲取一個(gè)已部署流程定義的細(xì)節(jié)。

    • Request: GET /process-definition/{processDefinitionId}

    • API: ProcessEngines.getProcessEngine(configuredProcessEngineName).getProcessService().findProcessDefinitionById(processDefinitionId)

    • Response:

      {
          "id": "financialReport:1",
          "key": "financialReport",
          "version": 1,
          "name": "Monthly financial report",
          "resourceName": "org/activiti/examples/bpmn/usertask/FinancialReportProcess.bpmn20.xml",
          "deploymentId": "10",
          "startFormResourceKey": null
          }
    Get Process Definition Form(獲取流程定義的格式)

    Returns a process definition's form.

    返回一個(gè)流程定義的格式。

    • Request: GET /process-definition/{processDefinitionId}/form[?format=html|json]

    • API: ProcessEngines.getProcessEngine(configuredProcessEngineName).getTaskService().getRenderedStartFormById(processDefinitionId)

    • Response:

      <user-defined-response>
    Start Process Instance(啟動流程實(shí)例)

    Creates a process instance based on a process definition and returns details about the newly created process instance. Additional variables (from a form) may be passed using the body object. In other words placing attributes next to the "processDefinitionId" attribute.

    創(chuàng)建一個(gè)基于流程定義的流程實(shí)例并返回新創(chuàng)建的流程實(shí)例的細(xì)節(jié)。通過body對象可以傳送額外的變量(來自表單)。換句話說,將屬性放置到"processDefinitionId"屬性之后。

    These additional variables may also be described using "meta data fields". A variable named "numberOfDays" with value "2" may be described as an int using an extra variable named "numberOfDays_type" set to "Integer" and to describe it as a required variable use an extra variable named "numberOfDays_required" set to "true". If no type descriptor is used the value will be treated as a String as long as its surrounded by '"'-characters. Its also possible to set the type to "Boolean".

    這些額外的變量也可以使用"meta data fields"來描述。帶有值為”2“的名為"numberOfDays"的變量可以描述為int。使用額外的名叫numberOfDays_type的變量設(shè)置為”Integer“。使用額外的設(shè)置為”true“的名叫”numberOfDays_required“的變量來作為需要的變量來描述。如果沒有類型,一旦用""字符包圍,在值里面使用的描述符將以字符串對待。

    Note that if a value is submitted as true (instead of "true") it will be treated as a Boolean even if no descriptor is used. The same is also valid for number, i.e., 123 will become an Integer but "123" will become a String (unless a descriptor is defined). Note that no variables containing "_" in the name will be saved, they are only treated as meta data fields.

    注意如果以true提交(代替"true"),甚至沒有使用描述符,它將以Boolen值對待。同樣對數(shù)值也一樣,例如123將成為一個(gè)Integer,而”123“將成為字符串(除非定義一個(gè)描述符)。注意在名稱里面包含"_" 的變量將不被保存,它們只是作為元數(shù)據(jù)的字段。

    The reason for using these meta data fields is to make it possible using a standard HTML form to submit the values (since an HTML form submits everything as strings its not possible to distinguish the type of a value as in JSON). HTML submission will be supported in the near future. It is of course not an optimal solution to let the client send instructions to the server about which variables that are required and what type they have, but this is a temporary solution to enable simple form handling. We are currently looking for more proper solutions for forms, containing real meta models that can be used on the server to avoid using meta data fields like above. I.e. X-forms or Alfresco Forms. Please feel free to give suggestions or tips in the Activiti Forum.

    使用這些元數(shù)據(jù)字段的理由是使得采用標(biāo)準(zhǔn)的HTML表單來提交這些值成為可能(因?yàn)镠TML表單以字符串方式提交任何類型,而在JSON里面區(qū)分值類型是不可能的)。在不遠(yuǎn)的將來將支持HTML提交。當(dāng)然,盡管讓客戶將有關(guān)需要那個(gè)變量及其類型的指令發(fā)送到服務(wù)器并不是優(yōu)選,但是這是讓簡單表單處理的臨時(shí)方案。我們現(xiàn)在正在尋找表單更合適的解決方案,包括為了避免使用上述元數(shù)據(jù)字段而在服務(wù)器端使用的真實(shí)的元模型。例如,X-forms 或者 Alfresco Forms.請?jiān)贏ctiviti論壇上自由發(fā)表建議和提示。

    • Request: POST /process-instance

      {
          "processDefinitionId":"financialReport:1"
          }
    • API: ProcessEngines.getProcessEngine(configuredProcessEngineName).getProcessService().startProcessInstanceById(processDefinitionId[, variables])

    • Response:

      {
          "id": "217",
          "processDefinitionId": "financialReport:1",
          "activityNames": ["writeReportTask"],
          "ended": true
          }

    Tasks(任務(wù))

    Get Task Summary(獲取任務(wù)概要)

    Returns a task summary for a specific user: The number of tasks assigned the user, how many unassigned tasks that the user may claim and how many unassigned tasks there are per group that the user is a member of.

    返回某一用戶的任務(wù)概要:分配給用戶的任務(wù)數(shù)目,用戶可以領(lǐng)取的未分配任務(wù)的數(shù)目,以及用戶所在每個(gè)組具有的未分配的任務(wù)數(shù)目。

    • Request: GET /tasks-summary?user={userId}

    • API: ProcessEngines.getProcessEngine(configuredProcessEngineName).getTaskService().createTaskQuery().xxx().count()

    • Response:

      {
          "assigned": {
          "total": 0
          },
          "unassigned": {
          "total": 1,
          "groups":
          {
          "accountancy": 1,
          "sales": 0,
          "engineering": 0,
          "management": 0
          }
          }
          }
    List Tasks(列出多個(gè)任務(wù))

    Returns a paginated list of tasks that can be sorted by: "id", "name", "description", "priority", "assignee", "executionId" or "processInstanceId". The list must be based on a user of a specific role: assignee (lists the tasks assigned to the user) or candidate (lists the tasks that the user may claim) or a candidate group (lists tasks that the members of the group may claim). If the task has a form it is given in the "formResourceKey" attribute. The form for a task can be retrieved from the GET Task Form REST API call.

    返回能夠按"id", "name", "description", "priority", "assignee", "executionId" 或 "processInstanceId"排序的多個(gè)任務(wù)的分頁列表。這個(gè)列表必須基于某個(gè)角色的用戶:受托人(列出分配給用戶的任務(wù))或者候選人(列出用戶可以領(lǐng)取的任務(wù))或者候選人組(列出組成員可以領(lǐng)取任務(wù))。如果這個(gè)任務(wù)有一個(gè)表單,在"formResourceKey" 屬性里給出。任務(wù)表單可以從 GET Task Form REST API調(diào)用中檢索。

    • Paginated Request: GET /tasks?[assignee={userId}|candidate={userId}|candidate-group={groupId}]&start={start=0}&size={size=10}&sort={sort=id}&order={order=asc}

    • API: ProcessEngines.getProcessEngine(configuredProcessEngineName).getTaskService().createTaskQuery().xxx().listPage()

    • Paginated Response:

      {
          "data": [
          {
          "id": 127,
          "name": "Handle vacation request",
          "description": "Vacation request by Kermit",
          "priority": 50,
          "assignee": null,
          "executionId": 118,
          "formResourceKey": "org/activiti/examples/taskforms/approve.form"
          }
          ],
          "total": 1,
          "start": 0,
          "sort": "id",
          "order": "asc",
          "size": 1
          }
    Get Task(獲取一個(gè)任務(wù))

    Returns details about the task with the task id

    . 返回帶有task id的任務(wù)有關(guān)的細(xì)節(jié)。

    • Request: GET /task/{taskId}

    • API: ProcessEngines.getProcessEngine(configuredProcessEngineName).getTaskService().findTask(taskId)

    • Response:

      {
          "id": 127,
          "name": "Handle vacation request",
          "description": "Vacation request by Kermit",
          "priority": 50,
          "assignee": null,
          "executionId": 118,
          "formResourceKey": "org/activiti/examples/taskforms/approve.form"
          }
    Get Task Form(獲取任務(wù)格式)

    Returns a task's form.

    返回一個(gè)任務(wù)的格式。

    • Request: GET /task/{taskId}/form

    • API: ProcessEngines.getProcessEngine(configuredProcessEngineName).getTaskService().getRenderedTaskForm(taskId)

    • Response:

      <user-defined-response>
    Perform Task Operation(執(zhí)行任務(wù)操作)

    Performs an operation (claim or complete) on a task. For the "complete" operation additional variables (from a form) may be passed in the body. To read more about additional variables from forms, visit the Start Process Instance section

    在任務(wù)上執(zhí)行操作(領(lǐng)取或者完成)。針對“完成“操作,可以在包體里面?zhèn)魉偷念~外的變量(來自格式)。為了讀取來自格式里面的額外變量,訪問“啟動流程示例( Start Process Instance)部分。

    • Request: PUT /task/{taskId}/[claim|complete]

      {}
    • API: ProcessEngines.getProcessEngine(configuredProcessEngineName).getTaskService().xxx(taskId ...)

    • Response:

      {
          "success": true
          }

    Identity(身份認(rèn)證)

    Login(登錄)

    Authenticates a user. If user and password doesn't match a response with status 403 is returned. If authentication is successful, a response with status 200 is returned.

    認(rèn)證一個(gè)用戶。如果用戶和密碼不一致,返回一個(gè)狀態(tài)為403的響應(yīng)。如果認(rèn)證成功,返回一個(gè)狀態(tài)為200的狀態(tài)。

    • Request: POST /login

      {
          "userId": "kermit",
          "password": "kermit"
          }
    • API: ProcessEngines.getProcessEngine(configuredProcessEngineName).getIdentityService().checkPassword(userId, password)

    • Response:

      {
          "success": true
          }
    Get User(獲取一個(gè)用戶)

    Returns details about a user.

    返回有關(guān)一個(gè)用戶的細(xì)節(jié)。

    • Request: GET /user/{userId}

    • API: ProcessEngines.getProcessEngine(configuredProcessEngineName).getIdentityService().findUser(userId)

    • Response:

      {
          "id": "kermit",
          "firstName": "Kermit",
          "lastName": "the Frog",
          "email": "kermit@server.com"
          }
    List User's Groups(列表用戶所在的組)

    Returns a paginated list groups belonging to a user that can be sort by "id", "name" or "type". To only get groups of a certain type use the "type" parameter.

    返回屬于一個(gè)用戶的可分頁列表的組。用戶能夠按 "id", "name" 或or "type"排序。只獲取某一類型的組,使用“type“參數(shù)。

    • Paginated Request: GET /user/{userId}/groups[?type=groupType]?start={start=0}&size={size=10}&sort={sort=id}&order={order=asc}

    • API: ProcessEngines.getProcessEngine(configuredProcessEngineName).getIdentityService().xxx(userId[, groupType])

    • Paginated Response:

      {
          data: [
          {
          "id": "admin",
          "name": "System administrator",
          "type": "security-role"
          }
          ],
          "total": 1,
          "start": 0,
          "sort": "id",
          "order": "asc",
          "size": 1
          }
    Get Group(獲取用戶組)

    Returns details about a group.

    返回有關(guān)組的細(xì)節(jié)。

    • Request: GET /group/{groupId}

    • API: ProcessEngines.getProcessEngine(configuredProcessEngineName).getIdentityService().findGroup(groupId)

    • Response:

      {
          "id": "admin",
          "name": "System administrator",
          "type": "security-role"
          }
    List Group Users(列表多個(gè)組用戶)

    Returns details about a group's users that can be sorted by "id", "firstName", "lastName" or "email".

    返回有關(guān)能夠按 "id", "firstName", "lastName"或者 "email"排序的組用戶的細(xì)節(jié)。

    • Paginated Request: GET /groups/{groupId}/users

    • API: ProcessEngines.getProcessEngine(configuredProcessEngineName).getIdentityService().findUsersByGroup(userId)

    • Paginated Response:

      {
          data: [
          {
          "id": "kermit",
          "firstName": "Kermit",
          "lastName": "the Frog",
          "email": "kermit@server.com"
          }
          ],
          "total": 1,
          "start": 0,
          "sort": "id",
          "order": "asc",
          "size": 1
          }

    Management(管理)

    List Jobs(列出多個(gè)作業(yè))

    Returns a paginated list of jobs that can be sorted by "id", "process-instance-id", "execution-id", "due-date", "retries" or some custom arbitrary property id. The list can also be filtered by process instance id, due date or if the jobs have retries, are executable or only have messages or timers.

    返回多個(gè)作業(yè)的分頁列表:可以按"id", "process-instance-id", "execution-id", "due-date", "retries" 或者一下定制的屬性id排序。這個(gè)列表也能夠按process instance id, due date進(jìn)行過濾。列表是可執(zhí)行的或者只具有消息或者定時(shí)器。

    • Paginated Request: GET /management/jobs?process-instance={processInstanceId?}&with-retries-left={withRetriesLeft=false}&executable={axecutable=false}&only-timers={onlyTimers=false}&only-messages={onlyMessage=false}&duedate-lt={iso8601Date}&duedate-ltoe={iso8601Date}&duedate-ht={iso8601Date}&duedate-htoe={iso8601Date}&start={start=0}&size={size=10}&sort={sort=id}&order={order=asc}

    • API: ProcessEngines.getProcessEngine(configuredProcessEngineName).createJobQuery().xxx().listPage()

    • Paginated Response:

      {
          "data": [
          {
          "id": "212",
          "executionId": "211",
          "retries": -1,
          "processInstanceId": "210",
          "dueDate": null,
          "assignee": null,
          "exceptionMessage": "Can\'t find scripting engine for \'groovy\'"
          }
          ],
          "total": 1,
          "start": 0,
          "sort": "id",
          "order": "asc",
          "size": 1
          }
    Get Job(獲取一個(gè)作業(yè))

    Returns details about a job.

    返回一個(gè)作業(yè)有關(guān)的細(xì)節(jié)。

    • Request: GET /management/job({jobId}

    • API: ProcessEngines.getProcessEngine(configuredProcessEngineName).createJobQuery().id(jobId).singleResult()

    • Response:

      {
          "id": "212",
          "executionId": "211",
          "retries": -1,
          "processInstanceId": "210",
          "dueDate": null,
          "assignee": null,
          "exceptionMessage": "Can\'t find scripting engine for \'groovy\'",
          "stacktrace": "org.activiti.engine.ActivitiException: Can't find scripting engine for 'groovy'\n\tat ..."
          }
    Execute Job(執(zhí)行一個(gè)作業(yè))

    Executes a job.

    執(zhí)行一個(gè)作業(yè)。

    • Request: PUT /management/job/{jobId}/execute

    • API: ProcessEngines.getProcessEngine(configuredProcessEngineName).getManagementService().executeJob(jobId)

    • Response:

      {
          "success": true
          }
    Execute Jobs(執(zhí)行多個(gè)作業(yè))

    Executes multiple job.

    執(zhí)行多個(gè)作業(yè)。

    • Request: POST /management/jobs/execute

      {
          "jobIds": [ "212" ]
          }
    • API: ProcessEngines.getProcessEngine(configuredProcessEngineName).getManagementService().executeJob(jobId)

    • Response:

      {
          "success": true
          }
    List Database Tables(列表顯示數(shù)據(jù)庫表)

    Returns meta data information about all database tables in the engine.

    返回有關(guān)引擎里面所有數(shù)據(jù)庫表的元數(shù)據(jù)信息。

    • Request: GET /management/tables

    • API: ProcessEngines.getProcessEngine(configuredProcessEngineName).getManagementService().getTableCount()

    • Response:

      {
          "data": [
          {
          "tableName": "ACT_GE_PROPERTY",
          "noOfResults": 2
          }
          ]
          }
    Get Table Meta Data(獲取庫表元數(shù)據(jù))

    Returns meta data about a database table.

    返回有關(guān)數(shù)據(jù)庫表的元數(shù)據(jù)。

    • Request: GET /management/table/{tableName}

    • API: ProcessEngines.getProcessEngine(configuredProcessEngineName).getManagementService().getTableMetaData(tableName))

    • Response:

      {
          "tableName": "ACT_GE_PROPERTY",
          "columnNames": ["REV_","NAME_","VALUE_"],
          "columnNames": ["class java.lang.Integer", "class java.lang.String", "class java.lang.String"]
          }
    Get Table Data(獲取庫表數(shù)據(jù))

    Returns a paginated list of database table data.

    返回?cái)?shù)據(jù)庫表數(shù)據(jù)的分頁列表。

    • Paginated Request: GET /management/table/{tableName}/data

    • API: ProcessEngines.getProcessEngine(configuredProcessEngineName).getManagementService().createTablePageQuery().tableName(tableName).start(start).size(size).orderXXX(sort).singleResult();

    • Paginated Response:

      {
          "data": [
          {
          "NAME_": "schema.version",
          "REV_": "1",
          "VALUE_": "5.0-SNAPSHOT"
          },
          {
          "NAME_": "next.dbid",
          "REV_": "4",
          "VALUE_": "310"
          }
          ],
          "total": 2,
          "start": 0,
          "sort": "NAME_",
          "order": "asc",
          "size": 2
          }

    The whole REST interface is still experimental ... </EXPERIMENTAL>

    整個(gè)REST接口仍處于實(shí)驗(yàn)階段 ... </EXPERIMENTAL>


    評論

    # re: Activiti User Guide(Activiti用戶指南)-Chapter 14. REST API  回復(fù)  更多評論   

    2013-07-23 10:31 by yxk
    這個(gè)文檔寫錯(cuò)了 。別照這個(gè)搞了 。http://www.activiti.org/userguide/#N12B41這個(gè)是對的
    主站蜘蛛池模板: 亚洲视频小说图片| 久久久久久精品免费看SSS| 最新国产精品亚洲| 日产亚洲一区二区三区| 亚洲欧洲自拍拍偷精品 美利坚| 精品无码免费专区毛片| a毛片免费播放全部完整| 色一情一乱一伦一视频免费看| 亚洲白色白色在线播放| 久久99国产亚洲高清观看首页| 国产一区二区三区在线免费| 成人免费视频77777| 最近2019年免费中文字幕高清| 国产99久久久国产精免费| 国产亚洲综合久久| 国产在线观看无码免费视频| 亚洲区日韩精品中文字幕| 亚洲视频在线观看视频| 亚洲一区二区电影| 亚洲AV永久无码区成人网站| 亚洲成a人片在线观看国产| 国产高清视频在线免费观看| 欧美a级在线现免费观看| 青青视频观看免费99| 久久精品视频免费看| 少妇性饥渴无码A区免费| 男女拍拍拍免费视频网站| 色多多www视频在线观看免费| 色天使亚洲综合一区二区| 亚洲AV永久无码精品一福利 | 最新亚洲人成无码网站| 亚洲中文字幕乱码一区| 国产精品亚洲自在线播放页码| 亚洲视频在线免费看| 亚洲美女免费视频| 亚洲大片免费观看| 亚洲国产成人手机在线电影bd| 亚洲第一页中文字幕| 亚洲国产高清视频在线观看| 亚洲乱码中文论理电影| 亚洲深深色噜噜狠狠网站|