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
9 replies
Subscribers
5 subscribers
Views
2431 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Plug-Ins
I am using fn!getdatasubsetdownloadlinkfromrule to export excel file.
shaoyongw
over 8 years ago
I am using fn!getdatasubsetdownloadlinkfromrule to export excel file.
local!exportReportLink: fn!getdatasubsetdownloadlinkfromrule(
rule: rule!test_exportReport
)
I encounter an class cast exception.
ERROR com.appiancorp.ps.plugins.downloaddatasubsetfromrule.ExportDataSubsetToExcelServlet -
13:37:04,663 INFO [stdout] (http-/0.0.0.0:8080-2) java.lang.ClassCastException
But I tested the rule!test_exportReport and it can return the datasubset.
[fieldNames=ID; Name; Type; Program; region; EndDateTime, fieldLabels=ID; Name; Fund Type; Program; Region; Complete Date, datasubset=[startIndex=1, batchSize=-1, sort=, totalCount=1, data=[ID:298839,Type:separate account,region:US,EndDateTime:7/1/2014 4:14 PM EDT,Name:Client #1002,Program:Client #1002 Account], identifiers=1], filename= CLient Report]
Note: in rule!test_exportReport, I use dictionary to recreate the datasubset.
todatasubset(
apply(
rule!constructDictionary,
local!datas...
OriginalPostID-161766
OriginalPostID-161766
Discussion posts and replies are publicly visible
0
shaoyongw
over 8 years ago
...ubset.data
),
local!pagingInfo
)
This is where I chase the issue down. It is working when I directly return the local!datasubset.
And the rule!constructDictionary is like
{
ID: index(
ri!data,
"ID",
null
),
Name: index(
ri!data,
"name",
null
)
}
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
shaoyongw
over 8 years ago
This issue is not happening before we upgrade to Appian7.9 last week.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Sumeet Khare
over 8 years ago
HI, Can you attached the complete server logs, so that we can understand for which class it is throwing the error.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
shaoyongw
over 8 years ago
I only saw two lines error message.
2015-08-14 05:43:28,085 [http-/0.0.0.0:8080-19] ERROR com.appiancorp.ps.plugins.downloaddatasubsetfromrule.ExportDataSubsetToExcelServlet -
java.lang.ClassCastException
2015-08-14 05:43:28,097 [http-/0.0.0.0:8080-19] ERROR com.appiancorp.ap2.PortalResponse - Error: 500
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 8 years ago
We'll need to see the whole stack trace to see at what line in the code the plug-in is failing.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
shaoyongw
over 8 years ago
I have attached the error log.
Error Log.txt
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 8 years ago
It might be a bug in the plug-in. I suggest you keep using your workaround.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
shaoyongw
over 8 years ago
There is no workaround now. I use the dictionary because I want to add two more field s into original datasubset.
It does work at the beginning, but this issue appears later somehow.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
shaoyongw
over 8 years ago
At last, I re-write the rule!constructDictionary to use split() to get the corresponding fields. Don't know why the index() can't read the data.
index(
ri!data,
"ID",
null
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel