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
7 replies
Subscribers
5 subscribers
Views
3687 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Plug-Ins
I am using the startprocesswriter function in a bind and I can not get it to wor
mpontius
over 10 years ago
I am using the startprocesswriter function in a bind and I can not get it to work with Appian 7.6 or 7.7. It is always making it to the List of Variant portion of code in the plugin. Below is my sail code trying to use the plugin.
load(
local!testBool: bind(get: ri!testBool, set: fn!startprocesswrite(processModelId: 54, processParameters: {{param1:"yes"}})),
a!sectionLayout(
label: "Lorem Ipsum",
firstColumnContents: {
a!buttonLayout(
primaryButtons: {
a!buttonWidget(
label: "Start Process",
value: true,
saveInto: local!testBool
)
}
)
},
secondColumnContents: {
/* Add components here for a two-column section */
}
)
)
This calls a very simple start and end node only process with one parameter called param1. Looking at the code I was thinking this should work fine, but it does not and the expression is returning null. I get the following er...
OriginalPostID-135572
OriginalPostID-135572
Discussion posts and replies are publicly visible
0
mpontius
over 10 years ago
...ror in the UI editor.
Could not display interface. Please check definition and inputs.
Interface Definition: Expression evaluation error at function 'bind': Invalid parameter: the parameter given as the 'set' parameter to the function 'bind' must not be null and must be a reference to a rule or function that returns Writer.
has anyone successfully used this with Appian 7.6 or 7.7? If so can you help me with the syntax?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Mike James
Certified Lead Developer
over 10 years ago
load(
local!testBool: bind(get: ri!testBool, set: startprocesswrite(processModelId: 54, processParameters:_)),
a!sectionLayout(
label: "Lorem Ipsum",
firstColumnContents: {
a!buttonLayout(
primaryButtons: {
a!buttonWidget(
label: "Start Process",
value: {param1:"yes"},
saveInto: local!testBool
)})}))
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
mpontius
over 10 years ago
That works, thanks! It is very odd that the syntax in the bind itself does not work?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
nareshs427
Certified Senior Developer
over 10 years ago
Hi mpontius,
To clarify this, When you click on the button, the setter function(in this case 'startprocesswrite') will be executed. And Appian tries to pass button value to the setter function. That means at least one parameter of the setter function should be left empty(using _) so that the button value is passed to that parameter when clicked. But as you did not left any parameter empty in 'startprocesswrite' function there is no way for it to send button value, so the error.
Following link has more details.
forum.appian.com/.../Evaluation_Functions.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
mpontius
over 10 years ago
I don't buy it... here is another example where I do exactly that.
local!startProcessParam: bind(
get: local!dontShowAgain,
set: fn!startprocesswrite(processModelId: 216, processParamerters: {_, {userName_txt: fn!loggedInUser()}})
),
...
a!checkboxField(
labelPosition: "ADJACENT",
choiceLabels: {"don't show again"},
choiceValues: {false},
value: local!dontShowAgain,
saveInto: {
local!dontShowAgain,
a!save(local!startProcessParam,{showWelcome_bool: local!dontShowAgain})
}
)
ERROR:
Could not display interface. Please check definition and inputs.
Interface Definition: Expression evaluation error at function fn!startprocesswrite parameter 2 [line 6]: Invalid List of Variant: Cannot validate type (value in wrong format). Expected class [Lcom.appiancorp.core.data.Variant;, but received class [Ljava.lang.Object;
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
nareshs427
Certified Senior Developer
over 10 years ago
Hi mpontius,
Partial evaluation is on arguments passed to a function or a rule not for a element in the list values of a parameter.
In above case you were trying to pass a element in the list for function parameter. Please leave blank for processParameters argument and set all process variable values from the saveInto.
I hope this clear your doubt. Please refer to the attached code for more clarification.
Test_startProcessWrite.txt
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
leslies331
over 10 years ago
Thanks Nareshs - your example was helpful!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel