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
3 replies
Subscribers
5 subscribers
Views
1462 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Plug-Ins
Hi, I'm just wondering to know from where the following services
Mahesh Sanga
over 10 years ago
Hi,
I'm just wondering to know from where the following services will be injected into a custom plugin? (or how those objects will be available in a custom plugin)? SmartServiceContext or ServiceContext or UserService or UserProfileService? ...
OriginalPostID-111891
OriginalPostID-111891
Discussion posts and replies are publicly visible
0
Eduardo Fuentes
Appian Employee
over 10 years ago
There are lot of examples in the Shared Components section that use injected contexts, take some time to download and review the source code of some of them available for download here in Appian Forum under the "Shared Components" record (
forum.appian.com/.../all)-
Smart Services
The Developer Guide will also explain this
forum.appian.com/.../Custom_Smart_Service_Plug-ins
They're injected in the constructor of your plug-in.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Mahesh Sanga
over 10 years ago
Thanks Eduardo. I would like to know, is that the BND tool who injects them(make those objects available into our plug-in)? or the JBoss or there any custom class that makes these classes(UserService etc...) available into a plugin?
because when ever we execute any function from Appian we only pass a few parameters not the injected ones. who would make the remaining services available?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 10 years ago
If you are going to invoke methods from a specific service then you need to explicitly inject them in the constructor if a smart service or in the method that represents the function if a custom function, for example, this function inside its logic requires methods from ContentService and ProcessDesignService therefore they need to be explicitly passed as parameters to the function but at runtime this is transparent to the end user who, for this example, will only have to pass a text input to the function, since at coding time you specified the function would use these other services then Appian makes them available.
@Function
public String getContentDetailsByUUID(ServiceContext sc, ContentService cs,
ProcessDesignService pds, @Parameter String objectUUID) {
Long id = cs.getIdByUuid(objectUUID);
.......
}
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel