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
4 replies
Subscribers
7 subscribers
Views
2503 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Does anyone know how to pass parameters from a Dashboard to a channel for launch
markw91
over 8 years ago
Does anyone know how to pass parameters from a Dashboard to a channel for launch process? Also, anyone know how to pass parameters, like process ID, from a Process Report row click to launch a process, passing the process ID ? It is clear a report can open and pass one parameter to other reports and dashboards, but apparently not launch a process. If a report row click opens a dashboard, that dashboard can contain a channel to launch a process with a parameter, but I am not successful getting a parameter to pass, eht expression editor for the channel value shows process variables as possible values, but the process never validates and gives the error that process variables cannot be used in a process variable expression. Any ideas?? Can a rule be used in the channel value to pass a parameter?
OriginalPostID-167996
OriginalPostID-167996
Discussion posts and replies are publicly visible
0
sikhivahans
over 8 years ago
@markw I could answer one of your questions which is as follows:
Also, anyone know how to pass parameters, like process ID, from a Process Report row click to launch a process, passing the process ID ? - Yes it is doable. Here goes the pseudocode:
1. In the portal report, on a column, construct a link with the desired parameters and their values as follows:
/*
http://
/suite/process/configureprocess.simplepopup?processModelId=
&transNo="&
&"&pid="&pp!id
Example:
http://<1.2.3.4:8080>/suite/process/configureprocess.simplepopup?processModelId=304&transNo="&pv!int_transactionNo&"&pid="&pp!id
*/
In the above example, transNo and pid are names of parameters and int_transactionID is a process variable and pp!id is a process property. Offcourse you can append as many parameters as you want. But once I heard that there is some limit for the length of url it seems, so I would like to suggest to check it.
2. Create a java script function that parses the url and gets the value of a parameter:
function getParam ( sname )
{
var params = location.search.substr(location.search.indexOf("?")+1);
var sval = "";
params = params.split("&");
// split param and value into individual pieces
for (var i=0; i
{
temp = params[i].split("=");
if ( [temp[0]] == sname ) { sval = temp[1]; }
}
return sval;
}
/*
Upload the above javascript in the KC.
*/
3. In the process model which you are trying to launch from url,include the js created in Step - 2 in the start form.
Make call to the function created in Step - 2:
On the form load event, call the url parsing function as shown below and assign the value to the field which contains the PV value. If you don't want to show the process start form, auto submit the start form using javascript. And if you don't want to show the fields, hide them using the java script (But don't make them hidden using Appian's OOTB feature). You should have them on the form, because by using the javascript we are parsing the url and assigning the values. And after the form submission, the process variables hold values that were parsed and assigned by javascript.
var transNo=getParam("transNo")
var processId=getParam("pid")
where transNo and processId are the field names that holds the start parameter process variables.
That's how we implemented in our internal project long back. You could let me know if you have any questions.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 8 years ago
@markw FYI, I guess by employing the above strategy, you could satisfy the requirement to some extent of your previous post re: taking the action on a process.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
markw91
over 8 years ago
I'm not successful thus far... I have a pv in a subprocess whose value is set from form, and the calling process' subprocess node sets (Text) Input Variables with Pass by reference. I call the subprocess with a url as shown above from a report data click, but the value never shows in the subprocess... I even try explicitely providing a literal value in the url... why would it matter that the url points to a 'subprocess'?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 8 years ago
@markw Could you please elaborate the usecase (I am not clear what you meant by 'subprocess' and lacking some context of your usecase as well) so that I can try to replicate the same scenario in my instance?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel