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
34 replies
Subscribers
5 subscribers
Views
11741 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Integrations
I am trying to execute example mentioned in forum to test "Copy a Document
sapnas
over 10 years ago
I am trying to execute example mentioned in forum to test "Copy a Document From Appian to SharePoint" functionality using connector functions-
forum.appian.com/.../Connector_Functions
Code / Example from forum connection and API parameters suitable to the my environment-
=load(
local!documentToSend,
a!dashboardLayout(
firstColumnContents: {
a!pickerFieldDocuments(
label: "Document To Send",
maxSelections: 1,
value: local!documentToSend,
saveInto: local!documentToSend
),
if(
isnull(local!documentToSend),
{},
load(
local!shpCopyDocumentFromAppianWriter: bind(
null,
a!shpCopyDocumentFromAppian(
scsExternalSystemKey: "sharepoint",
usePerUserCredentials: true,
hostname: cons!SHAREPOINT_HOSTNAME,
port: cons!SHAREPOINT_PORT,
...
OriginalPostID-112434
OriginalPostID-112434
Discussion posts and replies are publicly visible
0
Eduardo Fuentes
Appian Employee
over 10 years ago
1. Can you try using the fully qualified domain name of the Sharepoint server? (
myspserver.mycompany.com)
2. Can you try using the hosntame of the Sharepoint server? (
http://myserver)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
saravanana
over 10 years ago
This is internal instance of SharePoint, hence we have used IP address. other operation works fine - shpInvoke and shpCopyDocumentToAppian, only shpCopyDocumentFromAppian alone erroring our.
Do not understand why you are asking to use host name, other operations such shpInvoke and shpCopyDocumentToAppian (download document from Sharepoint) works fine if we use ip address, what is so different this connector expects hostname or FQDN rather than ip address. This is to understand better form outside to make this changes.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 10 years ago
I am suggesting that because I was able to reproduce the "Unable to retrieve RequestDigest from SharePoint to execute POST request" error in my environment by using the IP of my Sharepoint server instead of the hostname. Suggestions will always me made after testing and confirming that this can be the root cause.
Let me explain, why. Sharepoint servers have a concept called Alternate Access Mappings; only the URLs listed as Alternate Access Mappings are considered valid for the Sharepoint server. By default Sharepoint will use only the hostname:
http://mysharepointserver
but you can have as many alternate access mappings as you want such as:
mysharepointserver.mycompany.com
in your case it seems that you haven't configured access mappings properly therefore it's expected you get, for some requests (i.e. Appian connectors) that require to get the RequestDigest first, an error like this.
Simply configure your access mappings properly or update your constant to be
http://mysharepointserver
or
mysharepointserver.mycompany.com
depending on what your current access mappings are.
Attached you will see an example of me reproducing the issue.
Here's how you configure them
technet.microsoft.com/.../cc263208(v=office.15).aspx
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sapnas
over 10 years ago
I have tried to replaced the IP address with hostname of the SharePoint server and executed the code but I am still getting the same error -
-/0.0.0.0:8080-7) 2014-06-23 06:31:44,440 [http-/0.0.0.0:8080-7] DEBUG com.appiancorp.core.expr.DelayedWriteContext - Executing DelayedWrite: local!shpCopyDocumentFromAppianWriter: com.appian.integration.sharepoint.upload.SharepointIntegrationUploadFile$1@2b6f447
-/0.0.0.0:8080-7) 2014-06-23 06:31:45,080 [http-/0.0.0.0:8080-7] ERROR com.appiancorp.core.expr.DelayedWriteContext - An error occurred while attempting to store into variable local!shpCopyDocumentFromAppianWriter. Details: com.appian.integration.sharepoint.exception.CustomRuntimeException: Unable to retrieve RequestDigest from SharePoint to execute POST request
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 10 years ago
Did you check what the right syntax is by looking at the Alternate Access Mappings? You need to review how this Sharepoint Access Mappings are configured (what URL).
The URL used in the connector has to match exactly what the mappings list in Sharepoint where URLs of type
http://myserver
will not work if the access mapping is
http://myserver.mycompany.com
and viceversa
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sapnas
over 10 years ago
Hi Eduardo,
I have verified and reviewed how SharePoint Access Mappings are configured in our SharePoint server. I have attached the snapshot of AAM and SharePoint site home for your reference.
I have then modified the constant as part the application you asked us to use ,
APPIAN_SUPPORT_SHAREPOINT_HOSTNAME ->
http://nhclt-pc99-1
and followed the steps mentioned in your earlier post. I have also tried with other AAM lists mentioned in the snapshot.
I am getting the same error.
10:19:21,305 INFO [stdout] (http-/0.0.0.0:8080-6) 2014-06-26 10:19:21,305 [http-/0.0.0.0:8080-6] ERROR com.appiancorp.core.expr.DelayedWriteContext - An error occurred while attempting to store into variable local!shpCopyDocumentFromAppianWriter. Details: com.appian.integration.sharepoint.exception.CustomRuntimeException: Unable to retrieve RequestDigest from SharePoint to execute POST request
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 10 years ago
Have you asked to whoever manages this Sharepoint server to check if he sees something on the Sharepoint and IIS logs? Maybe there will be more information in there.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Tom Ryan
Appian Employee
over 9 years ago
Just in case anyone else comes here with the same error and the previous steps do not resolve it, ensure that you have created a top level site on your Sharepoint server (i.e., at
http://myserver/
).
It seems that the connector function looks for the context (containing the Request Digest) to perform the document upload at the top level site, and if it is not configured (e.g. if you have only created a site at
http://myserver/sites/testsite
) then it may not return the context successfully.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chandhinir
over 9 years ago
Is there any possiblity to upload multiple documents at the same time to sharepoint using connector functions?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 9 years ago
The connector only takes one document at a time. if you want to upload more than one then you better do it within the process and not inside the form.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
<
>