53
WorkflowGen 6.1 Technical Reference Guide Updated May 24, 2016 Copyright © Advantys 2016 www.workflowgen.com

WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

  • Upload
    others

  • View
    16

  • Download
    0

Embed Size (px)

Citation preview

Page 1: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1Technical Reference Guide

Updated May 24, 2016

Copyright © Advantys 2016www.workflowgen.com

Page 2: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

Table of ContentsOverview 5

System requirements 6

End-users 6Web server 7Database server 7Authenticationmethods and directory synchronization 8Notifications and XML syndication 8

Product technical components 10

Overview 10Web applications 10

WorkflowGenmain ASP.NET 4 application 10ASP.NET workflow applications (\wfgen\wfapps) 11

WorkflowGenWindows services 11WorkflowGen engine service 11WorkflowGen directory synchronization service 11

WorkflowGen data 12File data 12Log files 12Templates 12Database 12

Setup 13

Preparation 13General 13Requirements for installation onOracle 9i / 10g / 11g databases 13RecommendedOracle performance configurations 14

WorkflowGen setup (InstallShieldWizard installation) 15Welcome screen 16WorkflowGen files and folders architecture 16Disk space requirements 16Web application folder specification 16WorkflowGen services folder specification 17Database type selection 17MS SQLServer configuration 17Oracle database configuration 18WorkflowGen administrator account setup 19WorkflowGen general configuration 19Ready to install 19Setup completed 20

WorkflowGen setup (manual installation) 20Installation pack 20WorkflowGen files and folders architecture 20MS SQLServer database creation 20Oracle database creation 22WorkflowGen administrator account setup 22WorkflowGenweb configuration 23

Page 3: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGenWindows Services installation 23Application files access configuration 24

File permissions 24Configuring IIS 24

Creating the application pool 24Creating the website (if WorkflowGen is set up on a new website) 25Configuring the website 25Creating theWorkflowGen application 26Creating workflow applications and services 26ISAPI and CGI restrictions 26

WorkflowGenWindows services 26WorkflowGen Engine service 26WorkflowGen directory synchronization service 26

License activation 27Overview 27How to activateWorkflowGen 27License per user 27

Tests 28Web app addresses 28Test sample processes 28

Additional configurations 28

Security 29

Overview 29Which authenticationmode to choose? 29Authenticationmethods 30

IntegratedWindows authentication 30IIS HTTP basic authentication 30WorkflowGenHTTP basic authentication 30Custom HTTP basic authentication 31Form authentication 32

HTTPS: Using SSLwithWorkflowGen 33Overview 33IIS configuration 33Application parameters to update 33Links toWorkflowGen 33

Advanced configuration 34

File storage 34Overview 34Basic configuration 34

Web Farm architecture 35Overview 35Configuration 35

Database file storagemode 36Overview 36Setup and configuration 36Usage 36Additional information 37

Configuringmultiple instances of WorkflowGen 37Overview 37

Page 4: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

Setup and configuration 38Database scaling 40

Overview 40Requirements 40Setup and configuration 41Database scaling inWorkflowGen 43References 43

Operations 44

Backup 44Overview 44Full (applications and data) 44Data only 44

Moving theWorkflowGen database 44SQL Server database 44Oracle database 45

Moving theWorkflowGen application 45Monitoring 46

Storage space 46Directory synchronization 46Windows Services 46Usage 46

Using IIS SMTP gateway 48

Synchronizing a directory in command line 49

Sample code for an HTTP module 50

Overview 50Source code 50

Page 5: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 5

OverviewThis guide covers all of the procedures involved in the installation andmaintenance of WorkflowGen. It isaimed at system administrators who will be required to install or carry out maintenance of the application.

Page 6: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 6

System requirements

End-usersTheWorkflowGen Portal is a fully web-based application. No ActiveX components are required.

Operating systems

l Windows Vista

l Windows 7

l Windows 8 / 8.1

l Windows 10

l Mac OS X

Web browsers

l Internet Explorer 9 or higher

Note: TheWorkflowGenwebsite must have the following configuration to display in Internet Explorer 9 orhigher: Security zone set to Local intranet or Trusted zone, and either excluded or removed from theCompatibility View Setting list, becauseWorkflowGenmust run in Internet ExplorerEdgemode. Seehttp://support.microsoft.com/kb/174360 and http://support.microsoft.com/kb/2536204 for moreinformation.

l Edge

l Firefox

l Safari

l Chrome

Display

l 1280 × 800 or higher resolution

l For form designers, the suggestedminimum resolution is 1366 × 768

Page 7: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 7

Web serverThe system requirements for the web server hostingWorkflowGen are as follows:

Operating systems

l Windows Server 2008 or 2012 (all releases)

l Windows 7 / 8 / 8.1 / 10 (recommended for development environments only)

Note: If you are installingWorkflowGen on a 64-bit operating system, make sureWOW64 is installed on theWindows machine.

Web server

l Microsoft IIS 7 or higher

l .NET Framework 4 or higher

l Oracle Data Access Components (required whenOracle Data Provider for .NET is used as thedatabase connection provider)

Minimum hardware configuration for test systems

l Dual-core processor

l 4GB RAM

l SATA hard disk with 40GB free

See theWorkflowGen Features and Technical Requirements guide for up-to-date server specifications basedon your planned usage of the system.

Database serverThe system requirements for the database server hosting theWorkflowGen database are as follows:

Hardware specifications

l Dual-core processor

l 4GB RAM

l SATA hard disk with 40GB free

Database servers supported

l Microsoft SQL Server 2005 and Express Edition

l Microsoft SQL Server 2008, R2 and Express Edition

Page 8: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 8

l Microsoft SQL Server 2012, R2 and Express Edition

l Microsoft SQL Server 2014 and Express Edition

l Oracle 9i

l Oracle 10g

l Oracle 11g and R2

l Oracle 12c

See theWorkflowGen Features and Technical Requirements guide for up-to-date server specifications basedon your planned usage of the system.

Authentication methods and directorysynchronizationAuthentication methods

l IntegratedWindows or IIS Basic (Active Directory)

l Applicative (WorkflowGen)

l Forms

l Custom (SSO: single sign-on)

Directory synchronization

l Active Directory (supports all releases of Windows Server 2008 and 2012)

l LDAP-compatible directory

l Text files

Notifications and XML syndicationEmail notifications

l Email notifications are sent via SMTP protocols (Exchange and Lotus Notes are compatible).

l Any email client can receiveWorkflowGen notifications.

l Email layout and content can be customized in HTML or plain text.

For best performance, the IIS SMTP gateway should be used (seeUsing IIS SMTP gateway on page 48).

Page 9: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 9

XML syndication

WorkflowGen provides an XMLRSS feed (called the "Portlet") to embed existingWeb Portal withWorkflowGen data.

Page 10: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 10

Product technical components

OverviewWorkflowGen is aMicrosoft Active Server Pages .NET (ASP.NET 4) application. It includes:

l .aspx files

l .css, .js, .gif and .jpg files

l .NET assemblies (.dll files)

l A relational database (MS SQLServer or Oracle)

l AWindows service used for directory synchronization, overdue actions management, etc.

TheWorkflowGen application is hosted on a new or an existing IIS website and is separated into two distinctmodules:

l A module for end-users

l A module for administrators and process managers

Process actions can be handled by WorkflowGen applications such as EFormASPX, which displays .NETweb forms and stores the filled-out data once the forms are submitted. These applications are built-in, but youcan develop custom applications using the SDK requirements and specifications.

Web applicationsWorkflowGenmain ASP.NET 4 applicationThis application contains the core application. TheUser Portal andAdministration Module are both in thatmain application:

l \wfgen:Usermodule.

l \wfgen\admin:AdministrationModule.

l \wfgen\bin:Contains all the core assembly files that are needed to runWorkflowGen.

l \wfgen\App_Data:Contains design, runtime, log, and temporary files, and template files for processes,notifications, and forms.

l \wfgen\App_GlobalResources:Contains the .resx files that are needed for globalization. If you want toadd a new language support toWorkflowGen, you have to create the new .resx files in this folder.

l \wfgen\js:Used to store the different JavaScript files that are needed to runWorkflowGen.

l \wfgen\wfapps:Contains all the SDKs, web forms, and web services used by yourWorkflowGenprocesses.

Page 11: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 11

l \wfgen\swf:Contains the Flash files that are used for the graphical follow-up and for process design intheAdministration Module.

l \wfgen\ws:Contains theWorkflowGenweb service API.

l \wfgen\App_Themes:Contains the styles of theUser Portal and theAdministration Module. Thestyles are completely customizable for bothmodules. Eachmodule has a corresponding CSS file. Tocreate your own skins, see to theWorkflowGenDeveloper documentation. To change the currentlyselected skin, see theWorkflowGen AdministrationModule ReferenceGuide.

ASP.NETworkflow applications (\wfgen\wfapps)Use the \wfgen\wfapps\webservices folder to store your own SDK web applications. Refer to the Developerdocumentation for more information about SDK.

Workflow web forms

The \wfgen\wfapps\webforms folder is used to store the web forms used in the process workflows.

WorkflowGen Windows servicesWorkflowGen engine serviceThe following automatic task executions are provided by this Windows service:

l Action overdue exceptions

l Notificationmanagement

l Deletion of inactive delegations

l Deletion of ghost activities (a list of activities initialized but never started)

This service is installed by the setup pack and is started automatically after installation.

The default suggested installation path is DRIVE:\Program Files\Advantys\WorkflowGen\Services\bin\WfgWorkflowEngineService.exe.

WorkflowGen directory synchronization serviceThe automatic users and groups synchronization is provided by this Windows service. This service isinstalled by the setup pack and started automatically after installation.

The default suggested installation path is DRIVE:\Program Files\Advantys\WorkflowGen\Services\bin\WfgDirectoriesSyncService.exe.

The synchronization service can also be executed from a command line (seeSynchronizing a directory incommand line on page 49 for more information).

Page 12: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 12

WorkflowGen dataFile dataThe \wfgen\App_Data\files\runtime folder contains the data that are related to each process instance. Thedata that are generated by the workflows are stored in this folder. If theProcess data storage option isselected to store file content in the database, then "file" type data are stored directly in the database and not inthe directory structure.

The \wfgen\App_Data\files\design folder contains the data that are uploaded directly in the processdefinition, and when the processes are instantiated, those data are copied to the runtime folder. If theProcessdata storage option is selected to store file content in the database then "file" type data are stored directly inthe database and not in the directory structure.

The \wfgen\App_Data\files\charts\images folder contains the temporary files of the graphical charts.

Log filesThe \wfgen\App_Data\LogFiles folder contains the logs created by WorkflowGen (directory synchronization,WorkflowGen authenticationmodule).

TemplatesThe \wfgen\App_Data\Templates folder contains the templates used by WorkflowGen (notifications, charts,portlet, form designer styles and tools, processes).

DatabaseTheWorkflowGen database contains:

l Users and groups that can be synchronized with an existing directory

l Process definitions and runtime data

l Information on the follow-up of ongoing and completed requests, as well as associated data (approvals,amounts, documents, etc.)

l Statistics on ongoing and completed requests

The processes can be imported from or exported to an XML file that contains the process definition basedupon the XPDL 1.0 standard format of theWfMC (Workflow Management Coalition).

All data files, including the web form projects with their XML data and other attachments are stored on theserver disk and auto-archived chronologically.

Page 13: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 13

Setup

PreparationGeneralYoumust be administrator of the web server. Using a local administrator account is recommended. Youmustknow:

l The physical path on the web server whereWorkflowGenweb application will be installed

l The physical path on the web server whereWorkflowGenWindows services will be installed

l The URL of the web server whereWorkflowGenwill be installed

l MS SQL server database:

l the name of theMS SQL server

l the credentials of the SA account

l the file path of the SQL server database files on the SQL server machine

l Oracle database:

l an existing Oracle data source name

l the credentials of the database user account that has creation permission on the specified Oracleinstance (see the next section for Oracle database installation parameters)

l The name or IP address of the SMTP gateway (we recommend using the IIS SMTP gateway; seeUsingIIS SMTP gateway on page 48)

l The default sender email address for notifications

l The authenticationmethod you want to use forWorkflowGenweb applications

Requirements for installation onOracle 9i / 10g / 11g databasesWorkflowGen and Oracle 9i on the same server

l National and Database character sets are both UTF-8

l Oracle Database 9i Release 2 (9.2.0.3) Standard with Client software installed

WorkflowGen and Oracle 9i on separate servers

l National and Database character sets are both UTF-8

l Oracle Server: Oracle Database 9i Release 2 (9.2.0.3) Standard

l WorkflowGen Server: Oracle Database 9i Release 2 Client for Microsoft Windows

Page 14: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 14

WorkflowGen and Oracle 10g on the same server

l National and Database character sets are both UTF-8

l Oracle Database 10g Release 2 (10.2.0.3/10.2.0.4) Standard

WorkflowGen and Oracle 10g on separate servers

l National and Database character sets are both UTF-8

l Oracle Server: Oracle Database 10g Release 2 (10.2.0.3/10.2.0.4) Standard

l WorkflowGen Server: Oracle Database 10g Client Release 2 (10.2.0.3)

WorkflowGen and Oracle 11g on the same server

l National and Database character sets are both UTF-8

l Oracle Database 11g Release 1 (11.1.0.6.0) Enterprise with Client software installed

WorkflowGen and Oracle 11g on separate servers

l National and Database Character Set are both UTF-8

l Oracle Server: Oracle Database 11g Release 1 (11.1.0.6.0) Enterprise

l WorkflowGen Server: Oracle Database 11g Release 1 Client (11.1.0.6.0)

Authentication method

Check that the SQLNET.AUTHENTICATION_SERVICES parameter of "DRIVE:\OraHome\network\ADMIN\SQLNET.ORA" is set to NONE. This file is located on your web server.

Create a new tablespace (if WorkflowGen is set up on a blank tablespace)

1. In DBA studio or from SQLPlus, create a new tablespace calledWFGEN with aminimum file size of100 MB.

2. Once the tablespace is created, you should specify the Database and National character sets to UTF-8.

3. Create a user account with the following settings:

l Temporary and default tablespace: WFGEN

l Role: DBA or amore restrictive access. Initially, the user must have creation rights on the structureschema (tables, index, constraints, etc.). However, once the structure is created, only read/writerights are necessary.

RecommendedOracle performance configurationsOptimizer mode

To improveWorkflowGen database performance, check your database optimizer mode. If "optimizer_mode"is set to "choose" (the default in Oracle 9i and 10g), you have to frequently (weekly, for example) "ANALYZE"all the tables of your databases. This operation will generate statistics used by the optimizer to select the best

Page 15: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 15

mode ("RULE" instead of "all_rows") to run an SQL query. Another solution is to set the optimizer mode to"RULE".

System tables optimization

The System.Data.OracleClient provider used by WorkflowGen generates SQL instructions against somesystem tables ("all_synonyms", "all_cons_columns", and "all_constraints"). When those tables contain a lotof records (such as whenWorkflowGen database shares the sameOracle instance with other databases),performance can be affected when launching or completing a request or action.

One way tominimize issues with response times when launching new requests or actions is to redirect theseSQL instructions to local scope views/tables, which are filtered copies of these system tables. Thesechanges are transparent toWorkflowGen.

To do this, run the SQL instructions below (replacing "WFGEN_USER" with your owner name) against yourWorkflowGen database. (If the database owner has other tables used by other applications, you can still applythis procedure if those tables don’t use synonyms.)

Note: We suggest dropping these existing views and tables ("all_synonyms", "all_cons_columns", and "all_constraints") from your database before eachWorkflowGen version upgrade, then recreating them aftercompleting the upgrade procedure.

create or replace force view WFGEN_USER.all_synonyms (owner, synonym_name, table_owner, table_name, db_link) as select null, null, null, null,null from dual;

create table WFGEN_USER.all_cons_columns as select * from sys.all_cons_columns where owner = 'WFGEN_USER';

create table WFGEN_USER.all_constraints as select owner, constraint_name,constraint_type, table_name, r_owner, r_constraint_name, delete_rule,status, deferrable, deferred, validated, generated, bad, rely, last_change, index_owner, index_name, invalid, view_related from sys.all_constraints where owner = 'WFGEN_USER'

WorkflowGen setup (InstallShield Wizard installation)The following procedure applies to the setup using theWorkflowGen 6.1 InstallShieldWizard installationpack. To start the installation wizard, double-click on the setup execution file and follow the instructions on thescreen. The installation can be cancelled at any time by clickingCancel.

The InstallShield Wizard will perform the following actions:

l Install the web application.

l Install theWindows Services.

Note: The user or identity used to runWorkflowGenWindows Services must be an administrator, be partof theAdministrators group, or be aWindows system account (such as "Local System"). You cancheck this by running "services.msc".

Page 16: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 16

l Create the SQL Server database structure and contents and associated database user account if MSSQLServer is chosen.

l Create the Oracle database structure and contents if Oracle is chosen.

l Create theWindows NT or Domain user account (default WorkflowGen administrator).

l Create a log file in the directory where theWorkflowGen setup execution file is located. In case of anyproblems, the error will be detailed in it. We recommend launching the setup program from your webserver.

For themanual installation procedure, skip toWorkflowGen setup (manual installation) on page 20.

Welcome screenClick Next to continue. The setup program will suggest that you stop IIS services as well as any anti-virussoftware during the installation.

WorkflowGen files and folders architectureThe recommended physical directory structure forWorkflowGenweb application files and folders should beunderDRIVE:\Inetpub\wwwroot\wfgen. This folder contains static resources such as images, HTML filesand process data, and the applications used by WorkflowGen.

Click Next to continue.

Disk space requirementsThe application will ask you to define the local disk for the installation of WorkflowGen. A minimum of 71 MBof disk space is required.

Verify the available disk space for the destination drive, then click Next to continue.

Web application folder specificationDefine the physical path for the web application root folder. By default, the suggested physical path isDRIVE:\Inetpub\wwwroot\wfgen.

1. Specify the web application root files and folder path. Make sure to include the \wfgen sub-folder.

2. Click Change to choose another destination folder. A dialog box will open to let you choose anotherdestination folder.

3. Click Next to continue.

4. Specify the new destination folder path. Make sure to include the \wfgen sub-folder.

5. Click OK to confirm.

Page 17: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 17

WorkflowGen services folder specificationDefine the physical path for theWorkflowGen services folder. By default, the suggested physical path isDRIVE:\Program Files\Advantys\WorkflowGen.

Note: This installation will overwrite your existingWorkflowGen services if you already have another versionof WorkflowGen installed on the same server. If you want to keep your previous WorkflowGen services, wesuggest you choose another installation folder for version 6 (e.g. DRIVE:\Program Files\Advantys\WorkflowGen v6). When this setup is completed, see theConfiguring multiple instances ofWorkflowGen section for instructions on how to re-install the previous services on the same server.

1. Specify theWindows services files and folder path. Make sure to include the \Advantys\WorkflowGensub-folders.

2. Click Change to choose another destination folder. A dialog box will open to let you choose anotherdestination folder.

3. Click Next to continue.

Database type selectionSelect eitherMS SQL Server orOracle, then click Next.

MSSQLServer configurationImportant: If you choose to create a new database using an existing database name all data will be erasedand overwritten with an empty database. To prevent unintentional data loss, make sure to choose a uniquename for the database. As well, you should back up your existing database before proceeding with theinstallation.

MS SQL Server requirements

l You cannot use the InstallShieldWizard with SQL Server inWindows authenticationmode only.

l The SQL Server must support SQL authentication. Enable this security setting in your SQL Serverconfiguration if it isn’t already enabled.

MS SQL Server authentication

The application will ask for information about the parameters of the connection to theMS SQLServerdatabase.

Parameter DefinitionCreate a new database instance This option will create a new database structure and contentInstall on a previously createddatabase instance

This option will only create the database content to an existingempty database structure

SQL Server Name of theMS SQL serverLogin ID DBMS administrator login namePassword DBMS administrator password

Page 18: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 18

Database name Name of the database to be used or created

1. Choose to create a new database or install on a previously created database instance.

Important: If you use the same database name as an existing database, the installation will erase allexisting data.

2. Specify theMS SQLServer name or click Browse to choose from a list of MS SQL servers.

3. The default name of the server is "machine name\instance name". Specify the SA login ID andpassword, and the database instance name.

Important: In SQL Server, it is important that passwords for database users match the server’spassword strategy, otherwise a 5110 error will occur.

4. Click Next to continue.

Note: The loginWFGEN_USER (password: "Admin123!") will be automatically created with the rolesdatareader and datawriter to theWorkflowGen database. This login will be used in the connection string toaccess to theWorkflowGen database.

WorkflowGen database data and log files configuration

Enter theData File and Log File parameters.

Important:

l The path you enter for the data file and the log file must be the local path to the SQL Server, even if theSQL Server is distant from the web server on which the installation is executed.

l The specified pathmust already exist, otherwise you will receive the error message "Error 5110: An erroroccurred while connecting to database ‘WFGEN’ …"

Parameter DefinitionFile name Data and log file namePath Physical file path that the files are storedSize Initial file size (MB)Max Size Maximum file size (MB)File Growth File growth size (MB)

Important: The default physical path of SQL Server is DRIVE:\Program Files\Microsoft SQL Server\MSSQL[X]\MSSQL\Data.

Specify the data and log file parameters (filename, path, size, maximum size, and file growth), then click Nextto continue.

Oracle database configurationNote: AnOracle database instance will NOT be created during the installation. An existing empty Oracledatabase instance is required prior to the installation of WorkflowGen. SeeRequirements for installation

Page 19: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 19

on Oracle 9i / 10g / 11g databases on page 13 for Oracle database installation parameters.

Parameter DefinitionData source Name of the Oracle instanceUser ID Login of a user account that has creation permission on the specified

Oracle instancePassword Password of the user account that has creation permission on the

specified Oracle instance

1. Specify the Oracle data source name.

2. Specify the administrator user ID and password.

3. Click Next to continue.

WorkflowGen administrator account setupWorkflowGen requires a validWindows NT or Active Directory account. This account will be used by theWorkflowGen administrator, but it is not necessary to define it as an NT or Active Directory administrator.

1. Specify a domain name if theWorkflowGen administrator user will be created as part of a domain;otherwise, this user will be created on the local machine.

2. Specify theWorkflowGen administrator username and password.

3. Either chooseCreate the NT account for this user or skip this by using an existing account (ausername and password are required).

4. Click Next to continue.

WorkflowGen general configuration

Parameter DefinitionWebsite URL The basic website URLwill be used to generate the full web site URL

forWorkflowGenSMTP Server The default SMTP server will be used to send email notificationsDefault Email Sender The default email sender will be used to send automatic email

notifications

1. Specify theWorkflowGenwebsite URL, the SMTP server, and the default email sender.

2. Click Next to continue.

Ready to installYou are now ready to begin the installation of WorkflowGen. If there are any changes tomake before theinstallation, you can always go back to previous screens.

Click Install to begin the installation.

Page 20: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 20

Setup completedClick Finish to exit the InstallShieldWizard.

The installation is now complete. A log file namedWorkflowGen-6-1-setup.txt containing all of theinstallation steps has been generated in the folder where the installation pack is located.

WorkflowGen setup (manual installation)The following procedure applies to the setup using theWorkflowGen 6.1manual installation pack. You canobtain themanual installation pack by requesting it over yourWorkflowGen software provider.

Note: For the InstallShieldWizard installation procedure, see the previous section,WorkflowGen setup(InstallShield Wizard installation).

Installation packStart by extracting themanual installation pack (.zip) to a temporary folder on theWorkflowGenweb server(e.g. DRIVE:\temp).

The installation pack contains:

l ManualInstall-6-1\Databases: the database creation scripts for both SQL Server andOracle

l ManualInstall-6-1\Inetpub: theWorkflowGen application files

l ManualInstall-6-1\Program Files: theWorkflowGenWindows services application file

WorkflowGen files and folders architectureThe recommended physical directory structure forWorkflowGenweb application files and folders should beunderDRIVE:\Inetpub\wwwroot\wfgen. This folder contains static resources such as images, HTML filesand process data, and the applications used by WorkflowGen.

1. Copy the source \Inetpub folder (Update-6-1\Inetpub) to your destinationDRIVE:\ (e.g.DRIVE:\Inetpub\wwwroot\wfgen).

2. Copy the source Advantys folder (Update-6-1\Program Files\Advantys) to your destinationDRIVE:\Program Files (e.g. DRIVE:\Program Files\Advantys\WorkflowGen\Services\bin).

Note: If you already have another verison of WorkflowGen installed on the same server and you want tokeep your previous WorkflowGen services, we suggest you choose another installation folder forversion 6 (e.g. DRIVE:\Program Files\Advantys\WorkflowGen v6\Services\bin).

MSSQLServer database creationCreateWFGSQLDatabase.vbs

1. Run the "DRIVE:\temp\pack\Databases\MsSQLServer\CreateWFGSQLDatabase.vbs" databasecreation script.

Page 21: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 21

2. ChooseYes to confirm the database creation.

3. ChooseNo for SQL Server 2005/2008/2008 R2/2012.

4. ChooseYes for SQL Server 2005 orNo for SQL Server 2008/2008 R2/2012.

5. ChooseYes for SQL Server 2008 orNo for SQL Server 2008 R2/2012.

6. ChooseYes for SQL Server 2008 R2 orNo for SQL Server 2012.

7. Enter theMS SQLServer instance name.

8. Enter a Catalog name (e.g. "WFGEN").

9. Enter anMS SQLServer administrator account name (e.g. "sa").

10. Enter the administrator password.

11. Enter a database data (mdf) and logging (ldf) destination folder (e.g. DRIVE:\Program Files\MicrosoftSQL Server\MSSQL[X]\MSSQL\DATA).

12. Enter amaximum size for the data and log files (e.g. 1000). We suggest changing this later tounrestricted growth for both data and logging files in theMS SQLServer Management Studio tool.

13. Click OK to create the database.

Note:An SQL server user account "WFGEN_USER" with the password "Admin123!" will be created as partof this script. This account will only have the "db_datareader" and "db_datawriter" permissions on theWorkflowGen database, and can be used in theWorkflowGenweb application database connection.

Manual

1. Open theMS SQL Server Management Studio tool.

2. Connect to your MS SQLServer instance with an administrator account.

3. UnderDatabases, chooseNew Database.

4. Enter a database name (e.g. "WFGEN").

5. Specify unrestricted growth for both data and logging files.

6. Click OK to create the database.

7. UnderSecurity / Logins / New Login enter a login name (e.g. "WFGEN_USER").

8. ChooseWindows Authentication orSQL Server Authentication.

9. If you chooseSQL Server Authentication, enter a password for this account (e.g. "Admin123!").

10. InUser mapping, select the new database "WFGEN".

11. Assign the permissions "db_datareader" and "db_datawriter" to this account.

12. Click OK to create the user.

Page 22: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 22

13. Open the source folderDRIVE:\temp\pack\Databases\MsSQLServer and run the following databasecreation SQL scripts on the new database instance in the following order:

i. Create_WFG-V6-0_SQL_Tables.sql

ii. Create_WFG-V6-0_SQL_PKeys.sql

iii. Create_WFG-V6-0_SQL_FKeys.sql

iv. Create_WFG-V6-0_SQL_Indexes.sql

v. Create_WFG-V6-0_SQL_Triggers.sql

vi. Create_WFG-V6-0_SQL_Const.sql

Oracle database creationNote:AnOracle database instance will NOT be created with this script. It is necessary to provide an existingempty Oracle database instance prior to the installation of WorkflowGen. SeeRequirements for installationon Oracle 9i / 10g / 11g databases on page 13 for Oracle database installation parameters.

Oracle (CreateWFGOracleDatabase.vbs)

1. Run the "DRIVE:\temp\pack\Databases\Oracle\CreateWFGOracleDatabase.vbs" database creationscript .

2. Click Yes to confirm the database creation.

3. Enter the Oracle database instance name you created (e.g. "WFGEN").

4. Enter the administrator account name you created (e.g. "WFGEN_USER").

5. Enter the administrator password.

6. Click OK to create the database.

Oracle (manual)

1. Open DBA studio, SQL Plus, or SQLDeveloper.

2. Connect to your Oracle database instance with the administrator account you created.

3. Open theDRIVE:\temp\pack\Databases\Oracle source folder and run the following database creationSQL scripts on the new database instance in the following order:

i. Create_WFG-V6-0_Oracle_Crebas.sql

ii. Create_WFG-V6-0_Oracle_Const.sql

WorkflowGen administrator account setupWorkflowGen requires a validWindows NT or Active Directory account. This account will be used by theWorkflowGen administrator, but it is not necessary to define it as a NT or Active Directory administrator.

Page 23: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 23

l You can use an existing user account or create a new user account with the name "Domain\wfgen_admin".

l If you use a different account name other than "wfgen_admin", then youMUST change the"WorkflowGen Administrator" username in theWorkflowGen database. To do this, in theUsers table,find the record with the column "USERNAME" value "wfgen_admin", then change it to your custom useraccount name.

WorkflowGenweb configuration1. Open and edit the "DRIVE:\Inetpub\wwwroot\wfgen\web.config" WorkflowGenweb configuration file .

2. Update the database connection string:

l MS SQL Server: <add name="MainDbSource" connectionString="DataSource=localhost;Initial Catalog=WFGEN;User ID=WFGEN_USER;Password=Admin123!;" providerName="System.Data.SqlClient" />

l Oracle: <add name="MainDbSource" connectionString="Data Source=WFGEN;UserID=WFGEN_USER;Password=Admin123!;" providerName="System.Data.OracleClient" />

3. Update the "WorkflowGen Administrator" username to allow access to the configuration panel (e.g.<add key="ApplicationConfigAllowedUsersLogin" value="wfgen_admin" />).

4. Set an SMTP server or SMTP gateway name (e.g. <add key="ApplicationSmtpServer"value="smtpservername" />).

5. Update the application URL (e.g. <add key="ApplicationUrl" value="http://yoursite/wfgen" />).

6. Set a default email sender for the notification (e.g. <add key="EngineNotificationDefaultSender" value="[email protected]" />).

WorkflowGenWindows Services installationNotes

l The user or identity used to runWorkflowGenWindows Services must be an administrator, be part of theAdministrators group, or be aWindows system account (such as "Local System"). You can check thisby running "services.msc".

l If you have specified a custom installation path for the services, you will need to update the path insidethe "DRIVE:\Program Files\Advantys\[CustomWorkflowGen]\Services\bin\winsvc-install.cmd" script(e.g. %windir%\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe /i"C:\Program Files\Advantys\[Custom WorkflowGen]\Services\bin\WfgDirectoriesSyncService.exe").

l If you are installing these services along with previous WorkflowGen services on the same server, youwill need to provide a new service name (e.g. "WorkflowGenEngineServiceV6") for both the Engine andDirectory services in their configuration files ([WfgWorkflowEngineService.exe].config: <addkey="ServiceName" value="WorkflowGenEngineServiceV6"></add>) and script files

Page 24: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 24

(winsvc-install.cmd: Rename all [WorkflowGenEngineService] to [WorkflowGenEngineServiceV6]).(See theConfiguring multiple instances of WorkflowGen section for information and instructions onhow to configuremultipleWorkflowGen services on the same server.)

1. Open and edit the "DRIVE:\Program Files\Advantys\WorkflowGen\Services\bin\WfgWorkflowEngineService.exe.config" Engine service configuration file.

2. Update theWorkflowGenweb configuration path (e.g. <add key="WebConfigPath"value="DRIVE:\inetpub\wwwroot\wfgen\web.config" />).

3. Open and edit the "DRIVE:\Program Files\Advantys\WorkflowGen\Services\bin\WfgDirectoriesSyncService.exe.config" Directory Synchronization service configuration file.

4. Update theWorkflowGen’s web configuration path (e.g. <add key="WebConfigPath"value="DRIVE:\inetpub\wwwroot\wfgen\web.config" />).

Note: "WfgWorkflowEngineService.exe " and "WfgDirectoriesSyncService.exe" might be blocked. Tocheck this, right-click on them and chooseProperties. If theSecurity section is displayed at the bottomof theGeneral tab, these executables have been blocked; in this case, click Unblock.

5. Run "DRIVE:\Program Files\Advantys\WorkflowGen\Services\bin\winsvc-install.cmd" asadministrator.

Application files access configurationFile permissionsFile permission settings can be configured as follows for theWorkflowGen application identity:

l DRIVE:\Inetpub\wwwroot\wfgen:Modify all.

According to your authenticationmethod (seeSecurity on page 29), theWorkflowGen application identity canbe:

l The correspondingWindows users

l The ASP.NET or IIS application pool identity

Configuring IISCreating the application poolIt is recommended that WorkflowGen be isolated from other applications by creating its own application pooland associating all declared applications with the new application pool.

Note: Domain users and theWindows accounts used to run theWorkflowGen IIS application pool and Engineservicemust have read and write permissions for the \wfgen\app_data folder.

Page 25: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 25

IIS 7 / 7.5 / 8.0

1. Click Application pools. In the right-hand pane, right-click and select Add application pool, and giveit a name (e.g. "WorkflowGen").

2. Select the .NET Framework 4 version.

3. Select Integrated pipeline mode.

4. Click OK.

Creating the website (if WorkflowGen is set up on a newwebsite)IIS 7 / 7.5 / 8.0

1. Launch the IIS Manager and expand the tree structure under the IIS server namewhere you want tocreate the new site.

2. Right-click theSites icon and select Add Web Site. Enter the name of the site, select its applicationpool (if other than the default), and enter the physical path of the root yy (click Browse and select the\wwwroot folder, usually DRIVE:\inetpub\wwwroot\wfgen).

3. Select the binding as being http or https (note that https requires an SSL certificate). Select a port (thedefault is 80) and/or a host header. Please contact your IIS administrator to review your options regardingsetting up appropriate website settings.

Configuring the websiteIIS 7 / 7.5 / 8.0

Default document

The default document type "default.aspx" must be created if it does not exist. By default, this defaultdocument should exist on an IIS server running .NET.

To verify this, click the icon of the site, and ensure that the pane on the right-hand side shows the Featuresview (the tab at the bottom of the pane allows you to switch between Features andContent). Double-clicktheDefault document icon. If "default.aspx" is missing from the list, add it to the beginning of the comma-separated list displayed. To improve performance you canmove "default.aspx" to the beginning of the list if itis not already there.

Authentication

1. Click the icon of the site, and ensure that the pane on the right-hand side shows the Features view.

2. Double-click theAuthentication icon.

3. Right-click onAnonymous authentication and select Disable.

4. Right-click onBasic authentication and select Enable. You will be able to change the authenticationmethod by following the instructions inSecurity on page 29.

Page 26: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 26

Creating theWorkflowGen applicationIIS 7 / 7.5 / 8.0

1. Right-click onwfgen under the \wwwroot folder and select Convert to application.

2. Select theWorkflowGen application pool if it is not the default, then click OK.

Creating workflow applications and servicesThe \wfgen\ws and \wfgen\WfApps\WebForms applications withinWorkflowGenmust be created. To dothis, repeat the same steps you performed for \wfgen in the previous section.

ISAPI and CGI restrictionsIf you are using IIS 7 and above and your application pool is set to useClassic Managed Pipeline Mode,make sure ASP.NET v4.0.30319 is set to "Allowed" in the IIS manager ISAPI and CGI Restrictions list.

WorkflowGen Windows servicesWorkflowGen Engine serviceAutomatic task execution (e.g. overdue exceptions and notifications management) is provided by thisWindows service. This service is installed by the setup InstallShieldWizard and is started automatically afterinstallation. (Refer toWorkflowGen Windows Services installation on page 23 if themanual installationprocedure was used.)

If errors occurred while the service is running, those errors will appear in the Event Viewer(source: WorkflowGenEngineService) accessible in theWindows Administrative Tools. All themessagesrelated to this service will be displayed in theWindows Logs / Application section.

Tomanage this Windows service execution, openAdministrative Tools / Services, then select and openWorkflowGen Engine (WorkflowGenEngineService).

WorkflowGen directory synchronization serviceThe automatic users and groups synchronization is provided by this Windows service, which is installed bythe setup InstallShieldWizard and is started automatically after installation. (Refer toWorkflowGenWindows Services installation on page 23 if themanual installation procedure was used.)

If errors occurred while the service is running, those errors will appear in theEvent Viewer(source: WorkflowGenDirSyncService) accessible inWindows Administrative Tools. All messagesrelated to this service will be displayed in theWindows Logs / Application section.

Tomanage this Windows service execution, openAdministrative Tools / Services, then select and openWorkflowGen Directory Sync (WorkflowGenDirSyncService).

Page 27: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 27

License activationOverviewYoumust have a trial, Developer, or Enterprise license to activateWorkflowGen.

Youmust have a serial number to activate the Developer and Enterprise versions of WorkflowGen. If you donot have one, contact your vendor.

How to activateWorkflowGenInstall the license file

1. Remove all current .lic files from theDRIVE:\Inetpub\wwwroot\wfgen\bin folder.

2. Copy your .lic file to theDRIVE:\Inetpub\wwwroot\wfgen\bin folder.

3. Make sure the license file inherits the security settings.

Add the serial number to the web.config file

For the Developer and Enterprise editions of WorkflowGen, youmust edit the "web.config" file located in theDRIVE:\Inetpub\wwwroot\wfgen folder.

1. Edit the "\Inetpub\wwwroot\wfgen\web.config" file.

2. Set your serial number as the value of the "ApplicationSerialNumber" parameter.

License per userIf you have a license per user, you cannot exceed themaximum of users supported by your license, otherwiseyou will receive an error message when you try to launch a new request. However, user management will stillbe accessible.

If you want to import several users from your enterprise directory (Active Directory, LDAP, etc.), and sinceonly active users are considered, you can choose between the following cases:

l If your enterprise directory has fewer users than themaximum number of users supported by yourWorkflowGen license, then you can import all of your users with the optionNew user default status settoActive.

l If your enterprise directory has more users than themaximum of users supported by yourWorkflowGenlicense, then you should import all your users withNew user default status set to Inactive and set theSelf activation option as follows:

l If you want to manually activate users authorized to useWorkflowGen, uncheck theSelf activationoption. A user will be able to access WorkflowGen once you activate their account from theAdministration Module.

l If you don’t want to worry about account activation, keep theSelf activation option checked. Newusers connecting for the first time will be activated until themaximum of users supported by yourWorkflowGen license is reached.

Page 28: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 28

TestsWeb app addressesCheck the following URLs with "wfgen_admin" user account:

l User Portal: http://[yoursite]/wfgen

l Administration Module: http://[yoursite]/wfgen/admin

If you are unable to login, verify the web.config file in the root folder of theWorkflowGen application (usuallyDRIVE:\Inetpub\wwwroot\wfgen) and validate that the "MainDbSource" connection string contains thecorrect database connection information including server, database name, user, and password.

Test sample processesYou can create processes using the list of built-in process samples.

Additional configurationsYou can change the security configuration (such as the authenticationmethod) by following the instructions inSecurity on page 29.

Notes

l Not all of the required configuration parameters of WorkflowGen are defined in this setup. It isrecommended to update all other parameters in theConfiguration panel in theWorkflowGenAdministration Module after this setup.

l You can configure the time zone and language of new users through theConfiguration panel in theAdministration Module. You can also access theConfiguration panel directly through the URL"http://[yoursite]/wfgen/admin/Config.aspx" once the setup is complete and the website is running.

l TheNew User Time Zone settings can be changed in theGeneral tab in theConfiguration Panel.

l TheNew User Default Language can be changed in theAdministration tab in theConfigurationpanel.

Page 29: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 29

Security

OverviewThis section details the different methods to authenticateWorkflowGen users, which are:

l IntegratedWindows authentication (ensured by IIS)

l IIS HTTP Basic authentication (ensured by IIS)

l WorkflowGenHTTP Basic authentication (ensured by HttpModule)

l Custom HTTP Basic authentication (ensured by HttpModule)

l Form authentication (ensured by .NET)

Choose one of these according to your needs, and apply the required settings to implement it with yourWorkflowGen instance.

Which authentication mode to choose?If you don’t know which authenticationmode to choose, follow the procedures below based on your situation:

1. If all WorkflowGen users aremanaged in Active Directories, which is accessible from the web serverhostingWorkflowGen, then you can choose one of these authenticationmodes:

l IntegratedWindows authentication (ensured by IIS)

l IIS HTTP Basic authentication (ensured by IIS)

2. If item 1 above applies to your situation, and you want to provide transparent authentication by using thecurrent Windows session of the users, choose the following authenticationmode:

l IntegratedWindows authentication (ensured by IIS)

3. If item 1 above does not apply to your situation, and all WorkflowGen users aremanaged in an externalapplication such a database or authenticated by a SSO solution, choose one of these authenticationmodes:

l Custom HTTP Basic authentication (ensured by HttpModule)

l Form authentication (ensured by .NET)

4. If neither item 1 nor item 3 applies to your situation because you do not have any directory or otherauthentication solutions, you can choose only the following authenticationmode:

l WorkflowGenHTTP Basic authentication (ensured by HttpModule)

Note: For all HTTP basic and form authenticationmodes, it is strongly recommended to use SSL becausepasswords are not encrypted.

Page 30: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 30

Authentication methodsIntegratedWindows authenticationIIS and WorkflowGen settings

1. Open theWorkflowGenConfiguration panel. In theAuthentication section on theGeneral tab, selectIISmode.

2. Enable Integrated Windows authentication access on theWorkflowGenwebsite and disable all built-in access mechanisms. Apply this setting on all sub-applications.

IIS HTTP basic authenticationIIS and WorkflowGen settings

1. Open theWorkflowGenConfiguration panel. In theAuthentication section on theGeneral tab, selectIISmode.

2. EnableBasic authentication access on theWorkflowGenwebsite and disable all built-in accessmechanisms. Apply this setting to all sub-applications.

WorkflowGenHTTP basic authenticationIIS and WorkflowGen settings

1. Open theWorkflowGenConfiguration panel and change the settings in theAuthentication section ontheGeneral tab as follows:

i. SetMode toApplicative.

ii. SetMethod toWorkflowGen.

iii. Enter the system account username and password.

iv. Choose your passwordmanagement mode: Version 5 uses the same passwordmanagementmode as earlier versions of WorkflowGen, whileOne-way Hashing stores hashed accountpasswords in theWorkflowGen database, which provides enhanced security.

v. Set themaximum number of failed login attempts before a user’s account is locked.

vi. Set theminimum number of characters for a password.

2. Enable anonymous access on theWorkflowGenwebsite and disable all built-in access mechanisms.Apply this setting to all sub-applications.

3. The "Advantys.My.dll" and "Advantys.Security.dll" assemblies must be copied to the \bin folders of yourweb forms. Your web services must continue to use Basic or Integrated Authentication.

4. If you are using IIS 7 and above using an application pool inClassic Managed Pipeline Mode, thefollowing will be added to your "\wfgen\web.config":

Page 31: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 31

<configuration><system.web>

<httpModules><add name="ApplicationSecurityAuthenticationModule"type="Advantys.Security.Http.AuthenticationModule" />

</httpModules></configuration>

5. If you are using IIS 7 and above using an application pool in Integrated Managed Pipeline Mode, thefollowing will be added to your "\wfgen\web.config":

<configuration><system.webServer>

<modules><add name="ApplicationSecurityAuthenticationModule"type="Advantys.Security.Http.AuthenticationModule" />

</modules></system.webServer>

</configuration>

Custom HTTP basic authenticationIIS and WorkflowGen settings

1. Using the sample code inSample code for an HTTP module on page 50, create a new class for theHTTP module you are creating.

2. Modify the sample code to validate the credentials passed over HTTP Basic against the externalconfiguration repository.

3. Build your module and copy the assembly DLL into the \wfgen\bin and \wfgen\wfapps\webforms\binfolders.

4. Your assembly DLLmust be copied to all \bin folders of your web forms. Your web services can useBasic or Integrated authentication, or your custom HTTP Module.

5. Open theWorkflowGenConfiguration panel and change the settings in theAuthentication section asfollows:

i. SetMode toApplicative.

ii. SetMethod toCustom.

iii. Enter the name of the HTTP Module.

6. Enable anonymous access on theWorkflowGenwebsite and disable all built-in access mechanisms.Apply this setting on all sub-applications.

7. If you are using IIS 7 and above using an application pool inClassic Managed Pipeline Mode, thefollowing will be added to your "\wfgen\web.config":

<configuration><system.web>

<httpModules>

Page 32: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 32

<add name="ApplicationSecurityAuthenticationModule"type="MyCompany.Hosting.Samples.CustomAuthModule" />

</httpModules></system.web>

</configuration>

8. If you are using IIS 7 and above using an application pool in Integrated Managed Pipeline Mode, thefollowing will be added to your "\wfgen\web.config":

<configuration><system.webServer>

<modules><add name="ApplicationSecurityAuthenticationModule"type="MyCompany.Hosting.Samples.CustomAuthModule" />

</modules></system.webServer>

</configuration>

Form authenticationIIS and WorkflowGen settings

1. Modify the "login.aspx" code to validate the credentials passed over HTTP Basic against the externalconfiguration repository. If you don’t have any external configuration repository, you can add usersdirectly in the web.config of WorkflowGen (please refer to the .NET documentation).

2. The "login.aspx" file must be copied to all of your webforms folders. This should only be applied towebforms. Web services must continue to use either Basic or Integrated authentication and therefore the"login.aspx" page cannot be used for them.

3. In theWorkflowGenweb.config, register the authentication form:

<configuration><system.web>

<authentication mode="Forms"><forms name="401kApp" timeout="30"loginUrl="/wfgen/login.aspx" cookieless="AutoDetect"defaultUrl="/wfgen/default.aspx" protection="None" />

</authentication><authorization>

<deny users="?" /></authorization>

</system.web></configuration>

Note: Set the attribute protection="None" or protection="All" to the "forms" node. If "All" is used, themachineKey attribute and valuemust be added as well. (For more information about forms-basedauthentication, see http://quickstarts.asp.net/QuickStartv20/aspnet/doc/security/formsauth.aspx.)

4. Set the authentication toWindows for eachWorkflowGenWebService application "web.config" file andreset the security settings to Basic or Integrated in IIS for these folders.

Page 33: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 33

5. Enable anonymous access on theWorkflowGenwebsite and disable all built-in access mechanisms.Apply this setting on all sub-applications.

HTTPS: Using SSL with WorkflowGenOverviewThis section describes how to configureWorkflowGen to use SSL connection security level on the website.

IIS configurationActivate SSL authentication for yourWorkflowGenwebsite.

Application parameters to updateYoumust update the following parameter in theWorkflowGen configuration (click on theConfigurationpanel from theAdministration Module home page):

l Web application URL: youmust update the protocol of the base URL of the application to "https://".

Links toWorkflowGenChange the links toWorkflowGen: use "https://" instead of "http://".

Page 34: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 34

Advanced configuration

File storageOverviewWorkflowGen stores files (such as attachments to a request) in a folder tree structure. By default these filesare stored on theWeb server in the folder specified in the "ApplicationDataPath" parameter in theconfiguration file ("web.config"). For example: <add key="ApplicationDataPath" value="\\SERVER\SHARE" />.

The default value is empty and thus will point to the physical directoryDRIVE:\Inetpub\wwwroot\wfgen\App_Data. The default is to keep all the files on the web server.

Youmight need tomove this storage folder location to a dedicated file server for the following reasons:

l High volume (large attachments, document archiving, high usage level)

l Web Farm architecture implementation (seeWeb Farm architecture on page 35)

Basic configuration allows you to easily move these files but with a low security level.

Basic configurationThe following steps must be followed to configure your web server:

1. Create the storage folder on the file serverDRIVE:\FOLDER (e.g. D:\filepub).

2. Re-create the folder tree structure relative to the file storage location:

l DRIVE:\FOLDER\wfgen\App_Data

l DRIVE:\FOLDER\wfgen\App_Data\Files\EFormASPX

l DRIVE:\FOLDER\wfgen\App_Data\Files\XmlToDatabase

l DRIVE:\FOLDER\wfgen\App_Data\LogFiles\XmlToDatabase

l DRIVE:\FOLDER\wfgen\App_Data\Files\XmlTrans

l DRIVE:\FOLDER\wfgen\App_Data\LogFiles\XmlTrans

3. Copy the existing files and folders from their original locations to the new locations, which should stillfollow the same structure.

4. Create a share on the folderDRIVE:\FOLDER. This folder should then be accessible by a"\\SERVER\SHARE$" type UNC name.

5. Give NTFS modify permissions on the share as well as all of its folders and sub-folders for all users ofWorkflowGen.

Page 35: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 35

6. Edit the ApplicationDataPath parameter in "DRIVE:\Inetpub\wwwroot\wfgen\web.config" to<add key="ApplicationDataPath" value="\\SERVER\SHARE$\wfgen\App_Data" />.This is becauseWorkflowGenwill use the specified path in "ApplicationDataPath" to store the \Files,\LogFiles, and \Templates folders.

Web Farm architectureOverviewTo allow higher availability and scalability of the application, you can install WorkflowGen in aWeb Farmarchitecture. The application is therefore installed on several servers, but the database and file storagedirectory are centralized on one dedicated server.

User requests are automatically routed to different servers depending on their load and availability. You canchoose between different methods of load balancing such as DNS Round Robin or setup a hardware loadbalancer.

ConfigurationPrerequisites

l WorkflowGen on all web servers

l File storage centralized in one location

l CommonWebForms folder for all web servers

l Identical configuration on all WorkflowGen servers

File storage location

Apply the basic configuration explained in theAdvanced configuration on page 34 beforemodifying theWorkflowGen configuration.

Setting up a common WebForms folder

If you have configuredmultiple instances of WorkflowGen on different web servers in aWeb Farm setup, youmust share the sameWebForms folder for all servers. To do this:

1. Share yourWebForms folder. This can be either your primary WorkflowGen site’s local WebFormsfolder, or aWebForms folder on a network file server.

2. If you are using a network file server and you have content in your primary WorkflowGen site’s localWebForms folder, we suggest copying the content of this folder to the sharedWebForms folder.

3. Once you have shared the folder, copy the UNC path.

4. Do the following for each instance of WorkflowGen:

Page 36: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 36

i. In IIS, navigate to theWebForms application folder.

ii. Right-click on the folder, then chooseManage Application / Advanced Settings.

iii. Replace the physical path with the UNC path you copied in step 3.

5. Ensure that the required permissions (modify, read and execute, list folder contents, read, write) arecorrectly applied to the sharedWebForms folder for the IIS application pool used by theWebFormsapplication.

WorkflowGen configuration

Verify that all web servers have the same configuration for theWorkflowGen application and for all workflowapplications. The "\wfgen\web.config" files must be identical.

TheWorkflowGen Engine Service is aWindows Service that is installed withWorkflowGen and should onlybe run from one web server. The other servers should only run this service as a backup if themain servicefails to run.

Data and application backup is done in the sameway except that it only affects the file server (for file typedata) and one web server since they have identical configurations (with regards to the applications).

Database file storage modeOverviewThis feature allows process file data (including attachments) to be stored in the database. It allows you toperformWorkflowGen data backup without interrupting service, so that WorkflowGen can still be used duringthe backup.

Setup and configurationWorkflowGen web configuration

Set the "ApplicationDefaultProcessDataFileStorageMethod" parameter to File to store process data files inthe file system, or set it toDatabase to store process data files in the database.

This parameter will define the default process data file storagemethod when creating a new process orimporting a process XPDL of previous version.

UsageEach process version can have the process data file storagemethod set independently. This will allowdifferent processes using the file system or database storagemethod.

New process

In theProcess information tab:

l Check theProcess data storage optionStore file content in database to enable the database filestoragemethod.

Page 37: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 37

l Uncheck theProcess data storage option to disable the database file storagemethod. This will thenuse the file system storagemethod.

Existing process

In theProcess information tab:

l Uncheck theProcess data storage option to disable the database file storagemethod. This will thenuse the file system storagemethod.

When changing process data storagemethod, the following rules must be applied:

l There should be no existing requests using the previous process data storagemethod. You can eitherdelete existing requests or create a new version of the process.

l There should be no existing "FILE" type process data with the default file value using the previousprocess data storagemethod. You can delete all default file values, change the process data storagemethod, and re-upload the default file values into the process data.

Additional informationTemporary files

For aWeb Farm architecture, file storagemust be centralized in a common shared storage path. The settingsinAdvanced configuration on page 34must be applied for temporary files.

In the database file storagemethod, WorkflowGenwill still create temporary files in the \wfgen\App_Datafolder (ApplicationDataPath) to be be used by requests and actions at runtime.

These temporary files will be automatically deleted when the requests or actions are completed.

Custom asynchronous system action

To ensure data integrity and 24-hour / 7-days-a-week operation time in database file storagemethod, yourcustom asynchronous system action that uses "FILE" IN parameters must also save the file content in yourcustom application database when the file is referenced later by your action.

This will ensure that the file will still exist and can be used later by your asynchronous system action, sinceonly theWorkflowGen database and your custom application database are backed up.

Configuring multiple instances of WorkflowGenOverviewThis section describes how to configuremultiple instances of WorkflowGen on the sameweb server. Eachinstance of WorkflowGen also requires a dedicated license. This section assumes that you have alreadyinstalled separate instances of WorkflowGen as described inSetup on page 13.

Note: For instructions on how to configuremultiple instances of WorkflowGen on different servers in aWebFarm setup, seeWeb Farm architecture on page 35.

Page 38: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 38

Setup and configurationTo configuremultiple instances of WorkflowGen on a single server, perform the steps outlined below. Whilemore than two installations are possible, the following steps assume only two instances are installed.

Beforemodifying the service, it must be uninstalled using the "winsvc-uninstall.cmd" file found in the \binfolder of the application installation (for example, "DRIVE:\Program Files\Advantys\WorkflowGen\Services\bin\winsvc-uninstall.cmd"). Be sure to run it as the administrator of the server.

WorkflowGen directory synchronization service

For both instances of WorkflowGen, edit the parameter name in the "WfgDirectoriesSyncService.exe.config"WorkflowGenDirectory Synchronization Service configuration file.

Instance 1:

DRIVE:\Program Files\Advantys\WorkflowGen1\Services\bin\WfgDirectoriesSyncService.exe.config

<add key="ServiceName" value="WorkflowGenDirSyncService1" />

Instance 2:

DRIVE:\Program Files\Advantys\WorkflowGen2\Services\bin\WfgDirectoriesSyncService.exe.config

<add key="ServiceName" value="WorkflowGenDirSyncService2" />

WorkflowGen Engine service

For both instances of WorkflowGen, edit the parameter name in the "WfgWorkflowEngineService.exe.config"WorkflowGen engine service configuration file.

Instance 1:

DRIVE:\Program Files\Advantys\WorkflowGen1\Services\bin\WfgWorkflowEngineService exe.config

<add key="ServiceName" value="WorkflowGenEngineService1" />

Instance 2:

DRIVE:\Program Files\Advantys\WorkflowGen2\Services\bin\WfgWorkflowEngineService exe.config

<add key="ServiceName" value="WorkflowGenEngineService2" />

Windows NT command scripts (install and uninstall of services)

For both instances of WorkflowGen you need tomodify theWindows shell scripts that are used to install anduninstall theWindows services "WfgDirectoriesSyncService" and "WfgWorkflowEngineService" asdescribed above.

Instance 1:

Install script

DRIVE:\Program Files\Advantys\WorkflowGen1\Services\bin\winsvc-install.cmd

Page 39: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 39

Based on the value given for the "ServiceName" parameter defined in theWorkflowGen directorysynchronization service section above, your winsvc-install.cmd file should appear as follows:

SC query WorkflowGenDirSyncService1 |Find.exe "does not exist"IF %ERRORLEVEL% EQU 0 (%windir%\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe /i"C:\ProgramFiles\Advantys\WorkflowGen1\Services\bin\WfgDirectoriesSyncService.exe"net start WorkflowGenDirSyncService1) ELSE (%windir%\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe /u"C:\ProgramFiles\Advantys\WorkflowGen1\Services\bin\WfgDirectoriesSyncService.exe")

Uninstall script

DRIVE:\Program Files\Advantys\WorkflowGen1\Services\bin\winsvc-uninstall.cmd

Based on the value given for the "ServiceName" parameter defined in theWorkflowGen directorysynchronization service section above, your "winsvc-uninstall.cmd" file should appear as follows:

%windir%\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe /u"C:\ProgramFiles\Advantys\WorkflowGen1\Services\bin\WfgDirectoriesSyncService.exe"/LogFile=

Instance 2:

Install script

DRIVE:\Program Files\Advantys\WorkflowGen2\Services\bin\winsvc-install.cmd

Based on the value given for the "ServiceName" parameter defined in theWorkflowGen directorysynchronization service section above, your "winsvc-install.cmd" file should appear as follows:

SC query WorkflowGenDirSyncService2 |Find.exe "does not exist"IF %ERRORLEVEL% EQU 0 (%windir%\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe /i"C:\ProgramFiles\Advantys\WorkflowGen2\Services\bin\WfgDirectoriesSyncService.exe"net start WorkflowGenDirSyncService2) ELSE (%windir%\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe /u"C:\ProgramFiles\Advantys\WorkflowGen2\Services\bin\WfgDirectoriesSyncService.exe")

Uninstall script

DRIVE:\Program Files\Advantys\WorkflowGen2\Services\bin\winsvc-uninstall.cmd

Page 40: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 40

Based on the value given for the "ServiceName" parameter defined in theWorkflowGen directorysynchronization service section above, your "winsvc-uninstall.cmd" file should appear as follows:

%windir%\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe /u"C:\ProgramFiles\Advantys\WorkflowGen2\Services\bin\WfgDirectoriesSyncService.exe"/LogFile=%windir%\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe /u"C:\ProgramFiles\Advantys\WorkflowGen2\Services\bin\WfgWorkflowEngineService.exe"/LogFile=pause

Install the Windows Services

For both instances, youmust run the install scripts that have beenmodified as described above usingadministrator permissions.

Instance 1:

DRIVE:\Program Files\Advantys\WorkflowGen1\Services\bin\winsvc-install.cmd

Instance 2:

DRIVE:\Program Files\Advantys\WorkflowGen2\Services\bin\winsvc-install.cmd

Database scalingOverviewThe database scaling feature allows for the addition of database servers in order to dramatically improveserver performance and response times. The additional read-only ("slave") database servers will be used asdedicated read-only servers (SELECT SQL queries). The read-only database servers are replicated from theexistingmaster database using the SQL Server Replication service.

Note: This feature is only supported in MS SQLServer.

RequirementsOverview

l SQLServer 2005 or higher for all database servers

l SQLServer Replication featuremust be installed on all SQL Server instances

l SQLServer Agent must be installed and configured on all SQL Server instances

Page 41: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 41

Setup and configurationOverview

This section provides a general procedure for configuring the SQL Server Replication service on all the SQLServer instances and enabling theWorkflowGenweb server in database scalingmode. This procedure is anexample based on oneWorkflowGen instance and two database server instances architecture.

If your current architecture differs from this example, you can adapt the procedure and some specificconfiguration options according to your needs.

We assume your current WorkflowGen environment meets the following prerequisites:

l The initial WorkflowGen database is already installed on themaster database instance

l The read-only database instance does not contain an existingWorkflowGen database the read-onlydatabase instance

l TheWorkflowGenweb server is fully configured and allows access to theAdministration ModulewithaWorkflowGen administrator account

SQL Server configuration options

It is mandatory to update the SQL Server's "max text repl size" configuration option with a higher value inorder for the database replication to function properly. We recommend setting this to themaximum value of2147483647 instead of the default value of 65536.

Run the following SQL statements in the source (master) and destination (read-only) SQL Server databaseinstances (this example uses SQL Server 2008):

EXEC sp_configure "max text repl size", 2147483647;GORECONFIGURE;GO

Formore information, see http://msdn.microsoft.com/en-us/library/ms186225.aspx and select your version ofSQL Server from the drop-downmenu.

SQL Server replication services

To set up a publication on the master database:

1. Open SQL Server Management Studio 2008.

2. Connect to themaster database instance.

3. Open theReplication node.

4. Right-click on Local Publications and chooseNew Publication. TheNew Publication Wizardwillopen. Click Next.

5. SelectWFGEN in thePublication Database list. Click Next.

6. Select Transactional publication in thePublication type list. Click Next.

Page 42: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 42

7. Check all Tables andViews (optional if theWorkflowGenReportingModule is installed in the currentdatabase instance) in theArticles list. Click Next.

8. TheArticle Issues dialog box will open if you selectedViews in the previous step. Click Next.

9. The Filter Table Rows dialog box will open. There is no need to filter the data in the publication. ClickNext.

10. TheSnapshot Agent dialog box will open. Check Create a snapshot immediately and keep thesnapshot available to initialize subscriptions. Click Next.

11. InSnapshot Agent Security, provide valid service or administrator credentials for theWindowsaccount. Click Next.

12. Check Create the publication. Click Next.

13. Enter thePublication name "WFGEN_PUB".

14. Click Finish. If all is successful, close theNew Publication Wizard.

To set up a subscription on the read-only database:

1. Open SQL Server Management Studio 2008.

2. Connect to the read-only database instance.

3. Open theReplication node.

4. Right-click on Local Subscriptions and chooseNew Subscription. TheNew Subscription Wizardwill open. Click Next.

5. Select <Find SQL Server Publisher…>.

6. Connect to themaster database instance.

7. SelectWFGEN_PUB in theDatabases and publications list. Click Next.

8. Select Run each agent at its Subscriber (pull subscriptions). Click Next.

9. In theSubscription Database column, select <New database…>.

10. Enter theDatabase name "WFGEN" and click OK. Click Next.

11. InDistribution Agent Security, provide valid service or administrator credentials for theWindowsaccount. Click Next.

12. InSynchronization Schedule, select Run continuously. Click Next.

13. In Initialize Subscriptions, select Immediately. Click Next.

14. Select Create the subscription(s). Click Next.

15. Click Finish. If all is successful, close the New SubscriptionWizard.

16. Create and add the SQL user "WFGEN_USER" to theWFGEN read-only database security with db_datareader and db_datawriter permissions.

Page 43: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 43

Note: TheWFGEN_USER account will be used in the connection string for theWFGEN read-only databaseinWorkflowGen.

Database scaling inWorkflowGenEnable the multi-database mode in WorkflowGen:

1. Connect to theWorkflowGenAdministration Module.

2. Open theConfiguration panel and select theGeneral tab.

3. In theRead-only database connection string field, enter theWFGEN connection string of the read-only database instance.

4. Check Enable onMulti-database to turn on the database scaling feature.

5. Check each of the specific Portal pages andModules:

l If unchecked, it will use themaster database.

l If checked, it will use the read-only database.

6. Save and close.

Referencesl Formore information on SQL Server replication, see http://msdn.microsoft.com/en-us/library/ms151198.aspx and select your version of SQL server from the drop-downmenu.

l Formore information on the SQL Server "max text repl size" option, see http://msdn.microsoft.com/en-us/library/ms186225.aspx and select your version of SQL server from the drop-downmenu.

Page 44: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 44

Operations

BackupOverviewThe data and database files should be backed up regularly to preserve the reliability of the processes and theirassociated data.

Notes

l It is strongly recommended to perform the backup of the database and the files at the same time. Toenforce data integrity, it is also recommended to stop IIS and database services.

l The following procedures apply to SQL Server only. For Oracle database backup, consult your OracleDBA.

Full (applications and data)Application and data files

Back up theDRIVE:\Inetpub\wwwroot\wfgen folder.

If you have applied file storage, back up the folder as indicated in the ApplicationDataPath parameter in the"web.config" file.

Database

Perform a standard SQL database backup provided with your DBMS tools.

Data onlyDatabase

Perform a standard SQL database backup provided with your DBMS tools.

Data files

Back up theDRIVE:\Inetpub\wwwroot\wfgen\App_Data folder.

Moving the WorkflowGen databaseSQLServer databaseTomove theWorkflowGen SQL Server database from one server to another:

Page 45: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 45

1. Stop IIS services on the production server.

2. Detach theWorkflowGen database.

3. Copy the .mdf and .ldf files to the new location.

4. Attach the file to the new database server.

5. Update the connection string in theConfiguration panel.

6. Restart your IIS services.

Oracle databaseConsult your Oracle DBA.

Moving the WorkflowGen applicationTomove theWorkflowGen installation from one server to another:

1. Stop IIS services on the production server.

2. Set up the same version of WorkflowGen on the new server.

3. Copy theDRIVE:\Inetpub\wwwroot\wfgen\App_Data folder from the old server to the new one if youhaven’t applied file storage externalization.

4. If you have created your ownweb forms, SDK applications, or web services:

i. Copy their folders in the corresponding tree structure of the new server. For example, if you havecreated a web service named "MyWebService" located inDRIVE:\wfgen\wfapps\WebServices\MyWebServices then you need to copy the entire folder to the same place on the new server.

ii. Create the IIS application with the same directory security options on the new server for theapplications you have copied.

iii. For web services or SDK Applications, make sure to update the application URL in theAdministration Module.

iv. For web forms, be sure to update the FORM_URL data in the process definition to point to the newURL.

v. Repeat this process for every custom application you have created.

5. Update the application URL from theConfiguration panel.

Page 46: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 46

MonitoringStorage spaceFile data

The only folder that you need tomonitor for storage space is DRIVE:\Inetpub\wwwroot\wfgen\App_Data.The other folders should always keep the same size because everything that is generated over the time isplaced in this directory.

Database

The database size can be determined by checking the .MDF and .LDF files if you are using SQL Server, orusing your DBMS tools.

Storage space needs may vary depending on whether or not theStore file content in database process datastorage option is selected during the process definition.

Directory synchronizationThe directory synchronization log files can be found in the \wfgen\App_Data\LogFiles\Dir\Synchrodirectory. Alternately, you can consult andmanage the logs history directly in theWorkflowGenAdministration Module.

Windows ServicesWindows Services should be set to run automatically when the server starts. Periodically, Windows Serviceswill perform the following necessary tasks:

l Raise overdue exceptions

l Send overdue notifications

l Delete inactive delegations

l Delete ghost activities (activities initialized but never started)

UsageRequests/actions by day

A statistics module and charting functions are provided in theUser Portal to generate detailed reports on therequests and actions. You can customize reports using filters.

Attachment file size

Attachments to requests submitted using web forms are saved in theDRIVE:\Inetpub\wwwroot\wfgen\App_Data\Files\EFormASPX temporary folder and are automatically deleted 24 hours after their creation.

WorkflowGenwill copy those runtime files to a permanent location. If theStore file content in databaseprocess data storage option is enabled, then they are stored directly in the database. Otherwise, they are

Page 47: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 47

stored in the file system as determined by the "ApplicationDataPath" configuration parameter (e.g.\App_Data\Files\DataSet\runtime).

If you know that a process takes toomuch space on the disk because of the process data, or toomuch spacein the database because of file attachments, you can turn off theArchive action associated data option inthe process definition. This will prevent the attached file from being stored for each action of every request.Only the data after the last action will be kept on the disk or in the database.

Page 48: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 48

Using IIS SMTP gatewayFor best performance, the IIS SMTP gateway should be used. In this configuration all emails are redirected toa "Smart host".

Note: The SMTP servicemust be installed on theWindows server used as the SMTP gateway.

To configurate the IIS SMTP gatway:

1. In IIS, edit the properties of theDefault SMTP virtual server.

2. In theAccess tab, click Relay.

3. Click theAll except the list below radio button.

4. Click Apply and close this window. (For an increased security level, grant access only to the web serverIP.)

5. In theDelivery tab, click theAdvanced button.

6. In theSmart host field, enter your SMTP gateway address (IP or hostname).

7. Click Apply.

Page 49: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 49

Synchronizing a directory incommand lineThe automatic users and groups synchronization is provided by this Windows service. This service isinstalled by the setup pack and started automatically after installation.

The default suggested installation path is DRIVE:\Program Files\Advantys\WorkflowGen\Services\bin\WfgDirectoriesSyncService.exe".

The synchronization service can also be executed from a command line.

Youmust specify the "/c" or "/console" parameter.

The following parameters are optional:

l /p[ath]:location   Location of the web.config file use to synchronize (usually the web.config file ofWorkflowGen).

l /d[irectories]:list   List of directories to synchronize; use " , " (comma) or " ; " (semicolon) for separator.

l /s[ilence]   No output will be generated in the console.

l /f[orce]   Synchronization will ignore the scheduling information and the automatic/manual parameter ofthe directory.

l /h[elp] or /?   Displays the help for console execution.

Note: If an error occurs the exit code 1 is returned, otherwise 0 is returned.

Example 1:

This will launch the directory synchronization of theWorkflowGen instance installed in theD:\inetpub\wwwroot\wfgen folder:

WfgDirectoriesSyncService.exe /c /p:D:\inetpub\wwwroot\wfgen\web.config

Example 2:

This will force the synchronization of the directory MyDir of theWorkflowGen instance installed in theD:\inetpub\wwwroot\wfgen folder:

WfgDirectoriesSyncService.exe /c /p:D:\inetpub\wwwroot\wfgen\web.config/d:MyDir /f

Page 50: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 50

Sample code for an HTTPmodule

OverviewThis sample is an HTTP module that uses an HTTP authentication. Youmust insert your ownmethod toauthenticate users.

For more information about Custom HTTP module development, please refer to the .NET documentation.

Source code

//*********************************************************************

// Copyright ©.

//

// Purpose:

// Sample code for an HTTP module

//

//*********************************************************************

using System;

using System.Web;

using System.Security.Principal;

using System.Text;

using System.Diagnostics;

namespace MyCompany.Hosting.Samples

{

/// <summary>

/// Summary description for CustomAuthModule

/// </summary>

public class CustomAuthModule : IHttpModule

{

/// <summary>

/// Constructor

/// </summary>

public CustomAuthModule()

{

}

#region IHttpModule Members

/// <summary>

Page 51: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 51

/// Release any resources

/// </summary>

public void Dispose()

{

}

/// <summary>

/// Initialization of module

/// </summary>

/// <param name="context"></param>

public void Init(HttpApplication application)

{

application.AuthenticateRequest += new EventHandler(application_AuthenticateRequest);

}

/// <summary>

/// Delegate for authenticating a request

/// </summary>

/// <param name="sender"></param>

/// <param name="e"></param>

void application_AuthenticateRequest(object sender, EventArgs e)

{

HttpApplication application = sender as HttpApplication;

Debug.Assert(application != null);

// Has the client sent Authorization information

//

if (application.Context.Request.ServerVariables["HTTP_AUTHORIZATION"] == null)

{               

// Redirects client to send HTTP Basic credentials

//

application.Response.StatusCode = 401;

application.Response.AddHeader("WWW-Authenticate", "Basic");

application.Response.End();

}

else

{

// Retrieve authentication string

//

string authString = application.Request.ServerVariables["HTTP_AUTHORIZATION"];

// If the authentication method is basic

//

Page 52: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 52

if (authString.StartsWith("basic",StringComparison.InvariantCultureIgnoreCase))

{

string[] credentials;

bool isValidUser = false;

// Decode credentials

//

credentials = DecodeBase64String(authString.Substring(6)).Split(':');

// Credentials should have two cells

//

// credentials[0] is the username

// credentials[1] is the password

Debug.Assert(credentials.Length == 2);

//

// ****************************

// Perform your check here

// ****************************

//

// isValidUser = YourAuthenticationMethod(credentials[0], credentials[1]);

if (isValidUser)

{

// Create a user

//

GenericPrincipal user =

new GenericPrincipal(

new GenericIdentity(credentials[0], authString),

new string[] { "role_name" });

// Set this user for the session

//

application.Context.User = user;

}

}

}

}

/// <summary>

Page 53: WorkflowGen6.1 TechnicalReferenceGuide€¦ · Setupandconfiguration 38 Databasescaling 40 Overview 40 Requirements 40 Setupandconfiguration 41 DatabasescalinginWorkflowGen 43 References

WorkflowGen 6.1 Technical ReferenceGuide 53

/// Decodes a Base64-encoded string

/// </summary>

/// <param name="base64EncodedString"> </param>

/// <returns></returns>

private string DecodeBase64String(string base64EncodedString)

{

try

{

UTF-8Encoding encoder = new UTF-8Encoding();

Decoder decoder = encoder.GetDecoder();

byte[] bytesToDecode = Convert.FromBase64String(base64EncodedString);

int charCount = decoder.GetCharCount(bytesToDecode, 0,bytesToDecode.Length);

char[] decodedChars = new char[charCount];

decoder.GetChars(bytesToDecode, 0,

bytesToDecode.Length, decodedChars, 0);

return new String(decodedChars);

}

catch (Exception e)

{

throw new Exception("Error in DecodeBase64String: " + e.Message);

}

}

#endregion

}

}