Workflow Sample

Workflow Sample
Workflow Sample

Contact

Task Execution API

List of Operations

Operations that can be handled by Task Execution API are listed below. Replace <ContextRoot> in the URLs with the Questetra BPM Suite context root you are connecting to.
Operation URL
Obtain form info for exeucting Tasks <ContextRoot>/API/PE/Workitem/Form/viewXml
Execute Task <ContextRoot>/API/PE/Workitem/Form/save

Obtain form info for executing Task

This obtains information on the input form, used for executing Tasks. When the system fails to authorize the user, the HTTP response code 401 (Unauthorized) will be sent back.

Parameter

 Parameter  Explanation
workitemId * ID of Task to be executed

Response

Sample:

<?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>Numeric</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>
	</form-data>
	<node-number>0</node-number>
	<task-name>Input</task-name>
	<user-selects />
	<workitem-id>75778</workitem-id>
</workitem-form>

 Element/Attribute (XPath)
 Explanation
/workitem-form
Root element of response XML
Hereinafter, "/workitem-form" shall be ommitted
title string Content of title
title-accessibility numeric Read/Write permission setting of title
3: Read/Write, 1: Read Only
title-description string Description of title (Message added to input form)
title-columns numeric Column setting of title 
form-data
Process Data Items other than the title 
form-data/@number numeric Numbers of Process Data Items 
form-data/@id numeric IDs of Process Data Items
form-data/accessibility numeric Read/Write permission settings of Process Data Items
3: Read/Write, 1: Read Only, 0: None 
form-data/data-type numeric Data type of Process Data Items
0: String, 5: Date, 8: User, 9: Discussion, 10:DateTime,
11: Select, 12: Numeric, 13: Table, 14: File, 15: HTML Panel
form-data/name string Names of Process Data Items
form-data/data-instance-id numeric  IDs of Process Data Items 
form-data/process-instance-id numeric IDs of Processes
form-data/view-order numeric  Display order of Process Data Items
form-data/description string Descriptions of Process Data Items. Messages added to the input form
form-data/columns numeric Column setting of Process Data Items
form-data/required boolean  Required or not required (Process Data Items) 
form-data/button-direction numeric For only [Select] type Process Data Items. Direction of checkboxes and radio buttons
1: Horizontal, 2: Vertical 
form-data/button-rows numeric For only [Select] type Process Data Items. Number of buttons for each column or row
form-data/items   For only [Select] type Process Data Items. Information on choices
form-data/items/process-data-definition-detail:item
For only [Select] type Process Data Items. Information on each choice
form-data/items/process-data-definition-detail:item/process-data-definition-detail:value string For only [Select] type Process Data Items. Values of choices
form-data/items/process-data-definition-detail:item/process-data-definition-detail:display
string For only [Select] type Process Data Items. Displayed texts for choices 
form-data/process-data-definition-detail:string-detail   For only [String] type Process Data Items.
Definition details on [String] type Process Data Items. For further details see below "Settings in [String] type Process Data Items"
form-data/process-data-definition-detail:decimal-detail
For only [Numeric] type Process Data Items.
Definition details on [Numeric] type Process Data Items. For further details see below "Settings in [Numeric] type Process Data Items"
form-data/process-data-definition-detail:list-detail   For [Table] type Process Data Items.
Definition details on [Table] type Process Data Items. For further details see below "Settings in [Table] type Process Data Items" 
node-number numeric Node number
task-name string Name of Tasks
swimlane-type numeric Type of Tasks
0: Normal Task, 1: Team Task 
user-selects
Settings regarding split conditions by user selection
user-selects/user-select   Each button for split conditions by user selection 
user-selects/user-select/flow-id numeric ID of flow that is followed according to the selected button
user-selects/user-select/name string Text displayed on the buttons
executing-roles   Information when the user's "position" must be selected for Task execution.
This is not included when unnecessary or automatically decided.
executing-roles/executing-role   Positions that can be selected. 
executing-roles/executing-role/quser-id numeric ID of user
Same ID as that of the user executing the Task 
executing-roles/executing-role/quser-name string  Name of user
Same name as the user executing the Task
executing-roles/executing-role/qgroup-id  numeric Positions that can be selected and organization ID 
executing-roles/executing-role/qgroup-name string Positions that can be selected and organization name 
workitem-id numeric IDs of Tasks 

Settings in [String] type Process Data Items

 Element/Attribute (XPath)
 Description
process-data-definition:string-detail
Settings regarding [String] type Process Data Items
Henceforward, "/workitem-form/form-data/process-data-definition:string-detail" is omitted.
required boolean Required or not required
Same as /workitem-form/form-data/required
textarea-rows numeric Number of lines to display for "Text box multiple lines"

Settings in [Numeric] type Process Data Items

 Element/Attribute (XPath)
 Description
process-data-definition:decimal-detail
Settings regarding [Numeric] type Process Data Items
Henceforward, name space "process-data-definition" is omitted.
required boolean Required or not required
Same as /workitem-form/form-data/required
prefix string Prefix
suffix string Suffix
minimum string Minimum
maximum string Maximum
operation string Used in [Numeric] type Process Data Items within [Table] type Process Data Items. This is not used here.
summary string Used in [Numeric] type Process Data Items within [Table] type Process Data Items. This is not used here.
decimal-separator string Decimal separator 
grouping-separator string Thousands separator
ref-summary string Used in [Numeric] type Process Data Items that are copies of [Numeric] type Process Data Items within [Table] type Process Data Items.
scale numeric Range of decimal digits

Settings in [Table] type Process Data Items

 Element/Attribute (XPath)
 Description
process-data-definition:list-detail
Settings regarding [Table] type Process Data Items
Henceforward, name space "process-data-definition" is omitted.
sub-data-defs Definitions regarding Process Data Items within [Table] type Process Data Items
sub-data-defs/sub-data-def
Definition of each Process Data Item within [Table] type Process Data Items
sub-data-defs/sub-data-def/name string Name of Items
sub-data-defs/sub-data-def/data-type numeric

Data type
0: String, 12: Numeric

sub-data-defs/sub-data-def/string-detail
Definition details on [String] type Process Data Items. For further details see above "Settings in [String] type Process Data Items".
sub-data-defs/sub-data-def/decimal-detail
Definition details on [Numeric] type Process Data Items. For further details see above "Settings in [Numeric] type Process Data Items".


Execute Tasks

This executes Tasks.
An error in user authentication will result in HTTP response code 401 (Unauthorized).
All other points are the same as Message Catching Intermediate Events.

Parameter
 Parameter  Description
 workitemId * ID of Task to be executed
 title Title
 Parameters of each Process Data Item Parameter names and specified values are the same as Message Start Events and Message Catching Intermediate Events. For details see here.
 flow ID of flow
In case of split conditions by user selection, this specifies which flow is selected. Flow options are found within the response XML "/workitem-form/user-selects," which is obtained by the API that obtains form information. 
This does not have to be sent when the split condition is not by user selection.
 saveOnly true: save input but do not finish Task, false: Finish Task
When this parameter is not specified the value is "false," so the Task will be finished.
 qgroupId ID of organization
Information when the user's "position" must be selected for Task execution. Position options are found within the response XML "/workitem-form/executing-roles," which is obtained by the API that obtains form information.
This does not have to be sent when there is no need to specify. 

Responses

Error responses are the same as Message Start Events and Message Catching Intermediate Events. For details see here.

 Element/Attribute (XPath)
 Description
/result
Route element of response
Henceforward, "/result" is omitted
@success boolean

Whether the operation suceeded or not
true: suceeded, false: failed

process-data-validation-errors
Included when there is an error in Process Data Item validation
process-data-validation-errors/error
Each error
process-data-validation-errors/error/key string Information on which input caused the error. Corresponds to parameter names
process-data-validation-errors/error/detail string Error message
errors   Included when there is an error in Process Data Items, other than validation
errors/error
Each error 
errors/error/key string Key that indicates the type of error 
errors/error/detail string Error message

Sample (success):

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<result success="true" />

Sample (failed):

<?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>