Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This document provides guidelines you can follow while developing new components and extending the existing EmpowerID functionality. These guidelines are about the naming conventions and tips that help you avoid known issues while developing components using the Workflow Studio.

The information provided is for the customers and their developer teams. These are merely prescriptions or suggestions which would make a good structure, and developers can establish their conventions or modify conventions prescribed here to suit their requirements.

General Tips

  • Always Create package folders in the Workflow Studio Source control. A project folder is a container that provides a logical structure for workflow applications and all associated components. Don’t use the stock packages folder of the EmpowerID product.

  • When altering a stock workflow, a best practice is to make a copy of the workflow and then modify the copied workflow. If the stock workflows are modified, future EID product upgrades might overwrite those workflows. Please consider following the naming conventions provided here in the section Naming Conventions.

  • Not just the workflow, while extending or altering any stock components, please create a copy, save it with a proper name following Naming Conventions and modify it.

  • Customizing and extending EmpowerID components requires inheriting and referencing stock libraries (Class, interface). Please find the instructions here Extend EmpowerID.

Anchor
NamingConventions
NamingConventions
Naming Conventions

We work with various items while developing components in Workflow studio. A standard naming convention followed properly will help read, understand and maintain the code better. This section discusses how we can sensibly name the WFS items like Workflow, Form, and Properties within those items.

Placeholders: Please find the description of the placeholders used in explaining the naming conventions.

  • {CompanyInitial}- It can be the initials of your company, E.g., CI is an initial for imaginary company Circle International.

  • {Verb}- Verb is simply an action to perform, E.g., Create, Edit.

  • {TargetResourceType}- Resource the Action is being performed on, e.g., Person, Mailbox

  • {TargetResourceTypeAbbrevation} - Abbreviation for an EmpowerID object, for e.g. MR for Management Roles, BRL for Business Role Locations

Workflow

This section discusses how you can name a workflow and its activities with examples of patterns you can use in certain situations.

Component

Pattern

Example

Description

Workflow

{CompanyInitial}{Verb}{TargetResourceType}

CICreateMailbox, CIEditMailbox, CIDeletePerson, CIUpdatePerson

To name a workflow, start with the company initials and be preceded by the verb and target resource type. For the workflow called CICreateMailbox, CI is the company initial, Create is the Action, and Mailbox is the resource type.

{CompanyInitial}{Verb}{TargetResourceType}

CIUpdatePerson

Some workflows execute multiple actions against the resource type, e.g., add and remove. To name such workflows with multiple actions start with the company initials and preceded by the Verb like update and target resource type. For the workflow CIUpdatePerson, CI is the company initial, update indicates the Action, and Mailbox is the resource type. Always choose a verb that makes sense of both actions.

{CompanyInitial}{Verb}{TargetResourceTypeAbbrevation}

CIDeleteMRMembership

Microsoft Windows allows only 255-260 characters for a file path. Shortening the name using abbreviations will overcome the limitation and increase the code readability. Some examples of abbreviations are MR for Management Roles, BRL for Business Roles, and Locations. To name such workflows with multiple actions, start with the company initials and preceded by the Verb and abbreviation of the target resource type. For CIUpdateMRMembership, CI is the company initial, and Delete is the Action Done against MR Membership.

{CompanyInitial}{Verb}{TargetResourceType1}{TargetResourceType2}

CIAddAccountToGroup, CIRemoveAccountFromGroup

To name a workflow executing Action against multiple objects, start with the company initials, preceded by the Verb and the name of both target resource types. For CIAddAccountToGroup, CI is the company initial, and Add is the Action Done against Management Role Membership.

Workflow > Workflow Activity

{CompanyInitial}{Verb}{TargetResourceType}Activity

{CompanyInitial}{Verb}{TargetResourceTypeAbbrevation}

CIResetPasswordActivity

CIUpdateMRActivity

To name an activity, start with company initials and be preceded by the Verb, target resource type, and the word Activity. At last, to denote it as a workflow activity. For CIResetPasswordActivity, CI is the company initial, and Reset is the Action Done against Password.

You can also use a Verb-like update when the activity is performing multiple actions.

Form & Controls

This section will discuss the patterns to name the Form and its controls like data source and Lookup.

Component

Pattern

Example

Description

Form

{CompanyInitial}{Verb}{TargetResourceType}Form

CIEditPersonAddressform

To name a Form, start with the company initials and preceded by the verb and target resource type ending with the word Form. For the Form CIEditPersonAddressform, CI is the company initial, Edit is the Verb, and PersonAddress is the target resource type.

Form > Data Source

{ObjectName}Datasource

CountryDatasource

To name a Data Source, start with the name that best describes the data source and precedes the word DataSource. A Datasource named CountryDatasource is self-explanatory, explaining that the data source can get you a list of countries.

Form > Lookup

{ObjectName}Lookup

{ObjectName}SingleLookup

{TargetResourceAbbrevation}SingleLookup

{TargetResourceAbbrevation}MultiLookup

DisabledPersonsLookup

MRSingleLookup

BRLMultiLookup

To name a lookup, start with a meaningful object name and end with the word lookup at the end. For a lookup DisabledPersonLookup, the word Lookup indicates the control and is binding the persons who are disabled to login.

You can use single/multiple words to indicate if it is a single or multiple dropdown. You can also use abbreviations like MR and BRL to keep the name short and workaround the ms-windows file path character limitation for a file path. Microsoft Windows allows only 255-260 characters for a file path. Shortening the name using abbreviations will overcome the limitation and increase the code readability.

Form > Form Data

Target{ResourceType}

TargetPerson

TargetAccount

TargetExchangeMailbox

To name a Form Data, always start with the word Target followed by the resource type. For a Form Data named Target Person, the word Target is preceded by the resource type Person.

Class Libraries & Connectors

This section will discuss the patterns to name the connector and the class libraries.

Component

Pattern

Example

Description

Class Library Project

{CompanyInitial}Connector

CIHRConnector

To name a class library, use a friendly name to describe the class library, preceded by the word connector at last. For CIHRConnector, CI stands for company initials, and HR connector indicates the connector to connect an HR system.

A custom connector would also be developed inside a class.

CustomConnector

{ObjectName}Connector

CustomConnector

To name a Custom Connector, use a friendly name to describe the connector and add the word connector at last. A connector would be a class inside the class library. For CustomConnector, Custom would describe the type of connector with a word connector at last.

You can create a custom connector by adding a new implementation of the connector in Workflow Studio.

Image Added


Image Added

Class Name

Follow any accepted naming convention consistently.

Folder Structure

Insert excerpt
IL:WFS Folder Structure
IL:WFS Folder Structure
nameWFSFolderStructure
nopaneltrue

Tracing

Developers can build a tracing system using the class provided by EmpowerID. The implementation of TdnfTrace class will log the information into the Windows event log. The TdnfTrace logger logs the information inside EventViewer → Application and Services Logs → EmpowerID.

Developers can creatively formulate the logging information as per requirement and better understand the errors. A sample code snippet of using the TdnfTrace class is provided below.

Code Block
if (ex.Message.Contains("Timeout"))
TdnfTrace.Current.TraceData(TraceEventType.Warning, 9900, "Rbac refreshing resource role review compiled operation took too long refreshing but will resume: " + Environment.NewLine + ex.ToString());
else
TdnfTrace.Current.TraceData(TraceEventType.Error, 10000, "Rbac refreshing resource role review compiled operation: " + Environment.NewLine + ex.ToString());
Warning

Only use EventID greater than 9500 and lesser than 15000. The EID product uses numbers below 9500.

Div
stylefloat:left; position:fixed;
idarticleNav

IN THIS ARTICLE

Table of Contents
maxLevel4
minLevel2
stylenone
printablefalse

Insert excerpt
IL:External Stylesheet
IL:External Stylesheet
nopaneltrue