Annuaire

Il s’agit de rapatrier dans les champs d’un processus des éléments issus de l’annuaire. Ce type d’abonnement ne nécessite pas de configuration XML spécifique.

Info

Ce type d’abonnement n’a de sens que s’il est utilisé avec un évènement de type “onChange”. En effet, nous avons besoin de se baser sur un champ annuaire pour récupérer ces attributs

La classe d’abonnement a utiliser est com.axemble.vdp.mapping.extensions.DirectoryBrowserMappingExtension.

Here is a subscription definition example based on directory data:

<subscription field-id="UserField" name="onChange" prop-id="" subscription-class="com.axemble.vdp.mapping.extensions.DirectoryBrowserMappingExtension"> 
	<action field-id="Field_1" prop-id="" update-mode="both" action-key="Organization.Name"/> 
	<action field-id="Field_2" prop-id="" update-mode="both" action-key="PhoneNumber"/>
	<action field-id="Field_3" prop-id="" update-mode="both" action-key="Email"/>
</subscription> 

On the “UserField” field modification, the fields “Field_1, Field_2, Field_3” are allocated and take as respective values: the affiliated organization name, the phone number, and the user e-mail.

Tags

Subscription

The “subscription” element defines the subscription input in XML of the resource template.

Element Description
field-id Modified document field and trigger of the “onChange” event. This field must be of Directory type.
name Name of occurred event
prop-id Not available
subscription-class Extension class: com.axemble.vdp.mapping.extensions.directoryBrowserMappingExtension

On-stage

The “on-stage” element defines the input of a step on which the subscription will be run.

Element Description
name System name of the concerned step. The keyword sys_CreationWizard enables to indicate that the treatment will be processed only on the action of process document creation.

Action

The “action” element defines the input of an action to be performed after an event is triggered. Used in XML of the resource template.

Element Description
field-id System name of the subscribed field
prop-id Not available
update-mode
action-key Property of the DirectoryElement that we want to retrieve

The actions

Actions define all the document fields that will be updated when subscription is run. Actions can only be defined at the XML document level of the resource template. It is possible to define 1 to n actions.

The filters

Filters on steps can be placed to restrict subscriptions running on some steps. If no step has been specified, the subscription will be valid at all steps of the document. Filters are defined at the XML document level of the resource template. The on-stage tags can be present from 0 to n times.

Introspection

Introspection will let you access the object’s intrinsic properties. These properties should be accessible through the “get” type methods on directory objects. Introspection is possible at the “action-key” attribute level of the “action” tag.

Functions

Available formulas

For the retrieval of the attributes of the directory, we will separate:

  • The standard attributes: we will base ourselves directly on the system names of the standard attributes of the directory (see below)
  • Extended attributes: in this case, we will use the formulas presented below

We will therefore execute this type of subscription with an onChange event on a directory type field: user, organization, localization, group (simple).

Function Concerned classes Description
@getOrganizationAttribute(field_name) Directory organization Is applicable to an Organization type document field to get an organization’s extended attribut.
@getLocalizationAttribute(field_name) Directory localization Is applicable to a Localization type document field to get a localization’s extended attribut.
@getUserAttribute(field_name) Directory user Is applicable to a User type document field to get a user’s extended attribut.
@getGroupAttribute(field_name) Directory group Is applicable to a Group type document field to get a group’s extended attribut.
@toDirectoryElement(field_name) User, Group, Organization Is applicable to a DirectoryElement type document field.
@toDirectoryElement(method_name) Method recovering to a User,Group,Organization,Localization type directory object. Enables, via the User object introspection, to recover its localization, then to convert it in DirectoryElement in order to store it.

Exemple

On souhaite rapatrier dans des champs d’un processus :

  • Le numéro de téléphone de l’utilisateur qui crée le document
  • L’adresse de livraison (qui est un attribut étendu) de l’utilisateur qui crée le document

Lorsqu’on veut déclencher un abonnement sur l’utilisateur sys_Creator, il faut d’abord recopier ce champ utilisateur système dans un autre champ utilisateur qui a été créé (et que l’on peut masquer à l’affichage pour que cela soit transparent pour l’utilisateur final).

Cette recopie se fait par un simple abonnement de type ressource :

<subscription name="onLoad" subscription-class="com.axemble.vdp.mapping.extensions.ResourceBrowserMappingExtension">
   <!-- recopie de sys_Creator vers le champ utilisateur "CreateurDemande" -->
   <action field-id="CreateurDemande" throw-events="false" update-mode="both" action-key="@copy(sys_Creator)" />
</subscription>
Info

Cette recopie n’est pas nécessaire si vous souhaitez déclencher l’abonnement sur un champ utilisateur différent du sys_Creator.

Ensuite, l’abonnement de type annuaire peut être déclenché :

<subscription field-id="CreateurDemande" name="onChange" subscription-class="com.axemble.vdp.mapping.extensions.DirectoryBrowserMappingExtension">
   <!-- recopie de l'attribut système "PhoneNumber" vers le champ de processus "ContactPhone" -->
   <action field-id="ContactPhone" action-key="PhoneNumber"/>
   <!-- recopie de l'attribut étendu "DeliveryAddress" vers le champ de processus "DeliveryAddress" -->
   <action field-id="DeliveryAddress" action-key="@getUserAttribute(DeliveryAddress)"/>
</subscription>

Available attributs

This attributs list is about the iUser.

It is found on page 114 of the administrator guide or in the column headers of the directory export file (Excel).

Since Process2024.1, the user has been redefined to optimize the architecture. Old use is still working but deprecated.

Attribut Description SDK method
ActivationDate Activation date of the account getActivationDate
Enable Actif (1 si actif ou 2 si inactif) isEnable()
Address1 Address (first line) getAddress1
Address2 Address (second line) getAddress2
Birthday Birthday getBirthday
City Town getCity
ContractType Contract type system name getContractType
Country Country getCountry
Description Description getDescription
Email Email getEmail
EmployeeNumber Employee number getEmployeeNumber
Entry Hiring date getEntry
Exit Exit date getExit
Expiration Expiration date getExpirationDate périmée
FaxNumber Fax number getFaxNumber
FirstName FirstName getFirstName
Language Language getLanguage
LastName LastName getLastName
Login Login / identifier getLogin
MobilePhoneNumber Mobile number getMobilePhoneNumber
NickName NickName getNickName
PhoneNumber Phone number getPhoneNumber
Sex Sex (M or F) getSex
Skin Theme used in the portal getSkin
SocialCategory Socioprofessional category’s system name getSocialCategory
TimeZone Time zone
Title Title (Mr, Mme, Mlle) getTitle
UserFunction Fonction getUserFunction
Zipcode Zipcode getZipcode
Assistant.Login Assistant’s login getAssistant().getLogin()
HierarchicalManager.Login Hierarchical manager’s login getHierarchicalManager().getLogin()
Localisation.Name Localization name getLocalization
Manager.Login Manager’s login getManager().getLogin()
Organization.Name Organization name getOrganization

Three attributs were added to split the sub-attributs (ex. : iUser.PersonalInformation.Address1) :

  • PersonalInformation:
    Sub-attributs Description SDK method
    Address1 Address (first line) getAddress1
    Address2 Address (second line) getAddress2
    Birthday Birthday getBirthday
    City Town getCity
    Country Country getCountry
    Description Description getDescription
    NickName NickName getNickName
    Sex Sex (M or F) getSex
    Zipcode Zipcode getZipcode
  • ProfessionalInformation:
    Sub-attributs Description SDK method
    ContractType Contract type system name getContractType
    EmployeeNumber Employee number getEmployeeNumber
    Entry Hiring date getEntry
    Exit Exit date getExit
    SocialCategory Socioprofessional category’s system name getSocialCategory
    UserFunction Fonction getUserFunction
    Assistant.Login Assistant’s login getAssistant().getLogin()
    HierarchicalManager.Login Hierarchical manager’s login getHierarchicalManager().getLogin()
    Manager.Login Manager’s login getManager().getLogin()
  • TechnicalInformation:
    Sub-attributs Description SDK method
    ActivationDate Activation date of the account getActivationDate
    ConnectionAllowed Connection allowed isConnectionAllowed
    CreatedBy Created by getCreatedBy
    CreatedDate Created date getCreatedDate
    ExpirationDate Expiration date getExpirationDate
    LastVisitedDate Last visite date on the plateforme getLastVisitedDate
    Locked Locked isLocked
    ModifiedBy Modified by getModifiedBy
    ModifiedDate Modified date getModifiedDate
    PrivacyPolicyValidation Privacy policy validation date getPrivacyPolicyValidation
    Sub Sub (identity) getSub
  • Other attributs are still here:
    Attribut Description SDK method
    Enable Actif (1 si actif ou 2 si inactif) isEnable()
    Email Email getEmail
    FaxNumber Fax number getFaxNumber
    FirstName FirstName getFirstName
    Language Language getLanguage
    LastName LastName getLastName
    Login Login / identifier getLogin
    MobilePhoneNumber Mobile number getMobilePhoneNumber
    PhoneNumber Phone number getPhoneNumber
    Skin Theme used in the portal getSkin
    TimeZone Time zone
    Title Title (Mr, Mme, Mlle) getTitle
    Localisation.Name Localization name getLocalization
    Organization.Name Organization name getOrganization

Sources :