Requirement to pull the result in a process model

Hi,

We have created interface with grid pulling the result of webservice result Webservice Name and Status "Active" , "Failed".

Now we have requirement to pull the result in a process model and need to call this interface in script task with an expression rule and send an email to the group. Could anyone let me know how to pull this record from the interface.

Interface:
load(
local!studyWebserviceUp: if(rule!RSU_WS_getStudyDetailsByUserIdInput(userId: loggedInUser()).httpStatusCode=200, "Active","Failed"),

a!dashboardLayout(
contents: {

a!sectionLayout(
label: "RSU Webservices",
contents: {
a!columnsLayout(
columns: {
a!columnLayout(
contents: {

a!dateField(
label: "Today Date",
labelPosition: "ADJACENT",
value: today(),
readOnly: true
)
}
)
}
)
}
),
a!sectionLayout(
label: "Items",
contents: {
/* This grid is not configured to page or sort */
a!gridField(
labelPosition: "ABOVE",
totalCount: 3,
columns: {
a!gridTextColumn(label: "Webservices", data: {"Study Webservice", "TMDH Werbservice", "Site Webserivce"}),
a!gridTextColumn(label: "Status", data: {local!studyWebserviceUp, local!studyWebserviceUp, local!studyWebserviceUp}),
/*a!gridTextColumn(label: "Qty", data: {2, 1, 2}, alignment: "RIGHT"),*/
/*a!gridTextColumn(label: "Unit Price", data: {dollar({150, 50.99, 30.99}), "Total"}, alignment: "RIGHT"),*/
/*a!gridTextColumn(label: "Amount", data: dollar({300, 50.99, 61.98, 412.97}), alignment: "RIGHT")*/
},
value: a!pagingInfo(startIndex: 1, batchSize: 5),
saveInto: {}
)
}
)
}
))

  Discussion posts and replies are publicly visible

  • Are you trying to pull the specific WS results and send the data as an email, or the interface itself?

    If you want to send the WS results, you could call RSU_WS_getStudyDetailsByUserIdInput in the script task, and save its output in a PV. Then, you can format the results in the email node however you'd like.

    If you want to send the grid itself embedded in an email, Appian does not have an OOTB way of handling this (as far as I know). You could use the Advanced Document Template under shared components, and build out a word document table with the WS results. Alternatively, you could format the grid itself as HTML within the Email node, building out expression rules to create the HTML code. You could also format the results in an excel document and send that instead.
  • 0
    Certified Lead Developer
    Hi are you sure, want to send interface as content to via email?

    Because I believe it's better to design a similar type of html template and configure the data dynamically and can send this via email


    Hope this will help you