Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
creating a discussion node
Dave_Russell_(CCIDR_(Delete)_2115817)
Hi,Can anyone post some code detailing how I should create a discussion node in OScript ?It's obviously different to a document, or folder, as I'm having trouble....My resulting discussions have the Type 215 node, but not the associated type 143 node.......Dave
Find more posts tagged with
Comments
Dave_Russell_(CCIDR_(Delete)_2115817)
Here's my code - it works, but there must be an easier way ?!// Create 215 nodedDiscussion = DAPI.AllocNode(dApiSess)dDiscussion.pName = 'Discussion'dDiscussion.pSubType = $TypeDiscussiondDiscussion.pExAtt1 = "0"// Create 143 Volume nodeiCreateNodeResult = DAPI.CreateNode(dDiscussion, dProjectFolder, TRUE)dDiscuss2 = DAPI.AllocNode(dApiSess)dDiscuss2.pSubType = $TypeVolDiscussiondDiscuss2.pName = 'Discussion'dDiscuss2.pVolumeID = dDiscussion.pIDiCreateNodeResult = DAPI.CreateRootNode(dDiscuss2)// Insert "root" record into DiscussionIDdbResult = CAPI.Exec( \ .PrgSession().fDbConnect.fConnection, \ 'insert into DiscussionID values ( :A1, 0 )', \ dDiscuss2.pVolumeId )The code I've got here comes out of the NodePreSubClass and NodePostSubClass of the Discussion OSpace. When I create a node using the GUI, these are called anyway. When I create a node of type 215 (or 143) using OScript, they aren't.....Am I doing something wrong ? Or is this how I'm supposed to create a discussion ?!Dave
eLink User
Message from Hans Stoop via eLinkYou can call the webNode.action-create2 command with the correctparameters. Call it as webNode.('action-create2')(......) to fool theparser.Hans Stoop--------------Consultant Partner Programs Europehstoop@opentext.com+31 23 5652333
http://www.opentext.com/>
; -----Original Message-----> From: eLink Discussion: Development Discussion> [mailto:development@elinkkc.opentext.com]> Sent: woensdag 7 februari 2001 11:23> To: eLink Recipient> Subject: found a very-long-winded way of doing it. Anything> better ?!>>> found a very-long-winded way of doing it. Anything better ?!> Posted by CCIDR on 02/07/2001 05:16 AM>> Here's my code - it works, but there must be an easier way ?!>> // Create 215 node> dDiscussion = DAPI.AllocNode(dApiSess)> dDiscussion.pName = 'Discussion'> dDiscussion.pSubType = $TypeDiscussion> dDiscussion.pExAtt1 = "0">> // Create 143 Volume node> iCreateNodeResult = DAPI.CreateNode(dDiscussion,> dProjectFolder, TRUE)> dDiscuss2 = DAPI.AllocNode(dApiSess)> dDiscuss2.pSubType = $TypeVolDiscussion> dDiscuss2.pName = 'Discussion'> dDiscuss2.pVolumeID = dDiscussion.pID> iCreateNodeResult = DAPI.CreateRootNode(dDiscuss2)>> // Insert "root" record into DiscussionID> dbResult = CAPI.Exec( \> .PrgSession().fDbConnect.fConnection, \> 'insert into DiscussionID values ( :A1, 0 )', \> dDiscuss2.pVolumeId )>> The code I've got here comes out of the NodePreSubClass and> NodePostSubClass of the Discussion OSpace. When I create a> node using the GUI, these are called anyway. When I create> a node of type 215 (or 143) using OScript, they aren't.....>> Am I doing something wrong ? Or is this how I'm supposed to> create a discussion ?!>> Dave>> [To reply to this thread, use your normal e-mail reply function.]>> ============================================================>> Topic: creating a discussion node>
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=2444828&objAction=viewDiscussion
: Development Discussion
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=786303&objAction=viewLivelink
Server:
https://knowledge.opentext.com/knowledge/livelink.exe
Dave_Russell_(CCIDR_(Delete)_2115817)
Sounds interesting, but I don't follow....How would I use... webNode.('action-create2')(......)to create a discussion ?How do I make it call the "discussion" create2 ?Dave
eLink User
Message from Hans Stoop via eLinkIt will look like (without error checking)Object webNode = $WebNode.WebNodes.GetItem( $TypeDiscussion ) // Getthe webNode of the discussion objectAssoc retval = webNode.('action-create2')(......)Hans Stoop--------------Consultant Partner Programs Europehstoop@opentext.com+31 23 5652333
http://www.opentext.com/>
; -----Original Message-----> From: eLink Discussion: Development Discussion> [mailto:development@elinkkc.opentext.com]> Sent: woensdag 7 februari 2001 15:10> To: eLink Recipient> Subject: Whereabouts do I call Create2 ?>>> Whereabouts do I call Create2 ?> Posted by CCIDR on 02/07/2001 09:07 AM>> Sounds interesting, but I don't follow....>> How would I use...> webNode.('action-create2')(......)> to create a discussion ?>> How do I make it call the "discussion" create2 ?>> Dave>>>>>>> [To reply to this thread, use your normal e-mail reply function.]>> ============================================================>> Topic: creating a discussion node>
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=2444828&objAction=viewDiscussion
: Development Discussion
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=786303&objAction=viewLivelink
Server:
https://knowledge.opentext.com/knowledge/livelink.exe
Jeff_Lang_(lang_(Delete)_2245920)
You shouldn't call create2 on the discussion webnode. You should make your script similar to the create2 method.First get the LLNode for the discussion node typellnode = $LLIAPI.LLNodeSubsystem.GetItem( $TypeDiscussion )Alloc the new discussion node by calling LLNode NodeAlloc. Look for NodeAlloc in the create2 script for an example.Now that you have the new node call llnode NodeCreate. Once again look in Create2 for an example.The LLNode is what knows how to create the specific node type properly. This is how you should create all nodes.
eLink User
Message from Hans Stoop via eLinkWhy shouldn't he call the create2 method for the discussion node. Ilike to know the reason behind it.Hans Stoop--------------Visit the Solution Catalog at
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=2277625&objAction=browse&sort=nameConsultant
Partner Programs Europehstoop@opentext.com+31 23 5652333
http://www.opentext.com/>
; -----Original Message-----> From: knowledge@opentext.com> [mailto:knowledge@opentext.com]On Behalf Of> eLink Discussion: Development Discussion> Sent: vrijdag 16 februari 2001 6:30> To: eLink Recipient> Subject: Creating a discussion node>>> Creating a discussion node> Posted by lang on 02/16/2001 12:27 AM>> You shouldn't call create2 on the discussion webnode. You> should make your script similar to the create2 method.>> First get the LLNode for the discussion node type>> llnode = $LLIAPI.LLNodeSubsystem.GetItem( $TypeDiscussion )>> Alloc the new discussion node by calling LLNode NodeAlloc.> Look for NodeAlloc in the create2 script for an example.>> Now that you have the new node call llnode NodeCreate. Once> again look in Create2 for an example.>> The LLNode is what knows how to create the specific node> type properly. This is how you should create all nodes.>>>>>> [To reply to this thread, use your normal e-mail reply function.]>> ============================================================>> Topic: creating a discussion node>
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=2444828&objAction=viewDiscussion
: Development Discussion
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=786303&objAction=viewLivelink
Server:
https://knowledge.opentext.com/knowledge/livelink.exe
Dave_Russell_(CCIDR_(Delete)_2115817)
You're telling me that I should create all nodes in OScript using the UNDOCUMENTED$LLIAPI.LLNodeSubsystem.GetItem($Type...)followed byLLNode.NodeAlloc and then LLNode.NodeCreate 1) What is the DAPI package for then ?2) Is there any documentation on $LLIAPI I can refer to so I know what I should be passing as parameters ?3) Why isn't it covered on the SDK/Builder course ?Dave
eLink User
Message from Hans Stoop via eLinkDocumentation about LLAPI can be found in the help of the builder.>From the help page goto Livelink Module Index/kernel/lliapi.Hans Stoop--------------Visit the Solution Catalog at
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=2277625&objAction=browse&sort=nameConsultant
Partner Programs Europehstoop@opentext.com+31 23 5652333
http://www.opentext.com/>
; -----Original Message-----> From: knowledge@opentext.com> [mailto:knowledge@opentext.com]On Behalf Of> eLink Discussion: Development Discussion> Sent: maandag 19 februari 2001 13:01> To: eLink Recipient> Subject: What's the DAPI package for then ?>>> What's the DAPI package for then ?> Posted by CCIDR on 02/19/2001 06:56 AM>> You're telling me that I should create all nodes in OScript> using the UNDOCUMENTED> $LLIAPI.LLNodeSubsystem.GetItem($Type...)>> followed by>> LLNode.NodeAlloc and then LLNode.NodeCreate>> 1) What is the DAPI package for then ?> 2) Is there any documentation on $LLIAPI I can refer to so> I know what I should be passing as parameters ?> 3) Why isn't it covered on the SDK/Builder course ?>> Dave>> [To reply to this thread, use your normal e-mail reply function.]>> ============================================================>> Topic: creating a discussion node>
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=2444828&objAction=viewDiscussion
: Development Discussion
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=786303&objAction=viewLivelink
Server:
https://knowledge.opentext.com/knowledge/livelink.exe
Dave_Russell_(CCIDR_(Delete)_2115817)
....On my system it's actually inLivelink Module Index/kernel/subsystem, LLNodesubsystem and LLNode.......Thanks anyway. Pointed me in the right direction.Dave
Jeff_Lang_(lang_(Delete)_2245920)
Depending upon what you're actually doing you could get away with it, but it's kind of a kludge. If you're trying to put a new interface on creating a discussion, or make adding a discussion node part of some other process you always want to create you own RH that makes the appropriate calls to the API functions in LLNode. If you don't then unexpected things could occur when you try to upgrade.