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
16 replies
Subscribers
7 subscribers
Views
4904 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
92584 92583 92582 92581 92580 Hi .. we h
kumaraveln
over 9 years ago
92584
92583
92582
92581
92580
Hi .. we have a scenario with SAIL fileUploadFiled component .. We are aware that when we upload a document, it will be stored in a temporary location and will be moved to coded location only after submitting the form ..
if we use a PV of type document type it takes care of everything .. But we don't want to use PV here ..
Our scenario is
1. Our CDT is an array of categories.
2. Each category need multiple documents to be captured.
3. Since its a CDT, we capture documentId as Integer. So our fileUpload should save into Integer variable. We are able do do all the saving stuffs and we have all the temporary document ids as an array of array.
4. We persist the entire CDT into database and retrieve them back for displaying.
5. Our initial assumption was the document will be moved from temporary location to desired coded location with the same document id.
6. Now the problem is appian is not moving the document as such. Its...
OriginalPostID-132941
OriginalPostID-132941
Discussion posts and replies are publicly visible
0
kumaraveln
over 9 years ago
... creating the document with a new id.
7. Now our captured document id is of no use and we cannot refer to the actual document in any way.
Now my questions are,
1. For some reasons Appian is storing the documents in temporary folder and then moving it to the actual location. Why cant Appian move them with the same properties, at least the minimal properties like documentId. Its really hard to do the coding if something like a unique identifier is going to be different between the time of user action and final submit.
2. You can say to use PV and thats recommended. We can capture it as PVs and then loop through them and store the actual IDs inside the CDT Integer field. But here the difficulty is we have to capture them as array of array. If there are 5 categories, we have to use 5 PVs of type document array. And our entire array of categories and array of documents to be captured is dynamic. Dynamic in the sense it comes from a XML and business can add a new cat...
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
kumaraveln
over 9 years ago
...egory any time. Our logic will fail, because for each new category a new PV has to be introduced in the code.
3. Atleast if there is a function that can return the actual documentId on providing temporary documentId, we can put a logic in process model after submit to loop through the temp docIds and override the CDT docId value with the actual docId. But the tempDocument is no longer available after submit.
4. Another could be option is the property of actual document to have an additional property say temporaryDocumentId, so that every document uploaded to KC through SAIL forms have a documentId and temporaryDocumentId (id of content when present in temp folder) only as a reference. And a function to return the actual document id by passing tempDocId. In this way we neither dont need to expect the document to be always available in temp doc folder nor the doc Ids of temp and actual document to be same.
Should a developer code for the state in which the data i...
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
kumaraveln
over 9 years ago
... s captured or when data is submitted. All the above are just our suggesstion. Its really frustrating after hours of coding and ending up into issue like this. Expecting some solution or workaround for this. Using PVs is our last option as it needs more development effort and restrict the dynamic nature of our entire code (New categories added by business in production will not work as it requires a code change).
Sorry if i was technically wrong anywhere. Expecting a quick solution.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
kumaraveln
over 9 years ago
Please ignore the 5 numbers at the beginning of the question.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
venkats533
over 9 years ago
why would saving into PV of document type will limit your dynamic nature. we have developed file upload feature where the list of documents is dynamic in nature (controlled by database and business logic). the fileupload component does expect a Docuemnt datatype as PV or AC. I dont think there is any work around. you can contact Gibson Lam (BOTW) for a demo of one of the application that does what I have mentioned here.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
kumaraveln
over 9 years ago
Documents can be dynamic here. Say initially there are 5 documents to be collected and later it changed to 6. PV can handle it as it will be Document (Multiple). But I have category on top of that.
Category
-----id
-----categoryName
-----<somemorevariables>
-----documents
Here i will define one PV for each category say there are 5 initially. So when i come out of the form, i can loop through and copy documents into respective categories. But the problem comes when business adds a new category at some point of time, which requires a new PV to be defined for category #6 hence resulting in a code change. This is what i meant as will affect the dynamic nature.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
venkats533
over 9 years ago
got it. yeah, that is a difficult problem to solve. but, unfortunately there is no workaround. the document can be saved only if the ri is a document type.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
venkats533
over 9 years ago
anyway, internally docuemnt data type is mapped to long value - I am not sure if this information really helps
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
kumaraveln
over 9 years ago
Thanks venkat. Since long is also not available in CDT it wont help our case. Let us see if Appian guys come and give some workaround or fix for this. I believe this use case will be a frequently implemented one across business and Appian will consider to give a much simpler approach at least in their later versions.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sariqs
over 9 years ago
We also have similar requirement where we need to associate a document with each CDT record based on category. In our case I am thinking to get all the document uploaded first and than show them in grid with editable category field to get them categorized. First I was thinking to have category field and document to be provided on the same form for each CDT which I guess wont be possible.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>