ソフト開発API: ワークフローAPIs
Developer APIs: Workflow APIs

ワークフローAPIs を活用すれば、「割当タスク(マイタスク)を処理するAndroidアプリケーション」や「過去の業務データ(プロセスデータ)を集計する基幹連携ツール」等を簡単に開発する事が可能です。APIからアプリケーションに伝送される業務データは、アプリケーション利用者がアクセス権限をもつデータに限定されます。

By leveraging the workflow APIs, easy developments are available, such as “Android application for processing assigned Tasks (My Tasks)” or “Key collaboration tools to aggregate operational data (process data) of the past”. Business data to be transmitted to the application from the API is limited to data on which the user of the application is authorized.

操作 / Operation POST(GET) Resource URL JSON Response 権限 / Authorization note
新規開始できるプロセスモデル一覧を取得する
Retrieving a List of startable Workflows
/API/PE/ProcessModel/listStartable count, List of ActivityEntry (全ログインユーザ)
(All login Users)
Version 11.2 〜
先頭タスク一覧を取得する
(開始可能なワークフローの一覧)
Retrieving a List of first Tasks
(startable Workflows)
/API/PE/ProcessModel/list List of ActivityEntry (全ログインユーザ)
(All login Users)
廃止予定 / deprecated
=> /API/PE/ProcessModel/listStartable
新規プロセスを開始する
(新しくワークフローに仕事を流す)
Creating a Process Instance
/API/PE/ProcessInstance/start WorkitemEntry (全ログインユーザ)
(All login Users)
Example of GET/POST Resource URL
http://s.questetra.net/00000000/API/PE/ProcessModel/list
<ContextRoot>:http://s.questetra.net/00000000

 

Return value definitions

ActivityEntry type description
id Number Task ID
nodeName String Task name
nodeNumber Number Node Number
processModelInfoId Number Process Model ID that does not change regardless of Version
processModelId Number Process Model ID that given to each different version
processModelVersion Number Version number of Process Model
processModelInfoName String Process Model name
processModelActivateDatetime Datetime Time this version of the Process Model was activated
processModelInfoCategory String Category of Process Model
processModelInfoShortExplanation String Summary of Process Model
processModelInfoViewPriority Number Priority of Process Model

Sample JSON response

{"startableActivities":[
  {
    "id":2086,
    "nodeName":"Test Task",
    "nodeNumber":3,
    "processModelActivateDatetime":"2010-01-07T18:13:40+0900",
    "processModelId":2081,
    "processModelInfoCategory":"1-Sales",
    "processModelInfoId":11,
    "processModelInfoName":"Test Model",
    "processModelInfoShortExplanation": "Summary of Process Model",
    "processModelInfoViewPriority":5,
    "processModelVersion":1
  }
]}

/API/PE/ProcessModel/listStartable

GET/POST parameters: start(0-2147483647), limit(0-1000 [default=1]), category, query
Errors: InvalidStart (10012), InvalidLimit (10013)

/API/PE/ProcessModel/list

廃止予定 / deprecated => /API/PE/ProcessModel/listStartable

GET/POST parameters: (none)
Errors: (none)

/API/PE/ProcessInstance/start

POST parameters: activityId (廃止予定 / deprecated), processModelInfoId *, nodeNumber *
Errors: InvalidActivityId (10011), InvalidProcessModelInfoId(10017), InvalidNodeNumber(10018), ActivityDoesNotExist (20012), InstanceNumberExceeding (30004), UserNumberExceeding (30005), OverQuota (30007), Forbidden (HTTP 403)

 

 

操作 / Operation POST(GET) Resource URL JSON Response 権限 / Authorization note
マイタスクの一覧を取得する
Retrieving a List of My Tasks
/API/PE/Workitem/listAllocated count, List of WorkitemEntry (全ログインユーザ)
(All login Users)
オファータスクの一覧を取得する
Retrieving a List of Offered Tasks
/API/PE/Workitem/listOffered count, List of WorkitemEntry (全ログインユーザ)
(All login Users)
オファータスクを引き受ける
Accepting a Offered Task
/API/PE/Workitem/batchAccept Results (全ログインユーザ)
(All login Users)

Return value definitions

WorkitemEntry type description
id Number Task instance ID
allocateDatetime Datetime Time of Task allocation
allocatedQuserId Number User ID
allocatedQuserName String User name
allocatedQgroupId Number Organization ID
allocatedQgroupName String Organization name
endDatetime Datetime Time of Task completion
nodeName String Task name
nodeNumber Number Task number
offerDatetime Datetime Time of Offer
processInstanceEndDatetime Datetime Time of Process completion
processInstanceIdForView String Process ID, e.g. “p123”
processInstanceId Number Process ID, e.g. “123”
processInstanceSequenceNumber Number Sequence Number in Process Model, e.g. “12”
processInstanceInitQgroupId Number Organization ID who started the Process
processInstanceInitQgroupName String Orgazation name who started the Process
processInstanceInitQuserId Number User ID who started the Process
processInstanceInitQuserName String User name who started the Process
processInstanceStartDatetime Datetime Time of Process start
processInstanceState String Process Status
processInstanceDebug Boolean true: Debug mode
processInstanceTitle String Process Title
processModelInfoId Number Process Model ID
processModelInfoName String Process Model name
processModelInfoCategory String Category of the Process Model
processModelVersion Number Version of the Process Model
startDatetime Datetime Time of Task start
state String Task Status, “ALLOCATED” etc
failType String Task Fail Type
swimlaneType String Swimlane Type, “NORMAL” or “GROUP”
timeLimitDatetime Datetime Time of Task Deadline
starred Boolean true: starred, false:unstarred
read
(*only for Worklist API)
Boolean true: read, false:unread
data
(*only for Monitoring API)
ProcessDataEntry processDataDefinitionNumber
Results type description
success Boolean true
workitemId Number Task ID
workitem WorkitemEntry Task
error ErrorEntry only when error occurred

Sample JSON response

{
"count":3,
"workitems":[
  {
    "id":58399,
    "allocateDatetime":"2010-08-18T14:03:18+0900",
    "allocatedQgroupId":null,
    "allocatedQgroupName":null,
    "allocatedQuserId":0,
    "allocatedQuserName":"SouthPole",
    "endDatetime":null,
    "nodeName":"Activity1",
    "nodeNumber":0,
    "offerDatetime":"2010-08-18T14:03:17+0900",
    "processInstanceEndDatetime":null,
    "processInstanceId":825,
    "processInstanceIdForView":"p825",
    "processInstanceInitQgroupId":null,
    "processInstanceInitQgroupName":null,
    "processInstanceInitQuserId":0,
    "processInstanceInitQuserName":"SouthPole",
    "processInstanceStartDatetime":"2010-08-18T14:03:16+0900",
    "processInstanceState":"STARTED",
    "processInstanceTitle":null,
    "processModelInfoId":9,
    "processModelInfoName":"Test Process",
    "processModelVersion":4,
    "startDatetime":null,
    "state":"ALLOCATED",
    "swimlaneType":"NORMAL",
    "timeLimitDatetime":null,
    "starred":true,
    "read":true
  },{
    "id":59832,
    ...
  },{
    "id":60021,
    ...
  }
]}
{"results":[
    {
        "success":true,
        "workitemId":58399,
        "workitem":{
            "id":58399,
            "offerDatetime":"2010-08-18T14:03:17+0900",
            "nodeName":"Activity1",
            "nodeNumber":0,
            "processInstanceId":825,
            "processInstanceIdForView":"p825",
            "processInstanceInitQgroupId":1,
            "processInstanceInitQgroupName":"Org",
            "processInstanceInitQuserId":0,
            "processInstanceInitQuserName":"SouthPole",
            "processInstanceStartDatetime":"2010-08-18T14:03:16+0900",
            "processInstanceState":"STARTED",
            "processInstanceTitle":"",
            "processModelInfoId":9,
            "processModelInfoName":"www Japanese",
            "processModelVersion":4,
            "startDatetime":null,
            "state":"ALLOCATED",
            "swimlaneType":"NORMAL"
    }, {
        "success":false,
        "workitemId":58400,
        "error":{
            "errorCode":"40003",
            "type":"WorkitemDoesNotExist"
        }
    }
]}

/API/PE/Workitem/listAllocated

GET/POST parameters: (none)
Errors: (none)

/API/PE/Workitem/listOffered

GET/POST parameters: (none)
Errors: (none)

/API/PE/Workitem/batchAccept

GET/POST parameters: workitemIds * (Multiple IDs are OK)
Errors: InvalidId (10001), NeedToAcceptOtherWorkitems (40000), WorkitemIsNotOffered (40001), WorkitemStatusAlreadyChanged (40002), WorkitemDoesNotExist (40003)

 

 

操作 / Operation POST(GET) Resource URL XML Response 権限 / Authorization note
入力フォーム情報を取得する
Retrieving a List of forms for Task output
/API/PE/Workitem/Form/viewXml (+XML: Forms of Process Data Items+) (全ログインユーザ)
(All login Users)
タスク成果を送信する
Submitting the Task output
/API/PE/Workitem/Form/save (xml “result”) (全ログインユーザ)
(All login Users)

Return value definitions

(+XML: Forms of Process Data Items+)

Sample XML response

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<workitem-form xmlns:ns2="process-data-definition-detail">
	<title-accessibility>3</title-accessibility>
	<title-description>&lt;font color="red"&gt;Please enter the title accurately &lt;/font&gt;</title-description>
	<title-columns>1</title-columns>
	<form-data number="4" id="56213">
		<accessibility>3</accessibility>
		<data-type>12</data-type>
		<name>Number</name>
		<data-instance-id>75774</data-instance-id>
		<process-instance-id>845</process-instance-id>
		<view-order>5</view-order>
		<ns2:decimal-detail>
			<ns2:required>false</ns2:required>
			<ns2:prefix>$</ns2:prefix>
			<ns2:suffix>Euro</ns2:suffix>
			<ns2:minimum>100.00</ns2:minimum>
			<ns2:maximum>200.00</ns2:maximum>
			<ns2:operation></ns2:operation>
			<ns2:summary></ns2:summary>
			<ns2:decimal-separator>.</ns2:decimal-separator>
			<ns2:grouping-separator>,</ns2:grouping-separator>
			<ns2:ref-summary>false</ns2:ref-summary>
			<ns2:scale>10</ns2:scale>
		</ns2:decimal-detail>
		<description>Value should be min 100.0000000000 and max 200.0000000000.</description>
		<columns>1</columns>
		<required>false</required>
		<value>12345</value>
	</form-data>
	<node-number>0</node-number>
	<task-name>Input</task-name>
	<user-selects />
	<workitem-id>75778</workitem-id>
</workitem-form>

/API/PE/Workitem/Form/viewXml

GET/POST parameters: workitemId *
Errors: result false XML (HTTP 200)

/API/PE/Workitem/Form/save

POST parameters: workitemId *, title, PROCESSDATAITEM-PARAMETERS, flow (/workitem-form/user-selects), saveOnly (Task Completetion = false), qgroupId (/workitem-form/executing-roles)

PROCESSDATAITEM-PARAMETERS are the same as Parameter of Message Start Event
PROCESSDATAITEM-PARAMETERS は、メッセージ開始イベントのパラメータと同書式

Errors: result false XML (HTTP 200)

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<result success="false">
	<process-data-validation-errors>
		<error>
			<key>data[4].input</key>
			<detail>Please input a value over 100.0000000000.</detail>
		</error>
	</process-data-validation-errors>
</result>

 

 

(All login Users)

操作 / Operation POST(GET) Resource URL JSON Response 権限 / Authorization note
タスク処理履歴を検索する
Querying for Task records operated by the User
/API/OR/Workitem/list count, List of WorkitemEntry (全ログインユーザ)
(All login Users)
タスク処理履歴を検索する
Querying for Task records operated by the User
/API/OR/Workitem/listCsv (File: CSV/UTF-8) (全ログインユーザ)
(All login Users)
Version 9.8 〜
タスク処理履歴を検索する
Querying for Task records operated by the User
/API/OR/Workitem/listCsvUtf16 (File: TSV/UTF-16) (全ログインユーザ) Version 9.8 〜
全てのプロセス履歴を検索する
Querying for all Process Instances records
/API/OR/ProcessInstance/list count, List of ProcessInstanceEntry (全ログインユーザ)
(All login Users)
全てのプロセス履歴を検索する
Querying for all Process Instances records
/API/OR/ProcessInstance/listCsv (File: CSV/UTF-8) (全ログインユーザ)
(All login Users)
Version 9.8 〜
全てのプロセス履歴を検索する
Querying for all Process Instances records
/API/OR/ProcessInstance/listCsvUtf16 (File: TSV/UTF-16) (全ログインユーザ)
(All login Users)
Version 9.8 〜
プロセスの詳細情報を取得する
Retrieving Process Instance
/API/OR/ProcessInstance/view ProcessInstanceEntry (全ログインユーザ)
(All login Users)
Version 9.5 〜
ファイル型のプロセスデータを取得する
Downloading File type Process Data
/API/OR/ProcessInstance/File/download (File Data) (全ログインユーザ)
(All login Users)
Version 9.5 〜
タスクにスターを追加する
Adding a Star to a Task
/API/OR/Workitem/Star/add (none) (全ログインユーザ)
(All login Users)
Version 9.5 〜
タスクからスターを削除する
Removing a Star from a Task
/API/OR/Workitem/Star/remove (none) (全ログインユーザ)
(All login Users)
Version 9.5 〜
タスクを強制割当する
Reallocating Task
/API/PIM/Workitem/reallocate WorkitemEntry コントロール権限
Process Administrator
Version 9.6 〜
プロセスを強制終了する
Terminating Process
/API/OR/ProcessInstance/stop (none) (全ログインユーザ)
(All login Users)
Version 9.6 〜
プロセスを削除する
Deleting Process
/API/OR/ProcessInstance/delete (none) (全ログインユーザ)
(All login Users)
Version 9.8 〜
プロセスを削除する
Deleting Process
/API/PIM/ProcessInstance/delete (none) コントロール権限
Process Administrator
[Version 11]
廃止/deprecated
=> /API/OR/ProcessInstance/delete

Return value definitions

ProcessInstanceEntry type description
processInstanceId Number Process ID, e.g. “123”
processInstanceIdForView String Process ID, e.g. “p123”
processInstanceSequenceNumber Number Sequence Number in Process Model, e.g. “12”
processInstanceInitQgroupId Number Organization ID
processInstanceInitQgroupName String Organization Name
processInstanceInitQuserId Number User ID
processInstanceInitQuserName String User name
processInstanceStartDatetime Datetime Process start time
processInstanceEndDatetime Datetime Process end time
processInstanceState String Process status::
processInstanceDebug Boolean true: Debug mode
processInstanceTitle String Process Title
processModelInfoId Number Process Model ID
processModelInfoName String Process Model name
processModelInfoCategory String Category of the Process Model
processModelVersion Number Version of Process Model
activeTokenNodeName String Node name where the active token staying
data ProcessDataEntry processDataDefinitionNumber

 

ProcessDataEntry type description
id Number Process Data ID
processDataDefinitionNumber Process Data Definition Number Definition
name String Name of Process Data
dataType String Type
subType String Subtype
value (dataTypeによって変わる)
viewOrder Number Priority

WorkitemEntry
タスク確認API に記載の表を参照
Refer to WorkitemEntry table in Worklist API

※”read” property is not defined in Monitoring API

Sample JSON response

{
  "count":4,
  "processInstances":[
    {"processInstanceId":1319,
     "data":
        {"1":{
          "dataType":"SELECT",
          "id":560709,
          "name":"選択",
          "processDataDefinitionNumber":1,
          "subType":null,
          "value":[
              {"display":"Choice2",
               "value":"Choice2"}
           ],
          "viewOrder":3
      },
        "0":{
          "dataType":"STRING",
          "name":"文字",
          "id":560708,
          "processDataDefinitionNumber":0,
          "subType":null,
          "value":"Choice1nChoice2",
          "viewOrder":1
      }
    },
    ...
    },
    {"processInstanceId":1284,
     "data":
        {"1":{
          "dataType":"SELECT",
          "id":542679,
          "name":"選択",
          "processDataDefinitionNumber":1,
          "subType":null,
          "value":null,
          "viewOrder":3
        },
        "0":{
          "dataType":"STRING",
          "id":542678,
          "name":"文字",
          "processDataDefinitionNumber":0,
          "subType":null,
          "value":"Choice1nChoice2nChoice3",
          "viewOrder":1
        }
      },
      ...
    }
  ]
}

/API/OR/Workitem/list
/API/OR/Workitem/listCsv
/API/OR/Workitem/listCsvUtf16

GET/POST parameters: criteria (+XML: Criteria for Workitem Search+), limit (0-1000 [default=1]), start (0-2147483647)
Errors: Validation (10000), InvalidStart (10012), InvalidLimit (10013)

/API/OR/ProcessInstance/list
/API/OR/ProcessInstance/listCsv
/API/OR/ProcessInstance/listCsvUtf16

GET/POST parameters: criteria (+XML: Criteria for Process Instance Search+), limit (0-1000 [default=1]), start (0-2147483647)
Errors: Validation (10000), InvalidStart (10012), InvalidLimit (10013)

/API/OR/ProcessInstance/view

GET/POST parameters: processInstanceId * (WorkitemEntry / processInsntanceId)
Errors: InvalidProcessInstanceId (10014), ProcessInsntanceDoesNotExist (20016), Forbidden (HTTP 403)

/API/OR/ProcessInstance/File/download

GET/POST parameters: id * (File Id), processDataInstanceId *
Errors: InvalidId (10001), InvalidProcessDataInstanceId (10015), Forbidden (HTTP 403)

/API/OR/Workitem/Star/add
/API/OR/Workitem/Star/remove

GET/POST parameters: workitemId *
Errors: InvalidWorkitemId (10016)

/API/PIM/Workitem/reallocate

POST parameters: workitemId *, quserId *, qgroupId *
Errors: InvalidQuserId (10002), InvalidQgroupId (10003), InvalidWorkitemId(10016), QuserDoesNotExist (20002), QgroupDoesNotExist (20004), MembershipDoesNotExist (20006), WorkitemDoesNotExist (40003), WorkitemFinished (40006)

指定したタスクが「必ず最初のタスクを処理した人に割り当てる(allocated to the person who processed the first task)」スイムレーン上にあり、そのスイムレーン上に複数の処理中の割当タスクが存在する場合、それら全てが強制割当される。
The specified Task is placed on the Swimlane which is set [allocated to the person who processed the first task], and if multiple Tasks in processing exist, all of the Tasks will be allocated.

/API/OR/ProcessInstance/stop

POST parameters: processInstanceId *
Errors: InvalidProcessInstanceId (10014), ProcessInstanceDoesNotExist (20016), ProcessInstanceFinished (40007)

停止できるのは自分が開始して自分しか関わっていないプロセス、もしくはコントロール権限を持つプロセス。
Processes which a user can stop are limited to those the User started, no one else has concerned, or has authorization of Process Administrator.

/API/OR/ProcessInstance/delete

POST parameters: processInstanceId *
Errors: InvalidProcessInstanceId (10014), ProcessInstanceDoesNotExist (20016)

削除できるのは自分が開始して自分しか関わっていないプロセス、もしくはコントロール権限を持つプロセス。
Processes which a user can delete are limited to those the User started, no one else has concerned, or has authorization of Process Administrator.

/API/PIM/ProcessInstance/delete

廃止 / deprecated => /API/OR/ProcessInstance/delete

GET/POST parameters: processInstanceId *
Errors: InvalidProcessInstanceId (10014), ProcessInstanceDoesNotExist (20016)

 

Last modified: 2016-05-19