Workflow module
Workflow
“view” command
This flow allows to browse the Workflow objects. The objects could be both definition objects (administrative objects) and dynamic objects (documents).
Thus, we will treat these two subjects separately:
- Handling the administrative objects: projects, applications, processes, …
- Handling of documents : the XML syntax of the Process views will be use for the advanced queries on the Workflow documents.
URL
http://myvdocserver/vdoc/navigation/flow?module=workflow&cmd=view&_AuthenticationKey=...
Administrative objects
The objective here is to browse the definition objects and administration, just as if we were connected to Process and we were going through the applications, the processes, the process versions, etc.
All items definition are not yet available but the main flow (considered the most useful) are managed.:
- Project (Application)
- Catalog (Groupement de processus)
- WorkflowContainer (Processus)
- View (Vues)
- Workflow (Version de processus)
- WorkflowContainer (Processus)
- Catalog (Groupement de processus)
In the queries, you can define the structure (tree or not) of what you request. For example:
- All projects
- All groups of processes grouped by project
- All groups of processes in a project
- All projects with their corresponding group of processes (in a single stream)
- All the tree structure of the definition elements
All these requests are possible with the same flow. Indeed, it’s you who will define the structure of your definition objects.
The tree must be respected in the declaration of “definitions”
Scopes tags allows to reduce the search area.
Request flow
Here are several possible examples. This list is not exhaustive since there are of course a large number of possible combinations by modifying the structure of the definitions and the scopes.
Retrieve all projects:
<?xml version="1.0" encoding="UTF-8"?>
<view xmlns:vw1="http://www.axemble.com/vdoc/view">
<header>
<definition class="com.axemble.vdoc.sdk.interfaces.IProject"/>
</header>
</view>
Retrieve all groups of processes grouped by project:
<?xml version="1.0" encoding="UTF-8"?>
<view xmlns:vw1="http://www.axemble.com/vdoc/view">
<header>
<definition class="com.axemble.vdoc.sdk.interfaces.IProject">
<definition class="com.axemble.vdoc.sdk.interfaces.ICatalog"/>
</definition>
</header>
</view>
Retrieve all groups of processes in a project:
<?xml version="1.0" encoding="UTF-8"?>
<view xmlns:vw1="http://www.axemble.com/vdoc/view">
<header>
<scopes>
<project protocol-uri="uri://vdoc/project/1"/>
</scopes>
<definition class="com.axemble.vdoc.sdk.interfaces.ICatalog"/>
</header>
</view>
Retrieve all processes in a group of processes:
<?xml version="1.0" encoding="UTF-8"?>
<view xmlns:vw1="http://www.axemble.com/vdoc/view">
<header>
<scopes>
<catalog protocol-uri="uri://vdoc/catalog/2"/>
</scopes>
<definition class="com.axemble.vdoc.sdk.interfaces.IWorkflowContainer"/>
</header>
</view>
Retrieve all the tree structure:
<?xml version="1.0" encoding="UTF-8"?>
<view xmlns:vw1="http://www.axemble.com/vdoc/view">
<header>
<definition class="com.axemble.vdoc.sdk.interfaces.IProject">
<definition class="com.axemble.vdoc.sdk.interfaces.ICatalog">
<definition class="com.axemble.vdoc.sdk.interfaces.IWorkflowContainer">
<definition class="com.axemble.vdoc.sdk.interfaces.IWorkflow"/>
<definition class="com.axemble.vdoc.sdk.interfaces.IView"/>
</definition>
</definition>
</definition>
</header>
</view>
Response flow
In response, the flow will send you a tree structure related to your request. If we take the previous example flow " Retrieve all the tree structure", here’s what Process could return as answer:
<view xmlns:vw1="http://www.axemble.com/vdoc/view">
<body>
<project id="1" name="DefaultProject" label="Projet par défaut" protocol-uri="uri://vdoc/project/1">
<catalog id="2" name="Processus Hotline" label="Processus Hotline" protocol-uri="uri://vdoc/catalog/2"
is-confidential="false" is-system="false">
<workflow-container id="1" name="DemandeDeSupport" label="Demande de support"
protocol-uri="uri://vdoc/workflowContainer/1">
<view id="3" name="TODO" label="A traiter" protocol-uri="uri://vdoc/workflowContainerView/3"/>
<view id="4" name="DELAYED" label="En retard" protocol-uri="uri://vdoc/workflowContainerView/4"/>
<view id="5" name="DELEGATED" label="Déléguées" protocol-uri="uri://vdoc/workflowContainerView/5"/>
<view id="6" name="IINTERVENED_ACTIVE" label="Documents en cours"
protocol-uri="uri://vdoc/workflowContainerView/6"/>
<view id="7" name="IINTERVENED_ABORTED" label="Documents annulés"
protocol-uri="uri://vdoc/workflowContainerView/7"/>
<view id="8" name="IINTERVENED_TERMINATED" label="Documents terminés"
protocol-uri="uri://vdoc/workflowContainerView/8"/>
<view id="9" name="DRAFT" label="Brouillons" protocol-uri="uri://vdoc/workflowContainerView/9"/>
<view id="10" name="MYDOCS" label="En cours" protocol-uri="uri://vdoc/workflowContainerView/10"/>
<view id="11" name="ABORTED" label="Annulés" protocol-uri="uri://vdoc/workflowContainerView/11"/>
<view id="12" name="TERMINATED" label="Terminés"
protocol-uri="uri://vdoc/workflowContainerView/12"/>
<view id="13" name="SEARCH" label="Recherche" protocol-uri="uri://vdoc/workflowContainerView/13"/>
<workflow id="1" name="DemandeDeSupport_1.0" label="" protocol-uri="uri://vdoc/workflow/1"/>
</workflow-container>
</catalog>
</project>
</body>
</view>
Documents
Here, we are going to query dynamic objects, in this case, process documents.
For this query, we don’t have to use a new query format; indeed, the Process system views allows us to easily querying of Process processes elements.
For querying, we’re going to send XML definition view with some possible additional options. It is important to note that for this definition format, it must be in XML because building a JSON seem difficult and inefficient because of our evaluation managing XML system must then convert it back.
It is possible to pass this XML, even within a JSON flow.
At the level of a view evaluation, it can range from the simplest to the most complete:
- Simply assessing a Process view as configured.
- Retrieve the XML of a Process view then edit it and assess it.
- Build yourself an XML flow of view definition unbound to an existing Process view.
It is possible to pass the complete view definition XML, integrated in the stream, or to convert this stream to **Base64 ** and pass it in an attribute of the stream. This possibility is particularly interesting in the case of a JSON stream because it is then possible to transmit the view definition XML in Base64.
Request flow
Parameter | Description | Mandatory |
---|---|---|
scopes | Scopes are always important here;they will allow to evaluate the view on a group of processes or a project (for all groups of processes of this project) | |
pager | This parameter allows to handle the paging in the request returns; the parameter “count” allows to define the number of elements per page and “offset” the position on the pages. (The offset starts at 0) | No |
include | When set to true, this parameter allows to retrieve, for each retrieved documents, the wording of the view columns. | No |
Example 1 - Simply assessing a Process view as configured:
<?xml version="1.0" encoding="UTF-8"?>
<view xmlns:vw1="http://www.axemble.com/vdoc/view">
<header protocol-uri="uri://vdoc/workflowContainerView/3">
<scopes>
<catalog protocol-uri="uri://vdoc/catalog/6"/>
</scopes>
<pager offset="0" count="10"/>
<include name="labels" value="false"/>
</header>
</view>
In this case, the URI protocol of the view could have been recovered manually in the Process interface or via code of the definition objects of this same view (see above).
Example 2 - Retrieve the XML of a Process view then edit it and assess it.:
- Retrieve the XML flow of an existing view in Process: this is achievable via the get flow of the Workflow Module.
- Edit the flow: this should be done manually or by development
- Evaluate the flow: we are in a case of XML assess, see the example 3 that follows.
Example 3: Build yourself an XML flow of view definition unbound to an existing Process view:
<?xml version="1.0" encoding="UTF-8"?>
<view xmlns:vw1="http://www.axemble.com/vdoc/view">
<header>
<scopes>
<catalog protocol-uri="uri://vdoc/catalog/6"/>
</scopes>
<definition security="false" type="treatment" catalogType="0" catalog="ProcessusHOTLINE" name="MYDOCS">
<filters>
<fieldgroup operator="AND">
<field name="sys_Creator.login" operator="equals" value="sysadmin"/>
<field name="sys_Status" operator="equals" value="STARTED"/>
<field name="sys_WorkflowContainer" value="DemandeDeSupport"/>
</fieldgroup>
</filters>
<view itemsPerPage="10" sortAscending="true" sortBy="sys_Reference">
<column name="sys_Reference"/>
<column name="sys_Title"/>
<column format="datetime" name="sys_CreationDate"/>
<column name="sys_CurrentSteps"/>
<column maxElements="5" name="sys_CurrentActors"/>
<column name="DocumentState"/>
</view>
</definition>
</header>
</view>
This flow can be passed differently: all the XML node definition can be encoded in Base64, and then you can run it ( interesting case for a JSON flow):
<?xml version="1.0" encoding="UTF-8"?>
<view xmlns:vw1="http://www.axemble.com/vdoc/view">
<header>
<scopes>
<catalog protocol-uri="uri://vdoc/catalog/6"/>
</scopes>
<definition content="PGRlZmluaXRpb24gY2F0YWxvZz0iYWRtaW5ICAg[...]"/>
</header>
</view>
Response flow
In response, we will retrieve some Process resource containing each time::
- A system information header about the document
- A body with all field values that were requested (columns in the view)
For more informations about the available data types, please refer to “Data types”.
Here’s an example of a response that could be received:
<view xmlns:vw1="http://www.axemble.com/vdoc/view">
<header name="TODO" label="" description=""/>
<body>
<resource>
<header id="1" reference="0001" creator="sysadmin" editor="sysadmin" created-date="2011-12-13T16:13:41.603Z"
modified-date="2011-12-13T16:13:42.640Z"
uri="?class=treatment&method=edit&object=1&activity=2">
<resource-definition id="3" name="DemandeDeSupport_1.0" label="Demande de support (1.0)"
protocol-uri="uri://vdoc/resourceDefinition/3"/>
</header>
<body>
<string name="sys_Reference" label="" value="0001"/>
<string name="sys_Title" label="" value="Test1"/>
<date name="sys_CreationDate" label="" value="2011-12-13T16:13:41.590Z"/>
</body>
</resource>
<resource>
<header id="2" reference="0002" creator="sysadmin" editor="sysadmin" created-date="2011-12-13T16:22:16.703Z"
modified-date="2011-12-13T16:28:19.960Z"
uri="?class=treatment&method=edit&object=2&activity=4">
<resource-definition id="3" name="DemandeDeSupport_1.0" label="Demande de support (1.0)"
protocol-uri="uri://vdoc/resourceDefinition/3"/>
</header>
<body>
<string name="sys_Reference" label="" value="0002"/>
<string name="sys_Title" label="" value="Test 2"/>
<date name="sys_CreationDate" label="" value="2011-12-13T16:22:16.703Z"/>
</body>
</resource>
</body>
</view>
“get” command
The purpose of this flow is to retrieve detailed information on a Process object by using its URI protocol. We can retrieve information on both definition objects and dynamic objects.
Definition objects managed: IView.
Dynamic objects managed:
- IWorkflowInstance
- ITaskInstance
URL
http://myvdocserver/vdoc/navigation/flow?module=workflow&cmd=get&_AuthenticationKey=...
Request flow
This flow is simple to use, you just need to forward the URI protocol and some options.
Parameter | Description | Mandatory |
---|---|---|
includeLabels | Set to true, to retrieve the field labels associated with the document. | No |
includeLinkedResources | Set to true, to include the lines of possible dynamic arrays. | No |
includeLinkedWorkflowInstances | Set to true, to include the process sub-documents. | No |
includeAttachmentsContent | Set to true, to include the content of the attached files(in base64) in the flow. | No |
useGuid | This setting can be useful if you don’t want to include attached file (in Base64) in the flow, but you know that you will soon need to download an attached file. With this setting, Process will book a download for each attached file and send you back a GUID in the response flow. After, that GUID will be usable with the download command of the “io” module. | No |
These parameters are located in the “configuration” node in the header tag:
<?xml version="1.0" encoding="UTF-8" ?>
<get>
<header>
<configuration>
<param name="includeLabels" value="false"/>
<param name="includeLinkedResources" value="true"/>
</configuration>
</header>
<body>
...
Example 1 - Retrieving of an XML definition of a view:
<?xml version="1.0" encoding="UTF-8" ?>
<get>
<header/>
<body>
<element class="com.axemble.vdoc.sdk.interfaces.IView">
<header protocol-uri="uri://vdoc/workflowContainerView/3"/>
</element>
</body>
</get>
The view definition will be returned in Base64.
Example 2 - Retrieving information on a process document:
<?xml version="1.0" encoding="UTF-8" ?>
<get>
<header/>
<body>
<element class="com.axemble.vdoc.sdk.interfaces.IWorkflowInstance">
<header protocol-uri="uri://vdoc/workflowInstance/2"/>
</element>
</body>
</get>
In this case, the URI protocol of the view could have been recovered manually in the Process interface or via the definition objects code of this same view.
Example 3 - Retrieving information on a current task:
<?xml version="1.0" encoding="UTF-8" ?>
<get>
<header login="sysadmin"/>
<body>
<element class="com.axemble.vdoc.sdk.interfaces.ITaskInstance">
<header protocol-uri="uri://vdoc/taskInstance/2"/>
</element>
</body>
</get>
Response flow
The response flow will depend on our request.
Example 1 - Retrieving of an XML definition of a view:
<get>
<header id="3" name="TODO" label="A traiter" protocol-uri="uri://vdoc/workflowContainerView/3"/>
<body>
<definition content="PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZG[...]"/>
</body>
</get>
Example 2 - Retrieving informations on a process document:
<get xmlns:d1="http://www.axemble.com/process" class="com.axemble.vdp.workflow.domain.ProcessWorkflowInstance">
<header id="2" reference="0002" creator="sysadmin" created-date="2011-12-13T16:22:16.703Z" editor="sysadmin"
modified-date="2011-12-13T16:28:19.960Z">
<resourceDefinition id="3" name="DemandeDeSupport_1.0"/>
<catalog id="2" name="ProcessusHOTLINE" type="0"/>
<project id="1" name="DefaultProject"/>
</header>
<body>
<string name="sys_Reference_chrono" label="Chrono de la référence formatée" value="2"/>
<collection name="OperateurPriseEnCompte" label="Operateur Prise en compte"/>
<user name="IdentifiantUtilisateur" label="Identifiant Utilisateur" id="3" external-id="00i-000001-000"
login="user1" first-name="user 1" last-name="user 1" email="user1@user1.com"/>
<string name="sys_Reference_root" label="Racine du chrono de la référence formatée"
value="ProcessusHOTLINE_DemandeDeSupport_1.0"/>
<collection name="OperateurNiveau2" label="Opérateur Niveau 2"/>
<collection name="OperateurNiveau1" label="Opérateur Niveau 1"/>
<string name="sys_CurrentActors" label="Intervenants en cours" value="System Administrator"/>
<collection name="OperateurNiveau3" label="Opérateur Niveau 3"/>
<collection name="Demandeur" label="Demandeur"/>
<string name="sys_Reference" label="Référence" value="0002"/>
<string name="DocumentState" label="Etat du document" value="En cours"/>
<string name="sys_Title" label="Titre" value="Test 1"/>
<user name="sys_Addressee" label="Créateur représenté" id="1" external-id="00i-000000-000" login="sysadmin"
first-name="System" last-name="Administrator"/>
<user name="sys_ModifiedBy" label="Modifié par" id="1" external-id="00i-000000-000" login="sysadmin"
first-name="System" last-name="Administrator"/>
<string name="Societe" label="Société" value="bla"/>
<string name="sys_CurrentSteps" label="Etapes en cours" value="Objet de la demande de support"/>
<date name="sys_CreationDate" label="Date de création" value="2011-12-13T16:22:16.703Z"/>
<user name="sys_Creator" label="Créateur" id="1" external-id="00i-000000-000" login="sysadmin"
first-name="System" last-name="Administrator"/>
<date name="sys_ModificationDate" label="Date de modification" value="2011-12-13T16:28:19.960Z"/>
<string name="ProcessState" label="Etat du processus" value="En cours"/>
</body>
<history/>
</get>
Regarding the syntax of the different data types in the body, refer to the page “Data types”.
“create” command
This flow allows to create a new process document. All the information needed to create a document will therefore be sent as input :
- Creator
- Reference (eventually)
- All fields values
- Any historical entries that allow us to trigger steps changes
URL
http://myvdocserver/vdoc/navigation/flow?module=workflow&cmd=create&_AuthenticationKey=...
Request flow
Simple creation case:
<?xml version="1.0" encoding="UTF-8" ?>
<create>
<header/>
<body>
<resource class="com.axemble.vdoc.sdk.interfaces.IWorkflowInstance">
<header reference="" creator="sysadmin" editor="">
<project protocol-uri="uri://vdoc/project/1"/>
<catalog name="ProcessusISOTOOLS" type="0"/>
<resource-definition name="DemandeDeSupport_1.0"/>
</header>
<body>
<string name="sys_Title" value="Test 1"/>
<user name="IdentifiantUtilisateur" login="user1"/>
<collection name="IdentifiantUtilisateurMultiple">
<user login="user2"/>
<user login="user3"/>
</collection>
<string name="Societe" value="Organisation par défaut"/>
<string name="Adresse" value="Rue de la république"/>
<string name="Email" value="user1@user1.com"/>
<string name="Telephone" value="01 23 45 67 89"/>
</body>
</resource>
</body>
</create>
A creation with a submit for the first step:
<?xml version="1.0" encoding="UTF-8" ?>
<create>
<header/>
<body>
<resource class="com.axemble.vdoc.sdk.interfaces.IWorkflowInstance">
<header reference="" creator="sysadmin" editor="">
<project protocol-uri="uri://vdoc/project/1"/>
<catalog name="ProcessusISOTOOLS" type="0"/>
<resource-definition name="DemandeDeSupport_1.0"/>
</header>
<history>
<history-entry name="ATraiter" date="2011-12-13T17:30:00.000Z" addressee="sysadmin"/>
</history>
<body>
<string name="sys_Title" value="Test 1"/>
<user name="IdentifiantUtilisateur" login="user1"/>
<string name="Societe" value="Organisation par défaut"/>
<string name="Adresse" value="Rue de la république"/>
<string name="Email" value="user1@user1.com"/>
<string name="Telephone" value="01 23 45 67 89"/>
</body>
</resource>
</body>
</create>
For more informations about the available data types, please refer to “Data types”.
Response flow
The response flow will be a standard XML that will indicate either the success of the operation or any errors:
<?xml version="1.0" encoding="UTF-8"?>
<response status="success" message="Element created[ElementName]." detail="protocol-uri"/>
“update” command
This flow allows to update a process document. By update, we mean :
- Update on fields values
- Performing a step change in a process document
URL
http://myvdocserver/vdoc/navigation/flow?module=workflow&cmd=update&_AuthenticationKey=...
Request flow
The only difference compared to the flow of creation will be at the level of the resource header: you have to provide the URI protocol of the document that you want to alter.
<?xml version="1.0" encoding="UTF-8" ?>
<update>
<header/>
<body>
<resource class="com.axemble.vdoc.sdk.interfaces.IWorkflowInstance">
<header protocol-uri="uri://vdoc/workflowInstance/17"/>
<body>
<string name="sys_Title" value="Test 6"/>
<user name="IdentifiantUtilisateur" login="user1"/>
<string name="Societe" value="Organisation par défaut"/>
<string name="Adresse" value="456 rue de la république"/>
<string name="Email" value="user1@user1.com"/>
<string name="Telephone" value="01 23 45 67 89"/>
</body>
</resource>
</body>
</update>
For more informations about the available data types, please refer to “Data types”.
Response flow
This response flow will be of the same form as the response flow of the creation.
“delete” command
This flow is very simple to use, but it must be used very carefully because it allows to remove an existing Process object.
It’s important to note that deleted items in the directory can’t be recovered..
It’s possible to delete both definition objects (administrative objects) and dynamic objects (documents).
Definition objects managed:
- IProject
- ICatalog
- IWorkflowContainer
- IWorkflow
Dynamic objects managed: IWorkflowInstance.
URL
http://myvdocserver/vdoc/navigation/flow?module=workflow&cmd=delete&_AuthenticationKey=...
Request flow
This flow is simple to use, you just need to forward the URI protocol of the item to delete.
Example 1 - Delete an application:
<?xml version="1.0" encoding="UTF-8"?>
<delete>
<header login="sysadmin"/>
<body>
<element class="com.axemble.vdoc.sdk.interfaces.IProject">
<header protocol-uri="uril://vdoc/project/DefaultOrganization/MyProject"/>
</element>
</body>
</delete>
Example 2 - Delete a process group:
<?xml version="1.0" encoding="UTF-8"?>
<delete>
<header login="sysadmin"/>
<body>
<element class="com.axemble.vdoc.sdk.interfaces.ICatalog">
<header protocol-uri="uril://vdoc/catalog/DefaultOrganization/XXX/XXX:0"/>
</element>
</body>
</delete>
Example 3 - Delete a process:
<?xml version="1.0" encoding="UTF-8"?>
<delete>
<header login="sysadmin"/>
<body>
<element class="com.axemble.vdoc.sdk.interfaces.IWorkflowContainer">
<header protocol-uri="uri://vdoc/workflowContainer/1"/>
</element>
</body>
</delete>
Example 4 - Delete a process version:
<?xml version="1.0" encoding="UTF-8"?>
<delete>
<header login="sysadmin"/>
<body>
<element class="com.axemble.vdoc.sdk.interfaces.IWorkflow">
<header protocol-uri="uri://vdoc/workflow/1"/>
</element>
</body>
</delete>
Example 5 - Delete a process document:
<?xml version="1.0" encoding="UTF-8"?>
<delete>
<header login="sysadmin"/>
<body>
<element class="com.axemble.vdoc.sdk.interfaces.IWorkflowInstance">
<header protocol-uri="uri://vdoc/workflowInstance/138"/>
</element>
</body>
</delete>
Response flow
The response flow will be a standard XML that will indicate either the success of the operation or any errors:
<?xml version="1.0" encoding="UTF-8"?>
<response status="success" message="Element deleted[ElementName]." detail="protocol-uri"/>
“cmd” command
This command is a bit special. It exists for backward compatibility with older SDK flows using exclusively the XML that were present in version 2010 and earlier. We passed to these flows a key to identify the needs.
Available keys:
Key | Description |
---|---|
ASSIGNED_TASKS | Assigned tasks. |
DELAYED_TASKS | Overdue tasks |
CATALOGS | List of process groups (applications prior to 2011) - (can be replaced by a view flow) |
WORKFLOW_CONTAINERS | List of processes (can be replaced by a view flow) |
WORKFLOWS | List of process versions (can be replaced by a view flow) |
URL
http://myvdocserver/vdoc/navigation/flow?module=workflow&cmd=cmd&_AuthenticationKey=...
Request flow
Here are the possible queries for the request flow.
Example 1 - Get the assigned tasks:
<?xml version="1.0" encoding="UTF-8" ?>
<view xmlns:vw1="http://www.axemble.com/process/view">
<header name="ASSIGNED_TASKS" login="sysadmin" >
<column name="sys_Reference"/>
<column name="sys_Title"/>
<column name="sys_Creator"/>
<column name="sys_CreationDate"/>
<column name="sys_CurrentSteps"/>
<column name="DocumentState"/>
</header>
</view>
Example 2 - Get the overdue tasks:
<?xml version="1.0" encoding="UTF-8" ?>
<view xmlns:vw1="http://www.axemble.com/process/view">
<header name="DELAYED_TASKS" login="sysadmin" >
<column name="sys_Reference"/>
<column name="sys_Title"/>
<column name="sys_Creator"/>
<column name="sys_CreationDate"/>
<column name="sys_CurrentSteps"/>
<column name="DocumentState"/>
</header>
</view>
Example 3 - Get the list of process groups:
<?xml version="1.0" encoding="UTF-8" ?>
<view xmlns:vw1="http://www.axemble.com/process/view">
<header name="CATALOGS" login="sysadmin" >
</header>
</view>
Example 4 - Get the list of processes:
<?xml version="1.0" encoding="UTF-8" ?>
<view xmlns:vw1="http://www.axemble.com/process/view">
<header name="WORKFLOW_CONTAINERS" login="sysadmin" >
</header>
</view>
Example 5 - Get the list of process versions:
<?xml version="1.0" encoding="UTF-8" ?>
<view xmlns:vw1="http://www.axemble.com/process/view">
<header name="WORKFLOWS" login="sysadmin" >
</header>
</view>
Response flow
Example 1 - Returns of assigned tasks:
<view xmlns:vw1="http://www.axemble.com/process/view">
<header name="ASSIGNED_TASKS" label="Assigned tasks" description="" />
<body>
<element>
<header id="" reference="" creator="" editor="" created-date="" modified-date="" uri="">
<resource-definition id="" name="" label="" protocol-uri="" />
</header>
<body>
<string name="" label="" value="" />
<date name="" label="" value="" />
</body>
</element>
</body>
</view>
Example 2 - Returns of overdue tasks:
<view xmlns:vw1="http://www.axemble.com/process/view">
<header name="DELAYED_TASKS" label="Delayed tasks" description="" />
<body>
<element>
<header id="" reference="" creator="" editor="" created-date="" modified-date="" uri="">
<resource-definition id="" name="" label="" protocol-uri="" />
</header>
<body>
<string name="" label="" value="" />
<date name="" label="" value="" />
</body>
</element>
</body>
</view>
Example 3 - Returns of the list of process groups:
<view xmlns:vw1="http://www.axemble.com/process/view">
<header name="CATALOGS" label="Catalogs" description="" />
<body>
<catalog>
<header id="" name="" label="" uri="" project-id="" project-name="" />
<body is-confidential="" is-system="">
<workflows>
<workflow>
<header id="" name="" label="" version="" uri="" project-id="" project-name="" />
</workflow>
</workflows>
</body>
</catalog>
</body>
</view>
Example 4 - Returns of the list of process versions:
<view xmlns:vw1="http://www.axemble.com/process/view">
<header name="WORKFLOW_CONTAINERS" label="Workflow containers" description="" />
<body>
<workflow-container>
<header id="" name="" label="" project-id="" project-name="" />
</workflow-container>
<workflow-container>
<header id="" name="" label="" project-id="" project-name="" />
</workflow-container>
</body>
</view>
Example 5 - Returns of the list of process versions:
<view xmlns:vw1="http://www.axemble.com/process/view">
<header name="WORKFLOWS" label="Workflows" description="" />
<body>
<workflow>
<header id="" name="" label="" version="" uri="" project-id="" project-name="" />
</workflow>
<workflow>
<header id="" name="" label="" version="" uri="" project-id="" project-name="" />
</workflow>
</body>
</view>
Data universe
“view” command
This flow will allow us to browse the DataUniverse objects. These flows are the same as for the workflow module but with small nuances:
- A catalog of type 4.
- An definition object tree slightly different.
- The absence of a graph.
URL
ttp://myvdocserver/vdoc/navigation/flow?module=worflow&cmd=view&_AuthenticationKey=...
Administrative objects
The objective here is to browse the definition objects, administration, just as if we were connected to Process and we were going through the applications, databases, tables, …
All definition objects are not yet available but the main flow (considered the most useful) are managed:
- Project (Application)
- Catalog (Base de données) (Type 4)
- IResourceDefinition(Table)
- View (Vues)
- IResourceDefinition(Table)
- Catalog (Base de données) (Type 4)
n your queries, you can define the structure (tree or not) of what you request. For example :
- All projects.
- All databases in a project.
- All projects with all their corresponding databases.
- The whole tree structure of the definition objects.
All these queries can be done with the same flow. Indeed, it’s up to you to define the structure of your object definitions.
The tree structure must be respected in the declaration of “definitions”.
Scopes tags allows to reduce the search area.
Request flow
Here’s following some examples of what you can achieve with this flow.
All projects:
<?xml version="1.0" encoding="UTF-8"?>
<view xmlns:vw1="http://www.axemble.com/vdoc/view">
<header>
<definition class="com.axemble.vdoc.sdk.interfaces.IProject" />
</header>
</view>
Databases group by project:
<?xml version="1.0" encoding="UTF-8"?>
<view xmlns:vw1="http://www.axemble.com/vdoc/view">
<header>
<definition class="com.axemble.vdoc.sdk.interfaces.IProject" >
<definition class="com.axemble.vdoc.sdk.interfaces.ICatalog" type="4" />
</definition>
</header>
</view>
Groups of processes belonging to a projet:
<?xml version="1.0" encoding="UTF-8"?>
<view xmlns:vw1="http://www.axemble.com/vdoc/view">
<header>
<scopes>
<project protocol-uri="uri://vdoc/project/1"/>
</scopes>
<definition class="com.axemble.vdoc.sdk.interfaces.ICatalog" />
</header>
</view>
Tables for a specific database:
<?xml version="1.0" encoding="UTF-8"?>
<view xmlns:vw1="http://www.axemble.com/vdoc/view">
<header>
<scopes>
<catalog protocol-uri="uril://vdoc/catalog/DefaultOrganization/TestApplication/BaseAdministrative:4"/>
</scopes>
<definition class="com.axemble.vdoc.sdk.interfaces.IResourceDefinition" />
</header>
</view>
All the tree structure:
<?xml version="1.0" encoding="UTF-8"?>
<view xmlns:vw1="http://www.axemble.com/vdoc/view">
<header>
<definition class="com.axemble.vdoc.sdk.interfaces.IProject" >
<definition class="com.axemble.vdoc.sdk.interfaces.ICatalog" type="4">
<definition class="com.axemble.vdoc.sdk.interfaces.IResourceDefinition" >
<definition class="com.axemble.vdoc.sdk.interfaces.IView"/>
</definition>
</definition>
</header>
</view>
Response flow
In response, the flow will send you a tree structure related to your request. If we take the previous flow example " Retrieve all the tree structure", here’s what Process could return as answer:
<view xmlns:vw1="http://www.axemble.com/vdoc/view">
<body>
<project id="1" name="DefaultProject" label="Projet par défaut" protocol-uri="uril://vdoc/project/DefaultOrganization/DefaultProject"/>
[...]
<project id="11" name="TestApplication" label="TestApplication" protocol-uri="uril://vdoc/project/DefaultOrganization/TestApplication">
<catalog id="24" name="BaseAdministrative" label="Base administrative" protocol-uri="uril://vdoc/catalog/DefaultOrganization/TestApplication/BaseAdministrative:4" is-confidential="false" is-system="true" type="4">
<resource-definition id="40" name="CategorieVoiture" label="CategorieVoiture" protocol-uri="uril://vdoc/resourceDefinition/DefaultOrganization/TestApplication/BaseAdministrative:4/CategorieVoiture"/>
<resource-definition id="42" name="Test" label="Test" protocol-uri="uril://vdoc/resourceDefinition/DefaultOrganization/TestApplication/BaseAdministrative:4/Test"/>
<resource-definition id="34" name="Voiture" label="Voiture" protocol-uri="uril://vdoc/resourceDefinition/DefaultOrganization/TestApplication/BaseAdministrative:4/Voiture"/>
</catalog>
</project>
<project id="12" name="VDocFilecenter" label="Filecenter" protocol-uri="uril://vdoc/project/DefaultOrganization/VDocFilecenter"/>
</body>
</view>
Handling documents
Here, we are in the querying of dynamic objects, namely here, data universe ressources. So to query, we will send an XML of a view definition with some possible additional options.
The rules that apply to flows on workflows (process document) also apply to data universe. A full explanation is provided in the article about the flows on the process documents.
Request flow
At the level of a view evaluation, we can range from the simplest to the most complete:
- Simply assessing a Process view as configured.
- Retrieve the XML of a Process view then edit it and assess it.
- Build yourself an XML flow of a view definition unbound to an existing Process view.
Example 1 - Simply assessing a Process view as configured : This example is identical to the example of the command view of the process document (example 1 of the Workflow section).
Example 2 - Retrieve the XML of a Process view then edit it and assess it:
- Retrieve an XML flow of an existing view in Process: this is achievable via the get flow of the Workflow Module.
- Edit the flow: this should be done manually or by development
- Evaluate the flow: we are in a case of XML assess, see the example 3 that follows.
Example 3 - Build yourself an XML flow of view definition unbound to an existing Process view:
There are two differences compared to the flows of workflows: type="resource"
instead of type="treatment"
and <field name="sys_ResourceDefinition" value="Notifications"/>
; Here there’s no filter on the
IWorkflowContainer.
<?xml version="1.0" encoding="UTF-8"?>
<view xmlns:vw1="http://www.axemble.com/vdoc/view">
<header>
<scopes>
<project protocol-uri="uril://vdoc/project/DefaultOrganization/Training"/>
</scopes>
<definition catalog="AcknowledgementManagement" catalogType="4" type="resource">
<filters>
<fieldgroup operator="AND">
<field name="sys_ResourceDefinition" value="Notifications"/>
</fieldgroup>
</filters>
<view sortAscending="true" sortBy="sys_Title">
<column name="sys_Title"/>
<column name="sys_Reference"/>
</view>
</definition>
</header>
</view>
A change request have been made so that the “type” attribute take as value:
com.axemble.vdoc.sdk.interfaces.IStorageResource
com.axemble.vdoc.sdk.interfaces.IWorkflowInstance
Indeed, the term “resource” or “treatment” are internal denominations that are not trivial for an SDK developer. Obviously, when these changes will have been made, old names will still work.
Response flow
As output, we will get some resources Process each with:
- A header with system information of the resource
- A body with the value of all fields that have been requested (columns in the view)
For more information about the available data types, please refer to “Data types”.
Here’s an example of a response that could be received:
<view xmlns:vw1="http://www.axemble.com/vdoc/view">
<header description="" label="" name="" />
<body>
<resource>
<header created-date="2012-03-01T09:30:39.000Z" creator="sysadmin" editor="sysadmin" id="24" modified-date="2012-03-05T10:11:17.000Z" reference="0001" uri="?class=resource&method=edit&object=24">
<protocoluri>uri://vdoc/resource/24</protocoluri>
<resource-definition id="14" label="Notifications" name="Notifications" protocol-uri="uril://vdoc/resourceDefinition/DefaultOrganization/Training/AcknowledgementManagement:4/Notifications" />
</header>
<body>
<string label="Référence" name="sys_Reference" value="0001" />
<string label="Titre" name="sys_Title" value="titre" />
</body>
</resource>
</body>
</view>
“get” command
The purpose of this flow is to retrieve detailed information on a Process object by using its URI protocol. We can retrieve information on both definition objects and dynamic objects.
Definition objects managed: IView.
Dynamic objects managed: IStorageResource.
URL
http://myvdocserver/vdoc/navigation/flow?module=workflow&cmd=get&_AuthenticationKey=...
Request flow
This flow is simple to use, you just need to forward the URI protocol and some options.
Parameter | Description | Mandatory |
---|---|---|
includeLabels | Set to true, to retrieve the field labels associated with the document. | No |
includeLinkedResources | Set to true, to include the lines of possible dynamic arrays. | No |
includeAttachmentsContent | Set to true, to include the content of the attached files(in base64) in the flow. | No |
useGuid | This setting can be useful if you don’t want to include attached file (in Base64) in the flow, but you know that you will soon need to download an attached file. With this setting, Process will book a download for each attached file and send you back a GUID in the response flow. After, that GUID will be usable with the download command of the “io” module. | No |
These parameters are located in the “configuration” node in the header tag:
<?xml version="1.0" encoding="UTF-8" ?>
<get>
<header>
<configuration>
<param name="includeLabels" value="false" />
<param name="includeLinkedResources" value="true" />
</configuration>
</header>
<body>
...
Example 1 - Retrieving of an XML definition of a view:
<?xml version="1.0" encoding="UTF-8" ?>
<get>
<header />
<body>
<element class="com.axemble.vdoc.sdk.interfaces.IView">
<header protocol-uri="uril://vdoc/resourceDefinitionView/DefaultOrganization/TestApplication/BaseAdministrative:4/CategorieVoiture/DEFAULT" />
</element>
</body>
</get>
The view definition will be returned in Base64.
Example 2 - Retrieving informations on a data:
<?xml version="1.0" encoding="UTF-8" ?>
<get>
<header />
<body>
<element class="com.axemble.vdoc.sdk.interfaces.IStorageResource">
<header protocol-uri="uri://vdoc/resource/109" />
</element>
</body>
</get>
In this case, the URI protocol of the view could have been recovered manually in the Process interface or via the definition objects code of this same view.
Response flow
The response flow will depend on your request.
Example 1 - Retrieving of an XML definition of a view:
<get>
<header id="266" name="DEFAULT" label="DEFAULT" protocol-uri="uril://vdoc/resourceDefinitionView/DefaultOrganization/TestApplication/BaseAdministrative:4/CategorieVoiture/DEFAULT"/>
<body>
<definition content="PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZG[...]"/>
</body>
</get>
Example 2 - Retrieving informations on a data:
<get xmlns:d1="http://www.axemble.com/process" class="com.axemble.vdoc.sdk.interfaces.IStorageResource">
<header id="109" protocol-uri="uri://vdoc/resource/109" reference="0001" creator="sysadmin" created-date="2012-12-11T09:49:12.000Z" editor="sysadmin" modified-date="2013-01-10T08:33:29.000Z">
<resource-definition id="34" name="Voiture"/>
<catalog id="24" name="BaseAdministrative" is-confidential="false" is-system="false" type="4"/>
<project id="11" name="TestApplication"/>
</header>
<body>
<date name="DateDAchat" label="Date d'achat" value="2012-12-03T11:00:00.000Z"/>
<date name="sys_CreationDate" label="Date de création" value="2012-12-11T09:49:12.000Z"/>
<date name="sys_ModificationDate" label="Date de modification" value="2013-01-10T08:33:29.000Z"/>
<string name="sys_Reference" label="Référence" value="0001"/>
<string name="Immatriculation" label="Immatriculation" value="47-FGG-45"/>
<string name="sys_Title" label="Titre" value="V1"/>
<user name="sys_ModifiedBy" label="Modifié par" id="1" external-id="00i-000000-000" login="sysadmin" first-name="System" last-name="Administrator" protocol-uri="uri://vdoc/user/1"/>
<user name="sys_Creator" label="Créateur" id="1" external-id="00i-000000-000" login="sysadmin" first-name="System" last-name="Administrator" protocol-uri="uri://vdoc/user/1"/>
<user name="sys_Addressee" label="Créateur représenté" id="1" external-id="00i-000000-000" login="sysadmin" first-name="System" last-name="Administrator" protocol-uri="uri://vdoc/user/1"/>
</body>
</get>
For more informations about the available data types, please refer to “Data types”.
“create” command
This flow allows to create a new data in a data universe table. You have to send the following information:
- Creator
- Reference (eventually)
- All fields values
URL
http://myvdocserver/vdoc/navigation/flow?module=workflow&cmd=create&_AuthenticationKey=...
Request flow
Simple create:
<?xml version="1.0" encoding="UTF-8" ?>
<create>
<header />
<body>
<resource class="com.axemble.vdoc.sdk.interfaces.IStorageResource" >
<header reference="" creator="sysadmin" editor="" >
<project protocol-uri="uri://vdoc/project/11" />
<catalog name="BaseAdministrative" type="4" />
<resource-definition name="CategorieVoiture" />
</header>
<body>
<string name="sys_Title" value="Ma nouvelle catégorie de voiture" />
</body>
</resource>
</body>
</create>
For more informations about the available data types, please refer to “Data types”.
Response flow
The response flow will be a standard XML that will indicate either the success of the operation or any errors:
<?xml version="1.0" encoding="UTF-8"?>
<response status="success" message="Resource created [0004]." detail="uri://vdoc/resource/276"/>
“update” command
This flow will allow to update an existing row of data (in a table of a data tank). By update we mean, update on fields values.
URL
http://myvdocserver/vdoc/navigation/flow?module=workflow&cmd=update&_AuthenticationKey=...
Request flow
The only difference compared to the flow of creation will be at the level of the resource header: you have to provide the URI protocol of the document that you want to alter.
Example 1 - Update on a IWorkflowInstance object:
<?xml version="1.0" encoding="UTF-8" ?>
<update>
<header />
<body>
<resource class="com.axemble.vdoc.sdk.interfaces.IWorkflowInstance" >
<header protocol-uri="uri://vdoc/workflowInstance/17" />
<body>
<string name="sys_Title" value="Test 6" />
<user name="IdentifiantUtilisateur" login="user1" />
<string name="Societe" value="Organisation par défaut" />
<string name="Adresse" value="456 rue de la république" />
<string name="Email" value="user1@user1.com" />
<string name="Telephone" value="01 23 45 67 89" />
</body>
</resource>
</body>
</update>
Example 2 - Update on a IStorageResource object:
<?xml version="1.0" encoding="UTF-8" ?>
<update>
<header />
<body>
<resource class="com.axemble.vdoc.sdk.interfaces.IStorageResource" >
<header protocol-uri="uri://vdoc/resource/276" />
<body>
<string name="sys_Title" value="Ma nouvelle catégorie de voiture (modifiée)" />
</body>
</resource>
</body>
</update>
For more informations about the available data types, please refer to “Data types”.
Response flow
This response flow will be of the same form as the response flow of the creation.
“delete” command
This flow is very simple to use, but it must be used very carefully because it allows to remove an existing Process object.
It’s important to note that deleted items in the directory can’t be recovered..
It’s possible to delete both definition objects (administrative objects) and dynamic objects (documents).
Definition objects managed:
- IProject
- ICatalog
- IResourceDefinition
Dynamic object managed: IStorageResource.
URL
http://myvdocserver/vdoc/navigation/flow?module=workflow&cmd=delete&_AuthenticationKey=...
Request flow
This flow is simple to use, you just need to forward the URI protocol of the item to delete.
Example 1 - Delete an application:
<?xml version="1.0" encoding="UTF-8"?>
<delete>
<header login="sysadmin" />
<body>
<element class="com.axemble.vdoc.sdk.interfaces.IProject">
<header protocol-uri="uril://vdoc/project/DefaultOrganization/MyProject" />
</element>
</body>
</delete>
Example 2 - Delete a process group:
<?xml version="1.0" encoding="UTF-8"?>
<delete>
<header login="sysadmin" />
<body>
<element class="com.axemble.vdoc.sdk.interfaces.ICatalog">
<header protocol-uri="uri://vdoc/catalog/82" />
</element>
</body>
</delete>
Example 3 - Delete an IResourceDefinition:
<?xml version="1.0" encoding="UTF-8"?>
<delete>
<header login="sysadmin" />
<body>
<element class="com.axemble.vdoc.sdk.interfaces.IResourceDefinition">
<header protocol-uri="uri://vdoc/resourceDefinition/161" />
</element>
</body>
</delete>
Example 4 - Delete an IStorageResource:
<?xml version="1.0" encoding="UTF-8"?>
<delete>
<header login="sysadmin" />
<body>
<element class="com.axemble.vdoc.sdk.interfaces.IStorageResource">
<header protocol-uri="uri://vdoc/resource/109" />
</element>
</body>
</delete>
Response flow
The response flow will be a standard XML that will indicate either the success of the operation or any errors:
<?xml version="1.0" encoding="UTF-8"?>
<response status="success" message="Element deleted[ElementName]." detail="protocol-uri" />
Sources :
- https://wiki.myvdoc.net/xwiki/bin/view/Dev+Floor/SDKFlowWorkflowView
- https://wiki.myvdoc.net/xwiki/bin/view/Dev+Floor/SDKFlowWorkflowGet
- https://wiki.myvdoc.net/xwiki/bin/view/Dev+Floor/SDKFlowWorkflowCreate
- https://wiki.myvdoc.net/xwiki/bin/view/Dev+Floor/SDKFlowWorkflowUpdate
- https://wiki.myvdoc.net/xwiki/bin/view/Dev+Floor/SDKFlowWorkflowDelete
- https://wiki.myvdoc.net/xwiki/bin/view/Dev+Floor/SDKFlowWorkflowCmd
- https://wiki.myvdoc.net/xwiki/bin/view/Dev+Floor/SDKFlowWorkflowDataUniverseView
- https://wiki.myvdoc.net/xwiki/bin/view/Dev+Floor/SDKFlowWorkflowDataUniverseGet
- https://wiki.myvdoc.net/xwiki/bin/view/Dev+Floor/SDKFlowWorkflowDataUniverseCreate
- https://wiki.myvdoc.net/xwiki/bin/view/Dev+Floor/SDKFlowWorkflowDataUniverseUpdate
- https://wiki.myvdoc.net/xwiki/bin/view/Dev+Floor/SDKFlowWorkflowDataUniverseDelete