Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
1 reply
Subscribers
7 subscribers
Views
848 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
I have a requirement to create a smart service, which writes a file from My Sys
ishaqtasleemm
A Score Level 1
over 10 years ago
I have a requirement to create a smart service, which writes a file from My System Folder (Source) to Appain Knowledge center (Destination).
How to create a "versioning" on a file in knowledge center (Destination) when I try to write a duplicate file from Source location ?
How to check if source file is duplicate (already exists) in knowledge center based on this it creates a versions to the file in Knowledge center ?
I have a trouble in doing this in smart service code.
Can anyone suggest how to achieve it .
I have only this right now:
Write the file of ByteArrayOutputStream to ContentOutputStream
Document doc = new Document();
doc.setParent(destinationfolderId);
doc.setName(fileName);
doc.setExtension("pdf");
ContentOutputStream cos = contentService.upload(doc, Content.UNIQUE_NONE);
cos.write(boStrm.toByteArray());
...
OriginalPostID-131853
OriginalPostID-131853
Discussion posts and replies are publicly visible
Parents
0
Eduardo Fuentes
Appian Employee
over 10 years ago
There are multiple plug-ins in the Shared Components section that end-up creating new documents or new versions. Most of them handle this via node input so at design time you determine whether the node is going to override an existing document or create a new one. This is the safest way to go.
Have a look at the examples under
forum.appian.com/.../all
Some examples would be:
Export Process and SQL data to Excel - Multi Tab
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Eduardo Fuentes
Appian Employee
over 10 years ago
There are multiple plug-ins in the Shared Components section that end-up creating new documents or new versions. Most of them handle this via node input so at design time you determine whether the node is going to override an existing document or create a new one. This is the safest way to go.
Have a look at the examples under
forum.appian.com/.../all
Some examples would be:
Export Process and SQL data to Excel - Multi Tab
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data