Hence I didn't find relevant answer for my question, I'm asking if it's possible to create project via SOAP request (from another tool). Is that possible? I guess the main tricky thing would be to obtain Project (Investment) ID for that creation.
Has someone any tips there?
You can use XOG WSDL to create projects. https://docops.ca.com/ca-ppm/15-4-1/en/reference/xml-open-gateway-xog-development/xog-wsdl
Using WSDL you can add the xog code to create the project (you can for example xog out one existing project to see example input, as the output code can be used as input as well). Regarding the Project ID, it can be specified via xog, just make sure it is unique or you will be updating an existing project.
Additional links with XOG documentation: https://docops.ca.com/ca-ppm/15-4-1/en/reference/xml-open-gateway-xog-development
I meant of course "standard" Project ID, so auto-numbered. I know there is a sequence for this in database and this query retrieves following ID from Clarity:
SELECT next_value FROM niku.CMN_AUTONUM_SCHEMES WHERE 1=1 AND object_code = 'project' AND attribute_code = 'unique_code' AND partition_code = 'NIKU.ROOT'
So for me, question is still the same: How can they (from another tool) create project through SOAP request with proper/following ID which is auto-numbered?
Thanks for tips
P.S. I've tried your suggested "-1" as ID but it didn't worked as I expected:
Used XOG write:
<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_project.xsd"> <Header action="write" externalSource="NIKU" objectType="project" version="22.214.171.12423"/> <Projects> <Project active="true" managerResourceID="admin" name="XOG write test4" projectID="-1" start="2018-09-16T08:00:00"> <Resources/> <Tasks/> <Dependencies/> <CustomInformation/> <General addedBy="admin" addedDate="2018-08-15"/> <OBSAssocs/> </Project> </Projects></NikuDataBus>
Is it ok if it is a two-step procedure? Assuming that the external system does not connect to Clarity Database to run queries, build an NSQL with the query which is giving you the Project ID(which you have already). Let the external system call the NSQL(as webservice) first and retrieve the Project ID. Then frame the Project XOG XML with the retrieved project ID and write to Clarity.
Also, analyse scenarios such as what if a new project is created by some other means after the external system has executed first step and before its second step execution etc.
I know XOG service quite well, even if those WSDL staff not. My question is how can I use SOAP request for creation of new project used in another tool (not update existing project) AND how they can obtain Project (Investment) ID?
Some discussion here on the logic about calling autonumber externally (but from GEL not a real external system) ; Project ID autonumbering with XOG in GEL
So for calling from a real external system, would think you need to set up a webservice on the PPM side that can deliver the "ID" to the external system.
Hi Sridhar, Yes I think this is the only way and thanks for that. I'll suggest this option to our 3rd party colleagues.
"Project ID" is just a text field though - so it can be anything (e.g. sourced from your external system perhaps?). ( The internal id (the 5000000 number) doesn't appear in the XOG at all so you don't worry about it )
You might have chosen to auto-number the "Project ID" in your system though, that is your choice. If you wanted to preserver that sequence in your "imported" projects then your problem is really how to build the logic to select a new value from the application's auto-numbering sequence and not really a problem with SOAP/XOG as such.
Actually some XOG allows you to send in an ID of "-1" which tells the system to use the relevant auto-numbering sequence, offhand though I don't know whether the project XML supports this - you could just test it perhaps?
In short - yes everything you want to do is possible,