Application Task
When something needs to be done for an entity (user, token or end-entity), a task is needed to be handled.
A task is an object with suboridinated actions for the operations to be done. A task can have one or several actions.
For example, a user need to be created in the system. A task must be established to the client with some input fields for the name of the user and other information. The client enables the possibility to enter the user information into the fields of the task and send the task back to the server, and the user will be created into the system.
<Task>
<Id>10433</Id>
<OrganizationId>2</OrganizationId>
<RequestorId>21</RequestorId>
<BehalfOfId>0</BehalfOfId>
<ProcessorId>21</ProcessorId>
<EntityId>5</EntityId>
<EntityType>User</EntityType>
<EntityDescription>John Doe</EntityDescription>
<ActionIndex>0</ActionIndex>
<ValidFrom>2023-09-13 12:26:58</ValidFrom>
<ValidTo>2023-09-20 12:26:58</ValidTo>
<DateTime>2023-09-13 12:26:58</DateTime>
<Type>
<Id>123</Id>
<Name>UpdateUser</Name>
</Type>
<Status>
<Id>30</Id>
<Name>Processing</Name>
<DateTime>2023-09-13 12:26:58</DateTime>
</Status>
<ActionList>
...
</ActionList>
<ActivityList>
...
</ActivityList>
</Task>
{
"Task": {
"Id": "10434",
"OrganizationId": "2",
"RequestorId": "21",
"BehalfOfId": "0",
"ProcessorId": "21",
"EntityId": "5",
"EntityType": "User",
"EntityDescription": "John Doe",
"ValidFrom": "2023-09-13 12:26:58",
"ValidTo": "2023-09-20 12:26:58",
"DateTime": "2023-09-13 12:26:58",
"Type": {
"Id": "123",
"Name": "UpdateUser"
},
"Status": {
"Id": "30",
"Name": "Processing",
"DateTime": "2023-09-13 12:26:58"
},
"ActionList": [],
"ActivityList": []
}
}
Task element
Path: /Task
| Element | Child element | Description |
|---|---|---|
Id |
The unique id of the task. |
|
OrganizationId |
The id of the organization of the task. |
|
RequestorId |
The id of the requestor of the task. This requestor is the user that created the task from the beginning. |
|
BehalfOfId |
The id of a requestor behalf of the requestor of the task. This id can be used as the requestor id if the current logged on user is a service or similar. |
|
ProcessorId |
The id of the processor of the task. This processor is the user that currently uses/processes the task. |
|
EntityId |
The id of the entity in the system that the task regards to. In the example above this is the id of a user. |
|
EntityType |
The type of the entity of the task (e.g. user, token or end entity). |
|
EntityDescription |
The description of the entity of the task. This description is usually the name of a user, the serial number of a token or name of an end entity. |
|
ActionIndex |
The index of current processing action in the action list that should be used. |
|
ValidFrom |
The date time when the task was created. The date time is ISO 8601 encoded. |
|
ValidTo |
The date time when the task will be expired. The date time is ISO 8601 encoded. |
|
DateTime |
The date time when the task latest was processed. The date time is ISO 8601 encoded. |
|
Type |
||
Id |
The id of the type of the task. |
|
Name |
The name of the type of the task. |
|
Status |
||
Id |
The id of the status of the task. |
|
Name |
The name of the status of the task. |
|
DateTime |
The date time when the task latest was processed. The date time is ISO 8601 encoded. |
|
The array of actions (ActionObj) of the task. See the information of an action object below. |
||
The action object provides the task with useful information and operations for both client and server. |
||
ActivityList |
The array of activities (ActivityObj) of the task. The activities are indicators to the client where the client has the option to do with the task (e.g. save the task or cancel the task). |
|
Name |
The name of the activity that should be presented in the client. |
|
Method |
The web service method of the call to be used (e.g. GetList). |
|
Type |
The type of the web service method of the call to be used (e.g. AdditionalIdentity). |
|
EntityType |
The type of entity for specific generic types (e.g. User). |
|
Id |
The identifier to be included in the call against the web service method. |
ActionList element
Path: /Task/ActionList
The array of actions (ActionObj) of the task. See the information of an action object below.
ActionList in XML and JSON formats
<ActionList>
<ActionObj>
<ProcessorId>21</ProcessorId>
<RequireSignature>false</RequireSignature>
<Info>
<Type>InputGeneric</Type>
<InputFieldList>
<InputFieldObj>
<Id>SomeInputField</Id>
<Value>Some text...</Value>
<Type>Text</Type>
<Policy />
<ReadOnly>false</ReadOnly>
<ValueList />
<FunctionList />
</InputFieldObj>
<InputFieldObj>
<Id>SomeOtherInputField</Id>
<Value>Some other text...</Value>
<Type>Text</Type>
<Policy />
<ReadOnly>false</ReadOnly>
<ValueList />
<FunctionList />
</InputFieldObj>
</InputFieldList>
<ParameterList />
</Info>
<Status>
<Id>30</Id>
<Name>Processing</Name>
<DateTime>2023-09-13 12:26:58</DateTime>
</Status>
</ActionObj>
<ActionObj>
<ProcessorId>0</ProcessorId>
<RequireSignature>false</RequireSignature>
<Info>
<Type>InputGeneric</Type>
<InputFieldList>
<InputFieldObj>
<Id>AnotherInputField</Id>
<Value>Another text...</Value>
<Type>Text</Type>
<Policy />
<ReadOnly>false</ReadOnly>
<ValueList />
<FunctionList />
</InputFieldObj>
</InputFieldList>
<ParameterList />
</Info>
<Server>
<PrepareList>
<Type>GetUser</Type>
</PrepareList>
<ExecuteList>
<Type>UpdateUser</Type>
</ExecuteList>
</Server>
<Status>
<Id>10</Id>
<Name>Ready</Name>
<DateTime>0001-01-01 00:00:00</DateTime>
</Status>
</ActionObj>
</ActionList>
{
"ActionList": {
"ActionObj": [
{
"ProcessorId": "21",
"RequireSignature": "false",
"Info": {
"Type": "InputGeneric",
"InputFieldList": {
"InputFieldObj": [
{
"Id": "SomeInputField",
"Value": "Some text...",
"Type": "Text",
"Policy": null,
"ReadOnly": "false",
"ValueList": null,
"FunctionList": null
},
{
"Id": "SomeOtherInputField",
"Value": "Some other text...",
"Type": "Text",
"Policy": null,
"ReadOnly": "false",
"ValueList": null,
"FunctionList": null
}
]
},
"ParameterList": null
},
"Status": {
"Id": "30",
"Name": "Processing",
"DateTime": "2023-09-13 12:26:58"
}
},
{
"ProcessorId": "0",
"RequireSignature": "false",
"Info": {
"Type": "InputGeneric",
"InputFieldList": {
"InputFieldObj": {
"Id": "AnotherInputField",
"Value": "Another text...",
"Type": "Text",
"Policy": null,
"ReadOnly": "false",
"ValueList": null,
"FunctionList": null
}
},
"ParameterList": null
},
"Server": {
"PrepareList": {
"Type": "GetUser"
},
"ExecuteList": {
"Type": "UpdateUser"
}
},
"Status": {
"Id": "10",
"Name": "Ready",
"DateTime": "0001-01-01 00:00:00"
}
}
]
}
}
ActionObj element
Path: /Task/ActionList/ActionObj
The action object provides the task with useful information and operations for both client and server.
When the task is operated on the client and then sent back to the server, through the ExecuteTask web service method, the current action is updated with a new status and marked as consumed. The response from the server will be the next action. However, the predefined actions in the list are not (!) static and can be changed depending on purpose and choices in current action.
The task can be executed again and again until the action list is ended.
| Element | Child element | Description |
|---|---|---|
ProcessorId |
The id of the processor of the action. This processor is the user that currently uses/processes the task. |
|
RequireSignature |
The indicator (true/false) if the client must sign the input field data to be processed. |
|
Info |
||
Type |
The type of the action to be used by the client depending on usage (e.g. present input fields, make a plugin call, present a text etc. etc.). |
|
The array of input fields (InputFieldObj) of the action. An input field can be used by the client for a user to enter information against the task-action. |
||
The array of parameter objects (ParameterObj) of the action. The parameter object can be used as a hidden value needed for the system but should be presented by the client/GUI. |
||
The server element contains operations that should be processed on the server. The processes will be done in a sequence through a list of operations. |
||
Status |
||
Id |
The id of the status of the action. |
|
Name |
The name of the status of the action. |
|
DateTime |
The date and time when the action latest was processed. The date and time is ISO 8601 encoded. |
InputFieldList and InputFieldObj elements
Path: /Task/ActionList/ActionObj/Info/InputFieldList and /Task/ActionList/ActionObj/Info/InputFieldList/InputFieldObj
| Element | Child element | Element values | Description |
|---|---|---|---|
Id |
The id of the input field. |
||
Name |
The name of the input field that can be presented by the client. |
||
Type |
The type of the input field. Available types are: |
||
Boolean |
A true/false field presented as a switch in the IU. |
||
Date |
A date field with possibility to select a date through a calendar in the UI. |
||
DynamicList |
Subordinated input fields with relation to the selected item in an ordinary list field. |
||
A text field dedicated as email. |
|||
ImageArea |
A field dedicated to images and photos. |
||
List |
An ordinary drop down list. |
||
NewPassword |
A password field with possibility to validate the field twice. |
||
Password |
An ordinary password field. |
||
Phone |
A text field dedicated as a telephone number. |
||
SelectSingle |
An ordinary list of radio buttons. |
||
SelectMultiple |
An ordinary list of checkboxes. |
||
Text |
An ordinary text field. |
||
TextArea |
A text field for larger input like XML and binary data. |
||
Policy |
The policy of the input field. This policy can be used by the client for which data that is valid or not valid. |
||
ReadOnly |
The indicator (true/false) if the input field is read only and should not be able to be changed. |
||
Value |
The value to be entered into the field. |
||
ValueList |
The predefined list of value objects (ValueObj) to be selected as value. |
||
ParameterList and ParameterObj elements
Path: /Task/ActionList/ActionObj/Info/ParameterList and /Task/ActionList/ActionObj/Info/ParameterList/ParameterObj
| Element | Description |
|---|---|
Id |
The id of the parameter. |
Value |
The value of the parameter. Note that the max value is 16384 bytes. |
ReadOnly |
The indicator (true/false) if the parameter is read only and should not be able to be changed. |
Server element
Path: /Task/ActionList/ActionObj/Server
The server element contains operations that should be processed on the server. The processes will be done in a sequence through a list of operations.
| Element | Child element | Description |
|---|---|---|
PrepareList |
The array of operations (PrepareObj) that will be processed on the server before returning the task in the response. All prepare types are static and will be verified on the server. An example is to get a user for update. |
|
Type |
The type of preparing that will be processed on the server. |
|
SubType |
The subordinated type, or arguments, of preparing if needed. |
|
FieldInfo |
The information of input field (or parameter) that the preparation will use. |
|
The array of operations (ExecuteObj) that will be processed on the server after sending the task to the server through ExecuteTask web service method. All execute types are static and will be verified on the server. An example is to update a user when execute. |
||
ExecuteObj |
ExecuteObj in ExecuteList
Path: /Task/ActionList/ActionObj/Server/ExecuteList/ExecuteObj
| Element | Description |
|---|---|
Type |
The type of executing that will be processed on the server. |
SubType |
The subordinated type, or arguments, of executing if needed. |
FieldInfo |
The information of input field (or parameter) that the execution will use. |