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
8 replies
Subscribers
5 subscribers
Views
2867 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Plug-Ins
I am new to plug-in development , I have developed expression function which h
syedi
over 8 years ago
I am new to plug-in development , I have developed expression function which has one required and three optional parameter. When i re-order or remove any of the optional parameter in between, it still passes the value in default order and it assumes wrong value. So do i need to map anything specific for the name in java function
OriginalPostID-224442
OriginalPostID-224442
Discussion posts and replies are publicly visible
0
Chitra Sharma
over 8 years ago
Are you using "unlimited" option for parameter annotation?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
syedi
over 8 years ago
nope, I am just using @Parameter(required=false) . no other annotation for that variable. my code sample looks like:
@Function
public TypedValue xyz(ServiceContext sc, @Parameter(required=true) Long a,@Parameter(required=false) String b,@Parameter(required=false) Long c,@Parameter(required=false) TypedValue[] d) {
...
...
}
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Chitra Sharma
over 8 years ago
For passing related parameter values, you can call your function with parameter name as xyz(a: aValue, c: cValue, b: bValue)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
syedi
over 8 years ago
Yep, i tried that, but it fails. for example if i call xyz(a:aValue ,c:cvalue) , it is passed as xyz(a:avalue, b:cValue) . What am i missing ?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chetany
A Score Level 1
over 8 years ago
@syedi, the custom plugin functions do not accept keyword notation. the parameters will be passed in order you pass from SAIL code. So, for optional parameters, try passing null
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chetany
A Score Level 1
over 8 years ago
By do not accept, I mean they do not recognize keyword notation
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
syedi
over 8 years ago
Thanks , and one more question. if we pass list of variant as a middle parameter, will it affect the later parameter?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Alok Patro
over 7 years ago
Have you used constructors ? Try constructor overloading as per the parameters.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel