I'm a beginner in the development of multi agent systems in JADE, I've been reading some tutorials about it, but I still have a doubt, every tutorial show how to register o how to search a service in the DF, for what I know a service should be a action right? If the agent offers a set of services there should be a way that when other agents request one of the service I execute some code for the requested service. I have a list of methods that are related to a service, but, in JADE:
how I program the action of a service?
how I call the methods related to the service?
Thanks!
If i understand correctly you are asking how to get to know a particular service and use it ?
For example the Book-Trading example in the jade example set, The book seller when it registers with the DF sets it as sd.setType("Book-selling")
and when the Book Buyer needs to find some sellers, it searches again with
// Update the list of seller agents
DFAgentDescription template = new DFAgentDescription();
ServiceDescription sd = new ServiceDescription();
sd.setType("Book-selling");
template.addServices(sd);
try {
DFAgentDescription[] result = DFService.search(myAgent, template);
So only those services which match the specified template will be able to offer their services to the book buyer agent.
So therefore you would need to register your specific service with the DF in order to be visible to other agents who could use them.
Related
I want to create a rest end point but I am not sure what is right way. For example I want to expose endpoint to create account but there are multiple account type like:
Normal account with property name, description, and current balance
Credit Card account with property name, description, current balance, grace period, billing date and current outstanding. Now the confusion is, Shall I create two endpoint for each of account type? or Shall I create single end point with all the property.
Shall I create two endpoint for each of account type? or Shall I create single end point with all the property.
How would you do it on a web site?
You might have a single create-account form; you collect the information that you need from the visitor, the form is submitted to the server, and the server looks at the form details to determine what kind of account to create. Create the account, and send back a response to the browser announcing where the web page describing the account is. And that's fine.
You might do the same thing with multiple forms; through a series of links you guide the visitor to the form that best fits their circumstances, and then the remaining work is the same as above - the form is submitted, the server looks at the form details to determine the account to create, the account is created, the server sends back a response to the browser announcing where the web page describing the account is. And that's also fine.
You could do the same thing with multiple forms, but have each of the forms submit using a different target URI; you could even have each form submitted to a different host! Again, the actions taken by the host receiving the form are the same - do the work, return the result announcing where the new web page is.
Thw browser doesn't care, it's just collecting form inputs using standardized form processing rules, and then submit the result using the meta data in the form.
You'll want different code responsible for creating each of the different kinds of accounts (the "separation of concerns" idea), but it doesn't much matter if the routing of the request to that code is done purely mechanically (because you are using different URI) or "by hand".
Do we have webhook available for SAP successfactor?
Do we have any webhook available where I can get the notification if any operation happened in the entity like any object is inserted in the entity then I will get notification?
Yes, it is an inplace functionality called Intelligent Services (can be found in Successfactors within transaction "Intelligent Service Center (ISC)".
There you can subscribe to different events (only the one's provided in the standard, no custom hooks possible). The subscription results in an integration center flow, where data can be passed via different protocolls to a webservice of your choice.
You can also configure a "business rule" with an intelligent service as a starting point.
I have very different requirement in AEM.
A author will initiate workflow. Workflow will activate the page on publish and It is still running on author instance. On publish a workflow will trigger (May be using Launcher) on the activated page and will call some third party service.Third party service returns result and pass to author instance. workflow which is already running on author instance, will read the result coming from publish , do the necessary things and notify the author. Author will login to his inbox and he may complete the workflow or redo.
I know it is a bit different . Please share your thoughts, how can I achieve this?
Use Replication and Reverse Replication Agents to exchange data from Author <-> Publish (1).
But based on your description I'd suggest you do not replicate the data at all but you could simply call the third party service directly from the author instance - using an EventHandler or WorkflowLauncher.
(1): https://docs.adobe.com/docs/en/aem/6-1/deploy/configuring/replication.html#Configuring%20Reverse%20Replication
I have built a Custom B2B app for one of our clients. My question is how to automate the distribution of the redemption codes.
I have already looked at some of the MDM providers. Their solutions are too expensive and all we really need is a way to distribute the app from a webserver, not manage a bunch of mobile devices.
As you probably already know, when a client buys a Custom B2B app through the Apple VPP program, they get a spreadsheet with valid redemption codes for the number of licenses they have built. This spreadsheet has 2 columns: 1) redemption code 2) URL to redeem the code
I want to provide my client with a URL where they can send their users to download the app. They just don't have the expertise/infrastructure to distribute the app themselves. And emailing clients is not going to work.
I'm not a web guy, but it seems to me that we could write a webpage that would look at the spreadsheet for the next available activation code and then redirect the user to the associated URL. I'm not concerned with the number of licenses they distribute since I have another way of auditing the real number of users (Flurry). So I want this to be as painless as possible.
In fact, I have multiple clients and want to provide them each with their own URL for their clients. It seems like this shouldn't be too difficult to code.
The problem is, I'm not the guy to write that code. Any ideas on how best to do this?
Assuming that you don't want to show the user a website you should be able to do this with an online service like parse.com and the features it offers.
From a user POV you would supply them with a link which directed them to parse.com with a path and parameters indicating the action to be taken (get app) and what account is associated. This would redirect the users browser to the appropriate destination.
The main issue (and this applies to any solution) is knowing if the user actually followed through and used the code. i.e. should it be removed from the DB so it isn't offered to another user in future. Then you would update the DB each time you get a new spreadsheet.
Anyway, this could be achieved with a little javascript in parse.com, specifically, by using cloud code which can interrogate and modify the DB and then redirect the user.
Obviously if you need user authentication of some kind or other restrictions then you would need to start adding some web interface on top of this in order to collect the details.
I am creating a workflow(integrated into a Java web application) for a leave application approval. The workflow is as follows:
Leave request is raised for an employee.
Case 1: If employee's role is not team lead.
The request is sent to employee's team lead.
If team lead rejects, workflow ends.
If team lead approves, request is forwarded to manager.
Case 2: If employee's role is team lead.
The request is directly sent to Manager.
Workflow ends when manager approves/rejects the application. At the time of approval/rejection the user needs to enter a comment.
I need to generate web-form for user input. The options can be dynamic and should be defined in workflow itself. How can I achieve this? What is the right way to manage different directions of a workflow based on different roles?
Any thoughts/suggestions are welcome. It will be helpful if someone can direct me to example/sample code to achieve this.
You might be interested in Jboss Tohu - it's a framework that generates web forms from Drools workflows and rules. I'm not entirely sure if it is production ready yet, but it looks to have a reasonable amount of functionality.