If you attempt to start a SAS Strategy Management workflow at the Manage Data Entry Forms page by selecting the Start workflow icon (), you might encounter the following error:
Associated with the above error, you might notice that the log.txt file in a folder similar to the following
Config-folder\Lev1\Web\Logs\SASServer11_1\SASStrategyManagement5.6 includes the following error:
ERROR 2015-11-17 11:01:28,819 [tomcat-http--22] - com.sas.workflow.framework.client.WorkflowServiceException: Internal Error
ERROR 2015-11-17 11:01:28,856 [tomcat-http--22] - An error occurred in a StM server call to the DataEntryController PUT call.
/dataentryworkflow/{action}/{dataEntryId}
action: start dataEntryId: e0a96052-0a79-13cf-43d6-7b7f9596086c
ERROR: problem starting workflow for Data Entry form ID=e0a96052-0a79-13cf-43d6-7b7f9596086c
Note: Your Data Entry form ID will most likely be different.
In addition, you might notice the SASWorkflowServices9.4.log file located in a folder similar to the following Config-folder\Lev1\Web\Logs\SASServer1_1 includes the following error:
SQL []; ERROR: duplicate key value violates unique constraint "wf_process_pk"
Detail: Key (real_id)=(101) already exists.; nested exception is org.postgresql.util.PSQLException:
ERROR: duplicate key value violates unique constraint "wf_process_pk"
Detail: Key (real_id)=(101) already exists.
org.springframework.dao.DuplicateKeyException: Process.insertProcess (batch index #1) failed.
You are most likely to encounter a problem starting a workflow if you recently migrated to SAS® 9.4_M3.
Click the Hot Fix tab in this note to access the hot fix for this issue.
If the hot fix has not been installed at your site yet, you can execute SQL update commands against the PostgreSQL SharedServices database to resolve the issue. There are two options for doing this, and you can use either of the two options (but not both). The options are listed below:
- Option 1: Use the psql PostgreSQL interactive terminal command.
- Option 2: Use pgAdmin III comprehensive PostgreSQL database management system.
Option 1: Use the psql PostgreSQL Interactive Terminal Command
The PostgreSQL interactive terminal command enables you to update the SharedServices database by executing psql on a command line. Documentation for the psql command is available
here. To update the SharedServices database with the psql command, complete these steps:
- Click the Downloads tab in this SAS Note and download the Fix_SharedServices_Workflow_keygen.zip file.
- Unzip the Fix_SharedServices_Workflow_keygen.zip file to access the Fix_SharedServices_Workflow_keygen.sql file.
- Copy the Fix_SharedServices_Workflow_keygen.sql file to a folder on a server or workstation that can access the PostgreSQL database. For example, on a Microsoft Windows system, you might copy it to a folder named C:\WF_fix.
- Open a command prompt or shell window in the directory where the Fix_SharedServices_Workflow_keygen.sql file was copied. For example, on a Windows system, you would open a DOS window and navigate to the C:\WF_fix directory.
- Use the psql command (reference the screen shot below) with the following case sensitive parameters:
- -d SharedServices to specify the SharedServices database
- -h host to specify the host name where PostgreSQL is running
- -p port to specify the PostgreSQL port
- -U username to specify the user name of the database server administrator
- the less than symbol (<) to specify an input file, which is Fix_SharedServices_Workflow_keygen.sql
Note: The host, port, and username referenced above were specified in the SAS® Web Infrastructure Platform Data Server dialog box in the SAS® Deployment Wizard when your environment was configured.
- Restart the SAS Web Application Server where the workflow is deployed and restart the SAS Strategy Management web application server. Typically, the workflow is deployed to SASServer1_1 and SAS Strategy Management is deployed to SASServer11_1. You also need to restart any server that is dependent upon SASServer1_1.
You can open the Fix_SharedServices_Workflow_keygen.sql file in Notepad, TextPad, or other text editor to view additional information.
An example of the psql command is shown here. After the command is issued, you are prompted for the password, as shown, and it too was specified in the SAS Web Infrastructure Platform Data Server dialog box in the SAS Deployment Wizard when your environment was configured.
Option 2: Use pgAdmin III Comprehensive PostgreSQL Database Management System
The pgAdmin III tool allows you to update the SharedServices database by executing the SQL query update commands available in the Fix_SharedServices_Workflow_keygen.sql file. Documentation for pgAdmin III is available
here. This link takes you to the pgAdmin Main Window.
To update the SharedServices database with the pgAdmin III tool, complete these steps:
- Click the Downloads tab in this SAS Note and download the Fix_SharedServices_Workflow_keygen.zip file.
- Unzip the Fix_SharedServices_Workflow_keygen.zip file to access the Fix_SharedServices_Workflow_keygen.sql file.
- Copy the Fix_SharedServices_Workflow_keygen.sql file to a folder on a server or workstation where you have access to pgAdmin III.
- Launch pgAdmin III by selecting Start ► All Programs ► PostgreSQL 9.1 ► pgAdmin III.
- In pgAdmin III, click the Add a connection to a server icon
().
- In the New Server Registration dialog box, provide a Name, Host, Port, Username, and Password appropriate for your environment and click OK. An example is shown here.
Note: The host name is different than shown in Option 1 because two different servers were used for these examples.
Note: The host, port, username, and password referenced above were specified in the SAS Web Infrastructure Platform Data Server dialog box in the SAS Deployment Wizard when your environment was configured.
- In the Object browser section of pgAdmin III, drill down to the SharedServices database for the connection added in the previous step, as shown here:
- With the SharedServices database still selected, click the Execute arbitrary SQL queries icon
() in order to launch the Query window.
- In the Query dialog box, click the Open file icon
().
- In the Open query file dialog box, navigate to the Fix_SharedServices_Workflow_keygen.sql file that was saved in step 3, and click Open.
The Fix_SharedServices_Workflow_keygen.sql file opens in the Query dialog box ► the SQL Editor tab as shown here:
If you scroll down in the file, you notice that there are seven UPDATE sas_keygen commands. Three are shown here:
- Click the Execute query icon () to run the UPDATE sas_keygen commands.
Note: The Messages tab in the Output pane only shows the results of the last update command, which might indicate that 0 rows were affected. If you select the History tab, you can verify all update commands that were executed.
- Restart the SAS Web Application Server where the workflow is deployed and restart the SAS Strategy Management web application server. Typically, the workflow is deployed to SASServer1_1 and SAS Strategy Management is deployed to SASServer11_1. You also need to restart any server that is dependent upon SASServer1_1.
If you attempt to start SAS Strategy Management workflow at the Manage Data Entry Forms page by selecting the Start workflow icon () after you have executed the steps in either Option 1 or Option 2 and restarted the SAS Web Application Servers, it should start successfully:
Operating System and Release Information
SAS System | SAS Strategy Management | Solaris for x64 | 5.6 | 5.6_M1 | | 9.4 TS1M3 |
Linux for x64 | 5.6 | 5.6_M1 | | 9.4 TS1M3 |
64-bit Enabled AIX | 5.6 | 5.6_M1 | | 9.4 TS1M3 |
Microsoft® Windows® for x64 | 5.6 | 5.6_M1 | | 9.4 TS1M3 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.