I am trying to execute example mentioned in forum to test "Copy a Document

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

  • I will be discussing this with another engineer
  • I am able to upload files from Appian to Sharepoint 2013 using the connecto, I just had to update the example in the documentation to include the extension of the file to avoid uploading a file without extension.

    Please do the following:

    1. Stop JBoss
    2. Delete <JBOSS_HOME>\\log\\*.log
    3. Delete <JBOSS_HOME>\          mp\\*.*
    4. Add these lines to ear|runtime_ear\\suite.ear\\resources\\appian_log4j.properties around line 20 (the location is arbitrary)

    log4j.logger.com.appian.integration=DEBUG
    log4j.logger.com.appiancorp.core.expr.DelayedWriteContext=DEBUG

    5. Start JBoss
    6. Import the attached application
    7. Update these constants so they match your Sharepoint server

    APPIAN_SUPPORT_SHAREPOINT_HOSTNAME
    APPIAN_SUPPORT_SHAREPOINT_PORT

    8. Use the Rules interface to generate the following URL

    =cons!APPIAN_SUPPORT_SHAREPOINT_HOSTNAME & ":"&APPIAN_SUPPORT_SHAREPOINT_PORT & "/Shared%20Documents"

    9. Copy and paste the resulting URL in your browser and confirm this is a valid path
    10. Back to Appian open the interface AppianSupportSharepointUploadFileInterface
    11. In the Documents picker select "uploadme.txt"
    12. Click "Send" and wait for the "Working" message to go away
    13. Access the URL from step 8 again and see if there's now a file called uploadme.txt
    14. If not, then attach <JBOSS_HOME>\\standalone\\log\\server.log
    15.

    SharepointConnector.zip

  • Hi Eduardo,

    I have followed all the steps provided by you.

    I am still facing the same issue.

    I am attaching the snapshot of the error received along with the server.log for your reference.

    server.zip

  • What were the results of points 8 and 9:
    8. Use the Rules interface to generate the following URL

    =cons!APPIAN_SUPPORT_SHAREPOINT_HOSTNAME & ":"&APPIAN_SUPPORT_SHAREPOINT_PORT & "/Shared%20Documents"

    9. Copy and paste the resulting URL in your browser and confirm this is a valid path
  • That screenshot doesn't look like it's the interface I sent you. Would you mind completing all the steps from above one at a time and providing the feedback you obtained on each of them?
  • Make sure all the steps are done using my application
  • All steps are completed what you mentioned Eduardo Fuentes , In fact we have used your application and created SAIL report for sail interface form what you built....I asked Sapna to respond to this forum link..
  • Hi Eduardo and Patty,

    I have ensured to follow all the sets mentioned in the earlier message.

    Here are the changes I have made to the artifacts after importing the application given by you and enabling the loggers.

    I modified-

    APPIAN_SUPPORT_SHAREPOINT_HOSTNAME - http://10.99.42.68
    APPIAN_SUPPORT_SHAREPOINT_PORT - 80
    and finally the following line in the rule AppianSupportSharepointUploadFileInterface because our sharepoint server is hosted on the below location -
    10.99.42.68:80/.../Shared Documents

    Given by you-
    path: "/_api/web/GetFolderByServerRelativeUrl('/Shared%20Documents')/Files/add(url='" &
    document(local!documentToSend[1], "name") & "." & document(local!documentToSend[1], "extension") &"',overwrite=true)"

    Modified by me-
    path: "/sites/testsiteforappian/_api/web/GetFolderByServerRelativeUrl('/Shared%20Documents')/Files/add(url='" &
    document(local!documentToSend[1], "name") & "." & document(local!documentToSend[1], "extension") &"',overwrite=true)"


    The below URL would not work since our sharepoint server is not configured so
    10.99.42.68:80/Shared Documents
  • I have once again performed the steps to recheck. I am seeing the same error again.

    Also earlier I have just enveloped the rule AppianSupportSharepointUploadFileInterface in a report to be able to easily invoke it from Reports tab rather than from interface to show the error message clearly.

    It is the same error message shown in the logs as well.

  • Without creating a report as wrapper. I have plainly followed these steps now,

    10. Back to Appian open the interface AppianSupportSharepointUploadFileInterface
    11. In the Documents picker select "uploadme.txt"
    12. Click "Send" and wait for the "Working" message to go away
    13. Access the URL from step 8 again and see if there's now a file called uploadme.txt

    I am facing the same error as shown in the earlier log attached.