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:
http://myvdocserver/vdoc/navigation/flow?module=workflow&cmd=view&_AuthenticationKey=...
The objective here is to browse the definition objects and administration, just as if we were connected to VDoc
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.
In your queries, you can define the structure (tree or not) of what you request.
For example, you may wish to retrieve:
All these requests are possible with the same flow.
Indeed, it's you who will define the structure of your definition objects.
Warning: the tree must be respected in the declaration of "definitions"
Scopes tags allows to reduce the search area.
<?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>
<?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>
<?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>
<?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>
<?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>
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 VDoc 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="SupportRequest" label="Support Request" 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="SupportRequest_1.0" label="" protocol-uri="uri://vdoc/workflow/1" /> </workflow-container> </catalog> </project> </body> </view>
Here, we are going to query dynamic objects, in this case, process documents. For this query, we don't have to us a new query format; indeed, the VDoc system views allows us to easily querying of VDoc processes elements. For more information, see Advanced queries in views.
So 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.
You'll see later how we can 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:
So it's up to you to choose the closest path for your need.
You will see in the following examples that it's possible:
This is interesting when we have a JSON flow because it will be possible to transmit the VDoc XML Definition of a view in Base64.
Command | Description | Mandatory |
scopes | Scopes are always important here;they will allow to evaluate our view on a group of processes or a project (for all groups of processes of this project) |
|
pager count offset | This parameter allows to handle the paging in the request returns; This parameter allows to define the number of elements per page Indicate 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 |
<?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 VDoc interface or via code of the definition objects of this same view (see above).
Three tasks are needed here:
<?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="SupportRequest" /> </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>
In response, we will retrieve some VDoc resource containing each time:
For more informations about the available data types, please refer to VDoc data types in SDK flows.
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="SupportRequest_1.0" label="Support request (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="SupportRequest_1.0" label="Support request(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>
The purpose of this flow is to retrieve detailed information on a VDoc object by using its URI protocol.
We can retrieve informations on both definition objects and dynamic objects.
Definition objects managed:
Dynamic objects managed:
http://myvdocserver/vdoc/navigation/flow?module=workflow&cmd=get&_AuthenticationKey=...
This flow is simple to use, you just need to forward the URI protocol and some options.
Command | 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 subdocuments . | 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, VDoc 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> ...
<?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>
<?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>
(only available in the 2011 version)
<?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>
The response flow will depend on our request.
<get> <header id="3" name="TODO" label="A traiter" protocol-uri="uri://vdoc/workflowContainerView/3" /> <body> <definition content="PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZG[...]" /> </body> </get>
<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="RequestSupport_1.0" /> <catalog id="2" name="ProcessusHOTLINE" type="0" /> <project id="1" name="DefaultProject" /> </header> <body> <string name="sys_Reference_chrono" label="Chrono of the formatted reference " value="2" /> <collection name="AvailableOperator" label="Available operator" /> <user name="User ID" label="User id" 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="The chrono root of the formatted reference" value="ProcessusHOTLINE_SupportRequest_1.0" /> <collection name="OperatorLevel2" label="Operator Level 2" /> <collection name="OperatorLevel1" label="Operator Level 1" /> <string name="sys_CurrentActors" label="Current actor" value="System Administrator" /> <collection name="OperatorLevel3" label="Operator Level 3" /> <collection name="End-user" label="End-user" /> <string name="sys_Reference" label="Reference" value="0002" /> <string name="DocumentState" label="Document state" value="In progress..." /> <string name="sys_Title" label="Title" value="Test 1" /> <user name="sys_Addressee" label="Recipient" id="1" external-id="00i-000000-000" login="sysadmin" first-name="System" last-name="Administrator" /> <user name="sys_ModifiedBy" label="Modified by" id="1" external-id="00i-000000-000" login="sysadmin" first-name="System" last-name="Administrator" /> <string name="Society" label="Compagny" value="Bla Bla Inc." /> <string name="sys_CurrentSteps" label="Current step" value="Issue" /> <date name="sys_CreationDate" label="Creation date" value="2011-12-13T16:22:16.703Z" /> <user name="sys_Creator" label="Creator" id="1" external-id="00i-000000-000" login="sysadmin" first-name="System" last-name="Administrator" /> <date name="sys_ModificationDate" label="Modification date" value="2011-12-13T16:28:19.960Z" /> <string name="ProcessState" label="Process state" value="In progress..." /> </body> <history /> </get>
This flow allows to create a new process document.
You have to send the following informations:
http://myvdocserver/vdoc/navigation/flow?module=workflow&cmd=create&_AuthenticationKey=...
<?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="SupportRequest_1.0" /> </header> <body> <string name="sys_Title" value="Test 1" /> <user name="UserId" login="user1" /> <string name="Society" value="Default organization" /> <string name="Address" value="210 Main street" /> <string name="Email" value="user1@user1.com" /> <string name="Phone" value="01 23 45 67 89" /> </body> </resource> </body> </create>
<?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="SupportRequest_1.0" /> </header> <history> <history-entry name="ToProcess" date="2011-12-13T17:30:00.000Z" addressee="sysadmin" /> </history> <body> <string name="sys_Title" value="Test 1" /> <user name="User ID" login="user1" /> <string name="Society" value="Default Organization" /> <string name="Address" value="210 Main street" /> <string name="Email" value="user1@user1.com" /> <string name="Phone" value="01 23 45 67 89" /> </body> </resource> </body> </create>
For more informations about the available data types, please refer to VDoc data types in SDK flows.
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" />
This flow allows to update a process document.
By update, we mean :
http://myvdocserver/vdoc/navigation/flow?module=workflow&cmd=update&_AuthenticationKey=...
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="User ID" login="user1" /> <string name="Society" value="Default organization" /> <string name="Address" value="211 Main street" /> <string name="Email" value="user1@user1.com" /> <string name="Phone" value="01 23 45 67 89" /> </body> </resource> </body> </update>
For more informations about the available data types, please refer to VDoc data types in SDK flows.
This response flow will be of the same form as the response flow of the creation.
This flow is very simple to use, but it must be used very carefully.
It allows to delete an existing VDoc ojects.
It's important to note that deleted objects, can't be recovered.
It's possible to delete both definition objects (administrative objects) and dynamic objects (documents).
Definition objects managed:
Dynamic objects managed:
http://myvdocserver/vdoc/navigation/flow?module=workflow&cmd=delete&_AuthenticationKey=...
This flow is simple to use, you just need to forward the URI protocol of the item to delete.
<?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>
<?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/Training/Education:0" /> </element> </body> </delete>
<?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>
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" />
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:
Flow command | 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) |
http://myvdocserver/vdoc/navigation/flow?module=workflow&cmd=cmd&_AuthenticationKey=...
Here are the possible queries for the request flow.
<?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>
<?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>
<?xml version="1.0" encoding="UTF-8" ?> <view xmlns:vw1="http://www.axemble.com/process/view"> <header name="CATALOGS" login="sysadmin"> </header> </view>
<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="uri://vdoc/resourceDefinition/161" /> </header> <body> <string name="" label="" value="" /> <date name="" label="" value="" /> </body> </element> </body> </view>
<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="uri://vdoc/resourceDefinition/161" /> </header> <body> <string name="" label="" value="" /> <date name="" label="" value="" /> </body> </element> </body> </view>
<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>
<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>
<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>