Hi All,
Is it possible to create case based on template using CWS?
Appreciate if someone can provide any code snippet or reference.
Thanks,
Maqsood
Hello,
Could anyone point me to a documentation or code snippet to create cases based on templates programmatically?
Appreciate your help!
regards,
Cases are a different subtype I beleive.The code when you do asks the real livelink system to give the template of the node so when you do documents internally it searches if 144 code is already coded in the WS Oscript..Like wise I think OT put something to support "generic nodes" like LAPI used to support.Are you not able to get by that? Since Cases are more like Project Templates an XML Export/Import might work too. You can also use Oscript to add specific support you require and OT has not coded yet.
Thanks for your reply Appu!
I've posted the appraoch I'm taking and issues facing at below Linked in discussion:
Disscussion Topic: Issues with /api/v1/doctemplates/{id}/instances REST API Call - CS 10.5
https://www.linkedin.com/groups?newItemsAbbr=&gid=155217
Would appreciate if you can have a look into it and provide some details regarding REST API approach to create Cases.
here is the details:
I found there are two ways to acheive this: 1. SOAP based API (per ECMLink SDK and API documentation - 10.5 SP1) 2. REST API Support - Binder and Case Creation (per Release Notes of Content Server Module) I tried the 2nd way using "/api/v1/doctemplates/{id}/instances" and run into 500 internal error. As per OT logs, it seems its trying to connect to SAP system (not sure). when try to create a simple node using "/api/v1/nodes", that run into 400 error (Bad request). However, "/api/v1/ping" is responding with API details. So, would like to ask: - What Am I doing wrong? - Do I need to change any configurtion/ settings in CS to work with REST API? - Can anybody share with me any documentation/ sample code/ simple idea? thanking you in advance for your help!
Is the case you want to create a xECM workspace? Is the case configured to be linked to a SAP business object?
If the answers to the above is NO and you have not configured a workspace type for the case temp late then this is a bug and should be reported to OT support.
When it is a xECM workspace then that is not supported via the REST-api.
Via the web service you will only be able to create late workspaces and not early (no connection to a SAP object) workspace.
Why are you using cases and not business workspaces? It would not change the answers, I’m just curious what the advantages are to use case over business workspaces.
Hans
From: eLink Entry: Content Web Services Forum [mailto:otdncontentwebservices971forum@elinkkc.opentext.com]Sent: Mittwoch, 17. Juni 2015 09:45To: eLink RecipientSubject: Creating Cases using CWS?
Creating Cases using CWS?
Posted bymakhan@ciber.com (Khan, Maqsood) On 06/17/2015 03:41 AM
[To post a comment, use the normal reply function]
Topic:
Forum:
Content Web Services Forum
Content Server:
Knowledge Center
Hans,
The case has no relation with a SAP business object. It's a casetype based on a template. Just that. No relation to a workspace type.
Regards,
Maurice Wils
I believe that the issue is slightly misleading. Cases are part of Template Workspaces which I agree. Also, Hans is correct because xECM is built using Template workspaces. xECM has that functionality to create cases and binders using Enterprise Library Web Services(ELS). This means that the functionality for Template Workspaces has not been extended to Content Web Services(CWS) . Without using ELS, you should be able to create core objects using CWS in a binder or case(ie. folders, documents, etc...).
So, to clarify what Hans indicated, if you want to create cases and binders, then you would need to use Enterprise Library Web Services to accomplish that. If this is not an option for you, you will need to expose the functionality to CWS in order to create binders or cases. The other option would be to engage Global Services to see if they have an alternate solution.
I forgot to mention, this also includes REST API. in order to create cases and binders using Content Server REST API, you would need to expose Template Workspaces to Content Server REST API.
Jerome,
I'm aware that template workspace is used by xECM and SAP wil use ELS to create binders and cases. We have ELS installed and have some cases that have a relation with SAP Business objects and will be created by SAP. This works fine. But we have a few case that don't have a relation with SAP and we need to create these with the REST API in bulk. You say it would be possible to create cases via the REST API by exposing template workspace to the CS REST API or use ELS to create the cases. So how would we be able to expose template workspaces to CS or how can ELS be used by an external application to create cases?
I also looked into the release notes from template workspaces version 10.5.0 and on page 5 there is an explanation how to use the REST API to create binders and cases (also available in the appworks developer documentation).
api/v1/doctemplates/{id}/instances
{id} represents the objectid of the template the object will be created from.
The following parameters are required:
(Integer) parent_id: the destination container DataID, always positive
(Integer) classification_id: the template classification DataID
(String) name: the instance name that the user wants to be
https://knowledge.opentext.com/knowledge/llisapi.dll?func=ll&objaction=overview&objid=44228433
This suggets that you can use the REST API for creating binder and cases.
Would it be possible to create a standard application that talks to ELS the way SAP does via the property provider?
Maurice
Hi Maurice,
The webService of xECM requires a business object to create the binder, case or business workspace, so it will not work in your scenario.
Please open a ticket with support, because in this case no call to SAP should be made.
From: eLink Entry: Content Web Services Forum [mailto:otdncontentwebservices971forum@elinkkc.opentext.com]Sent: Mittwoch, 24. Juni 2015 11:25To: eLink RecipientSubject: RE Creating Cases using CWS?
RE Creating Cases using CWS?
Posted bymaurice.wils@ciber.com (Wils, Maurice) On 06/24/2015 05:21 AM
(Integer) parent_id:the destination container DataID, always positive
(Integer) classification_id:the template classification DataID
(String) name:the instance name that the user wants to be
From the attached log file, I could see the REST API call is trying to connect to SAP.
do you think, this should not be the case with api/v1/doctemplates/{id}/instances ?
Thank you for the information. I stand corrected with the REST API for Template workspaces. You will need to direct the REST API questions to the developer.opentext.com forums. Examples on how to use the REST API are also there as well.
To answer your question Maurice, it is possible to make an application to talk to ELS. The EL Web Services are available for any application to use. SAP uses the EL web services to make calls to business workspaces or template workspaces. It is also a better option to use web services when dealing with bulk operations. Here is an excellent post that Kyle made in the forums in regards to Web Services vs LAPI vs REST API:
https://knowledge.opentext.com/knowledge/cs.dll/Open/58088050
To answer Maqsood's question, as Hans suggested, I recommend that you open a support ticket for your trace file. One of the first things you want to ensure is that you are up to date with patches on your systems in regards to template workspaces and xECM if you have implemented it.
This should not be the case when the case you create is not configured to be linked to a SAP object. I expect the RESTapi is tested without xECM being installed and therefore this bug was not found.
From: eLink Entry: Content Web Services Forum [mailto:otdncontentwebservices971forum@elinkkc.opentext.com]Sent: Mittwoch, 24. Juni 2015 11:57To: eLink RecipientSubject: RE RE Creating Cases using CWS?
[Attachments exceeded pre-set size limits. Use the links provided to access]
RE RE Creating Cases using CWS?
Posted bymakhan@ciber.com (Khan, Maqsood) On 06/24/2015 05:56 AM
Attachment Links:
trace5-1435119561.out (64 KB)
Thanks for the clarification, Hans!
@Jerome - Maurice has already raised the ticket with support. thanks for your support!
Posted by makhan@ciber.com (Khan, Maqsood) On 06/24/2015 05:56 AM
Has anyone got a solution to this issue? I'm also getting the exact same issue.