You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 8, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+76-4Lines changed: 76 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,17 +5,89 @@ Restful web API for InterSystems Ensemble Workflow
5
5
## Installation
6
6
1. Import and compile this project.
7
7
2. Create a web-application for REST in the Portal Management System (for ex. /csp/workflow/rest). Set dispatch class to Workflow.REST, Authentication methods to 'Unauthorized' and 'Password'.
8
-
3. (Optional) add Workflow packagfe mapping if you need to query another namespace.
8
+
3. (Optional) add Workflow package mapping if you need to query another namespace.
9
9
10
10
11
11
##Requests
12
12
13
-
These are the possible requests to web application (add param ?Namespace={Desired Namespace} to query another namespace cubes):
13
+
These are the possible requests to web application (add param `?Namespace={Desired Namespace}` to query another namespace):
14
14
15
15
| URL | Type | Body (JSON) | Response | Description |
| login | POST | { "Username":"CacheUser","Password":"CachePassword" }| JSON| Current user|
18
-
| tasks | GET || JSON | Unassigned tasks or assigned to current user |
17
+
| tasks | GET || JSON | Get unassigned tasks or tasks assigned to current user |
19
18
| tasks/:id| GET || JSON | EnsLib.Workflow.Worklist object|
20
19
| tasks/:id| POST |{EnsLib.Workflow.Worklist object}|JSON | Processing of modified object |
21
20
| test | GET || JSON | Test info |
21
+
22
+
23
+
## Prerequisites
24
+
25
+
If you work with Ensemble Workflow it is recommended to familiaze yourself with [EnsLib.Workflow](http://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?PAGE=CLASS&LIBRARY=ENSLIB&PACKAGE=1&CLASSNAME=EnsLib.Workflow) package. Here's quick primer on the main classes:
| EnsLib.Workflow.ActionDefinition | Defines the set of available actions that a user can make within a Workflow application. Users can extend this list. |
30
+
| EnsLib.Workflow.Engine | Provides the core APIs for the Ensemble Workflow system. |
31
+
| EnsLib.Workflow.FormEngine | Provides the API for managing form associated with Workflow tasks. |
32
+
| EnsLib.Workflow.Operation | This Business Operation manages the delegation of workflow tasks to the Ensemble Workflow Engine. |
33
+
| EnsLib.Workflow.RoleDefinition | Defines a workflow role and its members. |
34
+
| EnsLib.Workflow.RoleMembership | Manages the many-to-many relationship of workflow Users and Roles. Each instance represents the association of a specific User with a specific Role. |
35
+
| EnsLib.Workflow.TaskRequest | A task is a specialized request for a user action (it is used as part of a Workflow application). |
36
+
| EnsLib.Workflow.TaskResponse | Response from a Workflow Task request. The Workflow Engine creates an instance of TaskResponse object as soon it receives a TaskRequest. This object is used to maintain the status of the task while it is under the control of the Workflow Engine. It also serves as the final response returned by the Workflow Engine when the task is complete.|
37
+
| EnsLib.Workflow.TaskStatus | Holds Task Status details used by Workflow Engine to manage tasks. |
38
+
| EnsLib.Workflow.UserDefinition | Defines a workflow user. Typically the user name matches a system user name but this is not required. Workflow users that are not registered system users will not be able to log into the Workflow portal and check the status of their worklist. |
39
+
| EnsLib.Workflow.Worklist | Represents a worklist item associated with a User within a Workflow application. |
40
+
41
+
42
+
## GET tasks
43
+
44
+
It's the basic and first requst you need to execute after logging in (by authentication method you configured for REST web application). It returns basic information unassigned tasks or tasks assigned to current user, here's how it looks like:
45
+
46
+
```
47
+
{
48
+
"children":[
49
+
{
50
+
"ID":"383015||user4",
51
+
"New":"",
52
+
"Priority":3,
53
+
"Subject":"Task subject",
54
+
"Message":"some additional message",
55
+
"TaskId":383015,
56
+
"RoleName":"Role",
57
+
"AssignedTo":"user4",
58
+
"TimeCreated":"2016-12-07 22:09:03.599",
59
+
"Age":"00w 0d 16h 32m 30s",
60
+
"UserName":"user4"
61
+
},
62
+
{
63
+
"ID":"383011||user4",
64
+
"New":"*",
65
+
"Priority":1,
66
+
"Subject":"Task subject",
67
+
"Message":"some additional message",
68
+
"TaskId":383011,
69
+
"RoleName":"Role",
70
+
"AssignedTo":"",
71
+
"TimeCreated":"2016-12-07 20:43:21.627",
72
+
"Age":"00w 0d 17h 58m 12s",
73
+
"UserName":"user4"
74
+
}
75
+
],
76
+
"total":2
77
+
}
78
+
```
79
+
Here we can see two tasks, fist assigned to a current user (user4) and second one unassigned to the user. Object properties are
0 commit comments