Hello Roland,
thanks for reply and I'm sorry for late response.
3, get next project code from DB: by custom function which return next ID(l_project_code) using procedure CMN_AUTONUM_GET_NEXT_SP ('project', 'unique_code', 'NIKU.ROOT', 'inv_investments', 'code', null, 0, l_project_code); Here I really don’t understand how it’s possible that function return more times the same ID!
'SLEEP' utility: I thought about this option, but I saw "mixed community views" and also there is required response time when external app receive confirmation that project has been created (including URL of new project instance) so I don't want delay standard project create flow.
Regarding pass ID from external app as part of the SOAP call which is good idea, but in our case it would require redesign of existing solution. We have multiple types of the same object instance, which can be created from Clarity UI or by external app.
To identify particular project instance we use "ProjectID" which is project type||project code. E.g. A0001, A0002, B0003, C0004, A0005 .... where “A” is created by external tool “B” and “C” are created from UI. So project code(0001,0002 ....) follow the same sequence for all types.
I've run a SoapUI test case with multiple SOAP call with 1sec delay and all project has been created correctly so we've agreed with client that there is really low risk that the project create call from external app will come in the same time (in one sec) we decided to ignore this case.
Best regards,
Marian.