short tutorial: use adaptors in Forms Builder

xCP 1.x compatible

 Example: the last five active users

This list was dynamically created with the data source adaptor for the application Forms Builder.

First you must create a global or template adaptor. Use the data source adaptor to create a DQL or SQL – Query and include dynamical information from external data source.

The following query returns the last logged in users

select user_name, last_login_utc_time  from dm_user WHERE user_os_name not like 'dm%' AND user_name = SUBSTR( default_folder,2,20)ORDER BY last_login_utc_time DESC ENABLE(RETURN_TOP 5)

ReadOnlyTable

Make sure that you are working in the  “Design view” and insert a ReadOnlyTable. The table has a lot of properties, please label the table and select the “Special” tab.

Select your individual adaptor as external data source.

The individual adapter named “hpe_top5_users” and is a global adapter, available for all form templates.

Remember: the output data was created as an indivudual complex type. The output type called “data” and the group named “item”. The individual items are  the result values of the query: user_name and last_login_utc_time.

The output data is sortable. You can relabel the columns and set the visibility and the width of the rows.

ListBox

The individual adapter named “hpe_top5_users” and is a global adapter, available for all form templates.

The ListBox functionality is very similar to the ReadOnlyTable. The adaptor must be specified for every individual ListBox in the “Data & Storage” tab.

The login-time as unique value is not recommend, because it is not an identifier. The query should be extended with one unique id, for example the r_object_id.

In the ListBox only one value is available. Please select one of the result values of the query.

 

This figure displays the special tab for the ListBox property. The adaptor will be exectuted when the form initializes.

Forms Builder: Data adaptors

xCP 1.x compatible

futher information: short tutorial: use adaptors in Forms Builder

Data adaptors are a powerful tool to create individual and dynamical forms and taskspace tabs. The data source adaptor includes data from the repository via DQL or values from SQL or JDBC (Java Database Connectivity).

Adaptor Type Description
Item Initializer entered a value in a field automatically.
Default: current date/time in a date in a time or date field.
Item Validator validate a user’s input values
on individual fields.
Default: adaptor validates string inputs
against the current repository by searching for
them in the list returned by a DQL query or a default string (example: “@”)
Document Validator validate an entire form template
Data Source include external information into template
further information can be found in Class Name section
Data Source Set Value automatically populate one field on the
template by two types of setting adaptors values: on Change or on Init
Document Processor – Initialization An initialization adaptor initializes values for the entire form.
Document Processor – Pre-submission A pre-submission adaptor executes prior to form submission
provided the validation succeeds, then the form is saved.
Document Processor – Post-submission A post-submission adaptor executes after a form is submitted.

Create Data Adaptors

Forms Builder –>File –> Adaports

Adaptor Configuration Manager

Adaptor Configuration Manager

Installed adaptors

add a new adaptor (Global Adaptors if the functionality should be available for more than one form template).

Gerneral

Adaptor Type (table 1 on this page)
Name: the individual name of your new created adaptor
Description: a short description of the functionality or requirements

Implementation

Class Name:
DataSourceAdaptorService to connect a repository via DQL

JDBCDataSourceAdaptor to connect to SQL or external DQL Server

PropertiesDataSourceAdaptor to include data from a properties file

Type:
Java Class (a Java Class is easy to validate or to debug, if your adaptor is not very complex you can use SBO per default)
service-based business object (SBO) based on EMC’s Business Object Framework (BOF)

Initial parameter:
dql or sql

returns the last five active users (last_login_utc_time):

select user_name, last_login_utc_time  from dm_user 
WHERE user_os_name not like 'dm%' AND user_name = SUBSTR( default_folder,2,20)ORDER BY last_login_utc_time DESC 
ENABLE(RETURN_TOP 5)

 

Input:
The individual value to fulfill the main query. Not usesd in this example.

Output type:

All used values in the Initial parameter section should be specified. All output items are grouped in a individual group, called “item”.

futher information: short tutorial: use adaptors in Forms Builder

 

The number of visitors are stable since the relaunch of crazyapple.com.

318 unique page visitors from 32 countries with ar average visit duration of more than 3:20 Minutes.

The users with the longest visit duration came from Brazil (00:20:28), Switzerland (00:12:03), Hong Kong (00:09:20), Russia (00:06:36) and Germany (00:05:11).
And – of course – the e20-120 exam questions was the most clicked content.

Table: TopTen Page Visitors

Land/GebietVisitorsPages/Visitors
Germany753,26
United States631,58
India492,47
France413,36
Australia181,17
United Kingdom153,4
Hong Kong159,8
Canada142,25
Philippines141,25
Turkey131
3172,65

 

If you have any questions or good ideas please leave a comment below this article.

Thank you very mutch – so far.

 

ProcessBuilder: Process Correlation

Process Correlation

xCP 1.x compatible

You can use external systems or technologies using a variety of transmission protocols (e.g. SMTP, FTP or Java Messaging Services).
Correlation identifiers are similar to the r_object_id attribute and implemented as a 32 character string containing hexadecimal letters.

The Process Integrator handel two types of communication:

  • Synchronous – a request is sent and the response is immediately received (no real time, negligible delay)
  • Asynchronous a request is sent, but the answer might never be received or will be received at a later time

Correlation ID vs. Correlation Set

Correlation ID explained using the example of the email activity.

The correcation idenifier can be embedded in the subject header of an outgoing email. The email inbound activity parsed the Subject header and extract the correlaction identifier.

The correlation identifier is embedded in the email subject. The correlation ID must be set in the Input Message Mapping window of the SMTP activity.
The name of the correlation ID, in this example $transaction must be set in the email inbound activity.

Positve: easy and fast to use
Negative: Subject header of the incomming email could only contain the correlation identifier and no other additional text. If the matching process instance is not found a correlation error occurs:

ERROR com.documentum.bps.email.inbound.runtime.EmailTask - Could not process the message for 'Process - simple_email_action Activity - Email Inbound - Step'
Listener: 'Process - simple_email_action Activity - Email Inbound - Step'
Workflow: 'null' - 'null'
Workitem: 'null'
Process: 'simple_email_action' - '4bde75d18000853d'
Activity: 'Email Inbound - Step' - '4cde75d1800082b2' - Activity Template: 'Email Inbound - Step'

com.documentum.bps.inbound.WorkflowNotAvailableException: Workflow not found

Correlation Set

Only process variables or properties of the SDT are selectable.

The correlation set can be defined in the Process Properties in the Advanced tab. The set can contain process variables and structured data taypes. Process Parameters or Package informations are not allowed and available.

The Process integrator will always attempt to use a correlation identifier (not correlation set). If the ID is not available the preconfigured correlation set will be used.
Remember: a correltion identifier in the email subject is not an effective way to match the correct process instance.
Best practice is to create a additional set of Process variables. One of these variables is named message_ID or transaction_ID and contains the internal identifier of the outbound SMTP activity.  In the email inbound step the email attribute Reference will be mapped to the Correlation Set attribute transaction_ID (ref. screenshot).

Displayed the second page of the activity Inspector of the Email inbound activity. The attribute ‘Reference’ is mapped to the correlaction set attribute ‘transaction_ID’

 

Table: Protocol and correlation ID

protocolcommunication typeCorrelation ID
EmailasynchronousCorrelation Header
FTPasynchronousCorrelation Pattern
HTTPsynchronous *Correlation Property
Web Servicessynchronous *
Java Messaging Servicesasynchronous
DQLsynchronous
SQLsynchronous
* can be uses in an asynchronous fashion

Additional information: Process Integrator page and Understanding Process Data article