How to create links for SAFE X3 functions in visual processes
The visual process editor is a flash component that was written in version 150. It will be replaced in the future by an HTML 5 editor. But in the meantime, it is usable without any modification:
Creating a link to other functions (administration functions, classes and representations, queries and statistic pages is also possible by using the URL link, but it requires to know the rules to follow for creating the relevant URL according to the type of link you want to create.
This document explains how to code these links.
The principles are the following:
When the key is not given, the format of the URL is the following:
{$baseUrl}/CLASS?representation=REPRESENTATION.$facet
In this URL, CLASS
is the class code, REPRESENTATION
the representation code, and $facet
the facet (here, it can only be $query
).
When the key is given, the format of the URL is the following:
{$baseUrl}/CLASS('key_value')?representation=REPRESENTATION.$facet
In this URL, CLASS
is the class code, key_value
is the key value, REPRESENTATION
the representation code, and $facet
the facet (here, it can only be $details
or $summary
). If the key value is based on several components, the component values are separated by ~
.
The same type of URL link is used, but CLASS
is QUERY('query_code')
and REPRESENTATION
is QUERY~query_code~level
, where the code of the query is defined by query_code
and the break level used to define the columns that appear is given by level
.
Additional parameters can be added with the syntax ¶meter=value
. Level is usually 1 (this displays the first level of grouping). The level where the data s read (it might be different from the level used to define the columns to display) is given by &level=x
Typical parameters usable here are, for instance:
&displayLineNum=true
&forcedExecution=true
If ~1 is omitted in the representation=QUERY~MYREQ~1
syntax, the graph will not display. To have a “flat mode” for statistics (useful to export all the lines to Excel), the following parameter must be added to the request URL:
&cube=false
The other options can be found here.
The link is the same than for a Syracuse function, with the following characteristics:
* The class is PROCESS('PROCESS_CODE')
* The representation is PROCESS~PROCESS_CODE
* The facet is $details
* If the process code depends from the legislation, PROCESS_CODE
can be given in the format PROCESS_CODE~LEGISLATION_CODE
CLASS
and REPRESENTATION
codes can be found by using a standard menu to get the URL. The normalization for Syracuse is that the CLASS
is the plural name of the entity in camel case, while the REPRESENTATION
is the singular name. For example, users as class and users as representation, menuItems
as class and menuItem
as representation./sdata/syracuse/collaboration/syracuse/CLASS?representation=REPRESENTATION.$facet
/sdata/syracuse/collaboration/syracuse/CLASS('key_value')?representation=REPRESENTATION.$facet
Take care that on the administration function, the key are always UUIDs. If you want to create such links, the best is first to go on the page, to copy the URL from your browser, and just to copy the portion of the URL that starts with /stdata.
Access to the query for a representation and a class (ITMMASTER for example)
{$baseUrl}/ITMMASTER?representation=ITMMASTER.$query
Access to the detail of a table definition (the entity is ATABLE
, the key is BPCUSTOMER
)
{$baseUrl}/ATABLE('BPCUSTOMER')?representation=ATABLE.$details
Access to the summarized view of a cost accounting dimension (the key is the dimension type and the dimension)
{$baseUrl}/CACCE('CCT~COMM-001')?representation=CACCE.$summary
Access to the request MYREQ in cube mode
{$baseUrl}/QUERY('MYREQ')?representation=QUERY~MYREQ~1.$query&count=20&level=1&cube=true
Access to the process SALES:
{$baseUrl}/PROCESS('SALES')?representation=PROCESS~SALES.$details
Access to the process ACCOUNT for USA legislation:
{$baseUrl}/PROCESS(' ACCOUNT~USA ')?representation=PROCESS~ACCOUNT~USA.$details
Access to the query for the users:
/sdata/syracuse/collaboration/syracuse/users?representation=user.$query
Access to the guest user definition (take care that the key is an unique id for such an entity):
/sdata/syracuse/collaboration/syracuse/users('858cd6ac-558f-436a-b8ae-8884c1f44492')?representation=user.$query