[jboss-user] [JBoss jBPM] - Re: add new user

mputz do-not-reply at jboss.com
Mon Aug 18 10:17:11 EDT 2008


Petia,

the SQL 42601 error comes up because the SQL statements are missing the trailing semicolons (;).


  | $ sed 's/$/;/g' jbpm.jpdl.postgresql.sql > jbpm.jpdl.postgresql.delimiter.sql
  | $ psql -d <database> -U <dbuser> -W -f jbpm.jpdl.postgresql.delimiter.sql
  | 

Also, you'd need not only JBPM_ID_USER entries as outlined in the SQL snippet of Chapter 8.5.1 of the docs, but also entries in the JBPM_ID_GROUP and JBPM_ID_MEMBERSHIP table:

INSERT INTO JBPM_ID_GROUP VALUES(1,'G','sales','organisation',NULL);
  | INSERT INTO JBPM_ID_GROUP VALUES(2,'G','admin','security-role',NULL);
  | INSERT INTO JBPM_ID_GROUP VALUES(3,'G','hr','organisation',NULL);
  | INSERT INTO JBPM_ID_GROUP VALUES(4,'G','user','security-role',NULL);
  | INSERT INTO JBPM_ID_GROUP VALUES(5,'G','manager','security-role',NULL);
  | INSERT INTO JBPM_ID_USER VALUES(1,'U','user','user at sample.domain','user');
  | INSERT INTO JBPM_ID_USER VALUES(2,'U','manager','manager at sample.domain','manager');
  | INSERT INTO JBPM_ID_USER VALUES(3,'U','admin','admin at sample.domain','admin');
  | INSERT INTO JBPM_ID_USER VALUES(4,'U','shipper','shipper at sample.domain','shipper');
  | INSERT INTO JBPM_ID_MEMBERSHIP VALUES(1,'M',NULL,NULL,2,4);
  | INSERT INTO JBPM_ID_MEMBERSHIP VALUES(2,'M',NULL,NULL,3,4);
  | INSERT INTO JBPM_ID_MEMBERSHIP VALUES(3,'M',NULL,NULL,1,4);
  | INSERT INTO JBPM_ID_MEMBERSHIP VALUES(4,'M',NULL,NULL,4,4);
  | INSERT INTO JBPM_ID_MEMBERSHIP VALUES(5,'M',NULL,NULL,4,3);
  | INSERT INTO JBPM_ID_MEMBERSHIP VALUES(6,'M',NULL,NULL,2,3);
  | INSERT INTO JBPM_ID_MEMBERSHIP VALUES(7,'M',NULL,NULL,3,3);
  | INSERT INTO JBPM_ID_MEMBERSHIP VALUES(8,'M',NULL,NULL,3,2);
  | INSERT INTO JBPM_ID_MEMBERSHIP VALUES(9,'M',NULL,NULL,2,2);
  | INSERT INTO JBPM_ID_MEMBERSHIP VALUES(10,'M',NULL,NULL,2,5);
  | INSERT INTO JBPM_ID_MEMBERSHIP VALUES(11,'M',NULL,'boss',2,1);
  | INSERT INTO JBPM_ID_MEMBERSHIP VALUES(12,'M',NULL,NULL,1,1);
  | 

Finally, if you add a new user using the jbpm-console, you will also need to associate the new user entry with a group, eg. by default at least the 'user' group to be able to login.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171057#4171057

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171057



More information about the jboss-user mailing list